NREL / Panel-Segmentation

This open-source package provides a framework for automatically detecting and extracting metadata from solar array installations in satellite images.
https://panel-segmentation.readthedocs.io
MIT License
21 stars 5 forks source link

Can't run Jupiter example #18

Closed ahmadbelb closed 2 years ago

ahmadbelb commented 2 years ago

I keep getting this error when I run

#CREATE AN INSTANCE OF THE PANELDETECTION CLASS TO RUN THE ANALYSIS
panelseg = pseg.PanelDetection(model_file_path ='./panel_segmentation/VGG16Net_ConvTranpose_complete.h5', 
                               classifier_file_path ='./panel_segmentation/VGG16_classification_model.h5',
                              mounting_classifier_file_path='./panel_segmentation/object_detection_model.pth')

#GENERATE A SATELLITE IMAGE USING THE ASSOCIATED LAT-LONG COORDS AND THE GOOGLE
#MAPS API KEY
img = panelseg.generateSatelliteImage(latitude, longitude,
                                      file_name_save,
                                      google_maps_api_key)
#Show the generated satellite image
plt.imshow(img)

SavedModel file does not exist at: ./panel_segmentation/VGG16_classification_model.h5/{saved_model.pbtxt|saved_model.pb}

kperrynrel commented 2 years ago

Hey @ahmadbelb when you create the pseg.PanelDetection() class, use the location of the models in the Panel-segmentation package as the file paths. Were you able to resolve this? I can add a comment addressing this specifically in the Jupyter notebook

ahmadbelb commented 2 years ago

I got it working thank you.

Btw, what tool are you using for labelling and creating Masking and XML files?

On Wed, Jun 8, 2022 at 6:10 PM Kirsten Perry @.***> wrote:

Hey @ahmadbelb https://github.com/ahmadbelb when you create the pseg.PanelDetection() class, use the location of the models in the Panel-segmentation package as the file paths. Were you able to resolve this? I can add a comment addressing this specifically in the Jupyter notebook

— Reply to this email directly, view it on GitHub https://github.com/NREL/Panel-Segmentation/issues/18#issuecomment-1150117518, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIQO2QFSYQJOX6AKKDRLFKDVODAXLANCNFSM5YGYRQAA . You are receiving this because you were mentioned.Message ID: @.***>

kperrynrel commented 2 years ago

For object detection, I'm using labelImg: https://github.com/tzutalin/labelImg For segmentation, I'm using labelme: https://github.com/wkentaro/labelme

Check out the two labeled data sets for this repo here: https://datahub.duramat.org/dataset/solar-mounting-configuration-satellite-imagery-data https://datahub.duramat.org/dataset/satellite-images-training-and-validation-set

ahmadbelb commented 2 years ago

Thank you so much !

I think it would be really helpful to add a note about the jupyter error or to try and fix the path issue so it's easier to use the notebook :D

kperrynrel commented 2 years ago

@ahmadbelb wanted to give you a heads up--I just pushed up a new PR into master that resolves this path issue, so you no longer need to reference the file paths directly. Thank you for the feedback!