From fed71d3b01b0debf56ea0cd4d5f1fc52d04da009 Mon Sep 17 00:00:00 2001 From: yakhyo Date: Sat, 2 Nov 2024 13:58:51 +0000 Subject: [PATCH] fix: Change import in detect.py --- detect.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/detect.py b/detect.py index acdf10c..074d139 100644 --- a/detect.py +++ b/detect.py @@ -11,7 +11,7 @@ from config import cfg from models.faceboxes import FaceBoxes -from utils.prior_box import PriorBox +from layers import PriorBox from utils.box_utils import decode, nms @@ -109,7 +109,7 @@ def parse_args(): parser.add_argument( '--weights', - default='./weights/faceboxes.pth', + default='./weights/last.pth', type=str, help='Path to the trained model state dict file.' ) @@ -122,13 +122,13 @@ def parse_args(): parser.add_argument('--image-path', type=str, help='Path to the image for inference.') parser.add_argument( '--conf-threshold', - default=0.05, + default=0.02, type=float, help='Minimum confidence threshold for considering detections.' ) parser.add_argument( '--pre-nms-top-k', - default=300, + default=5000, type=int, help='Number of top bounding boxes to consider for NMS.' ) @@ -139,7 +139,7 @@ def parse_args(): type=int, help='Number of top bounding boxes to keep after NMS.' ) - parser.add_argument('--vis-threshold', default=0.15, type=float, help='Visualization threshold for bounding boxes') + parser.add_argument('--vis-threshold', default=0.6, type=float, help='Visualization threshold for bounding boxes') args = parser.parse_args() return args