Skip to content

Commit

Permalink
Change thres and thresh arguments to threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
Agustin Castro committed Aug 22, 2022
1 parent 1ef4d5f commit b2b8d0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demos/yolov7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Simplest possible example of tracking. Based on [Yolov7](https://github.com/Wong
```bash
python demo.py --help
```
Bonus: Use additional arguments `--detector-path`, `--img-size`, `--iou-thres`,`--conf-thres`, `--classes`, `--track-points` as you wish.
Bonus: Use additional arguments `--detector-path`, `--img-size`, `--iou-threshold`,`--conf-threshold`, `--classes`, `--track-points` as you wish.


## Explanation
Expand Down
8 changes: 4 additions & 4 deletions demos/yolov7/src/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def yolo_detections_to_norfair_detections(
parser.add_argument("files", type=str, nargs="+", help="Video files to process")
parser.add_argument("--detector-path", type=str, default="/yolov7.pt", help="YOLOv7 model path")
parser.add_argument("--img-size", type=int, default="720", help="YOLOv7 inference size (pixels)")
parser.add_argument("--conf-thres", type=float, default="0.25", help="YOLOv7 object confidence threshold")
parser.add_argument("--iou-thresh", type=float, default="0.45", help="YOLOv7 IOU threshold for NMS")
parser.add_argument("--conf-threshold", type=float, default="0.25", help="YOLOv7 object confidence threshold")
parser.add_argument("--iou-threshold", type=float, default="0.45", help="YOLOv7 IOU threshold for NMS")
parser.add_argument("--classes", nargs="+", type=int, help="Filter by class: --classes 0, or --classes 0 2 3")
parser.add_argument("--device", type=str, default=None, help="Inference device: 'cpu' or 'cuda'")
parser.add_argument("--track-points", type=str, default="centroid", help="Track points: 'centroid' or 'bbox'")
Expand All @@ -174,8 +174,8 @@ def yolo_detections_to_norfair_detections(
for frame in video:
yolo_detections = model(
frame,
conf_threshold=args.conf_thres,
iou_threshold=args.iou_thresh,
conf_threshold=args.conf_threshold,
iou_threshold=args.iou_threshold,
image_size=args.img_size,
classes=args.classes
)
Expand Down

0 comments on commit b2b8d0d

Please sign in to comment.