hackingmaterials / pv-vision

Image analysis tool for solar modules, assisted by deep learning.
BSD 3-Clause "New" or "Revised" License
35 stars 8 forks source link

module cellsize issue #15

Closed wt163 closed 2 months ago

wt163 commented 5 months ago

cause the type of module is square in example image, so the cellsize can be set into 250. but if rectangle module, can the cellsize be set different size by using array, list ect?

wt163 commented 5 months ago

the cellsize setting error: TypeError: Invalid shape (60, 250, 250) for image data. However, it doesn't effect the image segmentation.

X-Chen97 commented 5 months ago

Hello! Could you please specify which codes or tutorials you are referring to? Also, I would assume you are talking about the segmentation of a rectangle cell (half-cut) rather than a rectangle module? Technically the algorithms should be able to segment the cells with any shapes. Thanks!

cci-cgunaydin commented 5 months ago

transform_contour_rounded.ipynb When I ran this tutorial for half-cut pv module image (below)

SPE-09-2306130607

the below code does not help me specify cell size (300X150), if I use 300 as cellsize value, the image is still not processed correctly

img_transformed = raw_module.transform(cellsize=300, img_only=True)
plt.imshow(img_transformed, 'gray')

output

Can you give us more detail on what to do with half-cut images?

X-Chen97 commented 5 months ago

Our code was not tested on half-cut cells yet. I will look into this image and give you feedback soon

X-Chen97 commented 2 months ago

Fixed. Now you can pass a tuple to the cellsize to indicate the (width, height) of your half cut cell