You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working with a Detectron2 based model and I care about the segmentation mask predictions for my features. I have large images/regions with lots of small features and since my model was trained on small slices, SAHI seems to be the ideal way to improve/perform at all my predictions on my large images.
However, when I try to run the predict command it gives out no predictions on my images (neither bbox or segm). I don't get any errors thrown simply no predictions.
I am at a loss on how to troubleshoot it any help would be highly appreciated.
Below is the majority of my attempt to run SAHI, excluding the initialization of the model in the notebook I am using.
# will be used for detectron2 fasterrcnn model zoo namefromsahi.utils.detectron2importDetectron2TestConstants# import required functions, classesfromsahiimportAutoDetectionModelfromsahi.predictimportget_sliced_prediction, predict, get_predictionfromsahi.utils.fileimportdownload_from_urlfromsahi.utils.cvimportread_imagefromIPython.displayimportImagefromsahi.models.detectron2importDetectron2DetectionModelfromsahi.utils.cvimportread_imagefromsahi.utils.detectron2importDetectron2TestConstantsfromsahi.utils.import_utilsimportget_package_infofromsahi.models.baseimportDetectionModel# create desired Detectron2 configfromdetectron2.configimportget_cfgcfg=get_cfg()
cfg.MODEL.ROI_HEADS.NUM_CLASSES=1cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST=0.3# export config as yamlfromsahi.utils.detectron2importexport_cfg_as_yamlexport_cfg_as_yaml(cfg, export_path='config.yaml')
model_path="./model_manual_save.pth"cfg_path="./config.yaml"print(model_path)
print(cfg_path)
detection_model=Detectron2DetectionModel(
model_path=model_path,
config_path=cfg_path,
confidence_threshold=0.3,
device="cuda:0",
)
After this I get an output that may be where my issue is but I can't say I know if this is right or wrong:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am working with a Detectron2 based model and I care about the segmentation mask predictions for my features. I have large images/regions with lots of small features and since my model was trained on small slices, SAHI seems to be the ideal way to improve/perform at all my predictions on my large images.
However, when I try to run the predict command it gives out no predictions on my images (neither bbox or segm). I don't get any errors thrown simply no predictions.
I am at a loss on how to troubleshoot it any help would be highly appreciated.
Below is the majority of my attempt to run SAHI, excluding the initialization of the model in the notebook I am using.
After this I get an output that may be where my issue is but I can't say I know if this is right or wrong:
I get nothing out here at this point. Simply the original image loaded in and there are no annotations that are in the results either.
Beta Was this translation helpful? Give feedback.
All reactions