diff --git a/detect.py b/detect.py index 8603ed9f..5b6c3ea3 100755 --- a/detect.py +++ b/detect.py @@ -18,7 +18,7 @@ parser.add_argument('-txt_out', type=bool, default=False) parser.add_argument('-cfg', type=str, default='cfg/yolov3.cfg', help='cfg file path') parser.add_argument('-class_path', type=str, default='data/coco.names', help='path to class label file') -parser.add_argument('-conf_thres', type=float, default=0.9, help='object confidence threshold') +parser.add_argument('-conf_thres', type=float, default=0.98, help='object confidence threshold') parser.add_argument('-nms_thres', type=float, default=0.45, help='iou threshold for non-maximum suppression') parser.add_argument('-batch_size', type=int, default=1, help='size of the batches') parser.add_argument('-img_size', type=int, default=32 * 13, help='size of each image dimension') diff --git a/test.py b/test.py index 7252e291..5ff81729 100644 --- a/test.py +++ b/test.py @@ -11,7 +11,7 @@ parser.add_argument('-weights_path', type=str, default='checkpoints/yolov3.weigh parser.add_argument('-class_path', type=str, default='data/coco.names', help='path to class label file') parser.add_argument('-iou_thres', type=float, default=0.5, help='iou threshold required to qualify as detected') parser.add_argument('-conf_thres', type=float, default=0.5, help='object confidence threshold') -parser.add_argument('-nms_thres', type=float, default=0.4, help='iou threshold for non-maximum suppression') +parser.add_argument('-nms_thres', type=float, default=0.45, help='iou threshold for non-maximum suppression') parser.add_argument('-n_cpu', type=int, default=0, help='number of cpu threads to use during batch generation') parser.add_argument('-img_size', type=int, default=416, help='size of each image dimension') parser.add_argument('-use_cuda', type=bool, default=True, help='whether to use cuda if available') diff --git a/utils/gcp.sh b/utils/gcp.sh index ed1d189c..63bb2f55 100644 --- a/utils/gcp.sh +++ b/utils/gcp.sh @@ -14,9 +14,10 @@ python3 detect.py python3 test.py -img_size 416 -weights_path checkpoints/yolov3.weights +# Download and Test sudo rm -rf yolov3 && git clone https://github.com/ultralytics/yolov3 cd yolov3 cd checkpoints wget https://pjreddie.com/media/files/yolov3.weights cd .. -python3 test.py -img_size 416 -weights_path checkpoints/yolov3.weights +python3 test.py -img_size 416 -weights_path checkpoints/backup5.pt -nms_thres 0.45