updates
This commit is contained in:
parent
ff04315f96
commit
300e2b5dfc
2
test.py
2
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.45, help='iou threshold for non-maximum suppression')
|
||||
parser.add_argument('-nms_thres', type=float, default=0.4, 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')
|
||||
|
|
|
@ -12,3 +12,11 @@ python3 detect.py
|
|||
|
||||
# Test
|
||||
python3 test.py -img_size 416 -weights_path checkpoints/yolov3.weights
|
||||
|
||||
|
||||
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
|
||||
|
|
|
@ -99,7 +99,7 @@ def ap_per_class(tp, conf, pred_cls, target_cls):
|
|||
tp, conf, pred_cls = tp[i], conf[i], pred_cls[i]
|
||||
|
||||
# Find unique classes
|
||||
unique_classes = target_cls# np.unique(np.concatenate((pred_cls, target_cls), 0))
|
||||
unique_classes = np.unique(np.concatenate((pred_cls, target_cls), 0))
|
||||
|
||||
# Create Precision-Recall curve and compute AP for each class
|
||||
ap = []
|
||||
|
|
Loading…
Reference in New Issue