Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
preparing final solution!
Browse files Browse the repository at this point in the history
  • Loading branch information
stazizov committed Dec 12, 2022
1 parent 38ca531 commit c15ff80
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions faster_rcnn/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_FPN_1x.yaml"))
cfg.MODEL.WEIGHTS = "model_final.pth" # path to the model we just trained
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.001 # set a custom testing threshold
cfg.SOLVER.BASE_LR = 0.00025
cfg.MODEL.DEVICE='cpu'
cfg.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE = 128
cfg.MODEL.ROI_HEADS.NUM_CLASSES = 1
cfg.SOLVER.BASE_LR = 0.00025

predictor = DefaultPredictor(cfg)

Expand All @@ -46,4 +47,5 @@
v.draw_text(str(box[:2].numpy()), tuple(box[:2].numpy()))
v = v.get_output()
img = v.get_image()[:, :, ::-1]
cv2.imwrite(args.path2save, img)
cv2.imwrite(args.path2save, img)
print("output saved at: ", args.path2save)
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
catboost
fvcore
cpbd==1.0.7
imageio==2.9.0
matplotlib==3.2.2
Expand All @@ -13,4 +14,4 @@ skimage==0.0
tqdm==4.64.1
detectron2.egg==info
torch==1.13.0+cu116

pyyaml==5.1
File renamed without changes.

0 comments on commit c15ff80

Please sign in to comment.