SierpinskiMesh[10]

spi=Binarize[ImageCompose[ImageResize[ImageCrop[Graphics[Rectangle[{0,0},{1,1}]]],{360,360}],ColorReplace[ImageResize[RemoveBackground[],360],White->Black],Scaled[{0.5,0.44}]],0.1]

boxjes=Reverse[{1,2,3,4,5,6,8,9,10,12,15,18,20,24,30,36,40,45,60,72,90}];

datafit=Table[{ParallelTable[{1/boxjes[[size]],Total[Sign/@(Total[#,2]&/@(ImageData/@Flatten[ImagePartition[spi,boxjes[[size]]]]))]},{size,1,21,1}]},{i,1,1}];

linfit=Table[LinearModelFit[Log[Flatten[datafit[[i]],1][[1;;21]]],x,x],{i,1,Length[datafit]}]

linfit=Table[LinearModelFit[Log[Flatten[datafit[[i]],1][[12;;21]]],x,x],{i,1,Length[datafit]}];
linfitb=Table[LinearModelFit[Log[Flatten[datafit[[i]],1][[7;;21]]],x,x],{i,1,Length[datafit]}];
linfitc=Table[LinearModelFit[Log[Flatten[datafit[[i]],1][[1;;21]]],x,x],{i,1,Length[datafit]}];
linfitd=Table[LinearModelFit[Log[Flatten[datafit[[i]],1][[3;;17]]],x,x],{i,1,Length[datafit]}];
linfite=Table[LinearModelFit[Log[Flatten[datafit[[i]],1][[1;;11]]],x,x],{i,1,Length[datafit]}];
linfitf=Table[LinearModelFit[Log[Flatten[datafit[[i]],1][[4;;15]]],x,x],{i,1,Length[datafit]}];
dim=Table[linfit[[i]][1]-linfit[[i]][0],{i,1,Length[datafit]}];
dimb=Table[linfitb[[i]][1]-linfitb[[i]][0],{i,1,Length[datafit]}];
dimc=Table[linfitc[[i]][1]-linfitc[[i]][0],{i,1,Length[datafit]}];
dimd=Table[linfitd[[i]][1]-linfitd[[i]][0],{i,1,Length[datafit]}];
dime=Table[linfite[[i]][1]-linfite[[i]][0],{i,1,Length[datafit]}];
dimf=Table[linfitf[[i]][1]-linfitf[[i]][0],{i,1,Length[datafit]}];

Table[{spi,Plot[{linfitc[[i]][x],linfite[[i]][x],linfit[[i]][x],linfitb[[i]][x],linfitd[[i]][x],linfitf[[i]][x]},{x,-5,0.5},Epilog->{PointSize[Large],Point[Log[Flatten[datafit[[i]],1][[1;;21]]]]},PlotStyle->{Green,Red,Blue,Gray,Orange,Cyan},Frame->True,Axes->False,FrameLabel->{"Log((r^(-1)))","Log(N(r))"},FrameStyle->{{Large,Black},{Large,Black},{Large,Black},{Large,Black}},ImageSize->Medium,FrameTicks->{{{0,2,4,6,8,10},{}},{{-6,-5,-4,-3,-2,-1,0},{}}},PlotLegends->{"= (Subscript[D, 1 - 21])"dimc[[i]],"= (Subscript[D, 1 - 11])"dime[[i]],"= (Subscript[D, 12 - 21])"dim[[i]],"= (Subscript[D, 7 - 21])"dimb[[i]],"= (Subscript[D, 3 - 17])"dimd[[i]],"=(Subscript[D, 4 - 15])"dimf[[i]]}]},{i,1,Length[datafit]}]