Skip to content
Discussion options

You must be logged in to vote

Solved in this way

%cd /kaggle/working/detectron2
import glob
cfg.MODEL.WEIGHTS = os.path.join("/kaggle/working/detectron2/output", "model_final.pth") # path to the model we trained
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.0001 # set a testing threshold
pred = DefaultPredictor(cfg)
for img in glob.glob('/kaggle/working/detectron2/images/*.jpg'): #path to the images
inputs = cv2.imread(img)
outputs = pred(inputs)
print(outputs)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by claudio9russo7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant