Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jan 2, 2020
1 parent 77850a2 commit 2328823
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from utils.utils import *


def detect(save_txt=False, save_img=False):
def detect(save_img=False):
img_size = (320, 192) if ONNX_EXPORT else opt.img_size # (320, 192) or (416, 256) or (608, 352) for (height, width)
out, source, weights, half, view_img = opt.output, opt.source, opt.weights, opt.half, opt.view_img
out, source, weights, half, view_img, save_txt = opt.output, opt.source, opt.weights, opt.half, opt.view_img, opt.save_txt
webcam = source == '0' or source.startswith('rtsp') or source.startswith('http') or source.endswith('.txt')

# Initialize
Expand Down Expand Up @@ -167,6 +167,7 @@ def detect(save_txt=False, save_img=False):
parser.add_argument('--half', action='store_true', help='half precision FP16 inference')
parser.add_argument('--device', default='', help='device id (i.e. 0 or 0,1) or cpu')
parser.add_argument('--view-img', action='store_true', help='display results')
parser.add_argument('--save-txt', action='store_true', help='display results')
parser.add_argument('--classes', nargs='+', type=int, help='filter by class')
opt = parser.parse_args()
print(opt)
Expand Down

0 comments on commit 2328823

Please sign in to comment.