Replies: 1 comment
-
You can filtering out low-scoring bounding boxes with modify the predictor. threshold = 0.5 # set your own threshold
instances = predictions["instances"]
keep = instances.scores > threshold # assuming the field is named 'scores'
instances = instances[keep]
predictions["instances"] = instances |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I finetuned a MAE pretrained model for object detection using ViTDet project using our own dataset by involing lazyconfig_train_net.py. I wanted to load the finetuned module and visualize the result, but I found a problem that the structure of configure file 'config.yaml' generated by lazyconfig_train_net.py is different from that of configure file of build-in module. So I implemented user-defined Predictor which load module and weight from config.yaml instead of DefaultPredictor and visualize the output using Visualizer. The result could be visualized, but there were many low-score boxes that I didn't want to show. so I add hierarchical property MODEL.ROI_HEADS.SCORE_THRESH_TEST into config.yaml, but it doesn't work. I know the problem can be solved by modifying Visualizer to introduce a score thresh, but i'm not sure if it is necessory for this case or there's another better way for solving the problem. The code of predictor is as follow.
`class ProjectPredictor:
Beta Was this translation helpful? Give feedback.
All reactions