Refactor test.py arguments (#3558)
* remove opt from test() * pass kwargs * update comments * revert accidental default change * multiple --img options * add comments
This commit is contained in:
1 parent
c6deb73a89
commit
a9553c04a7
2 files changed
+19
-29
No files matched your search
@@ -33,7 +33,7 @@ def detect(opt):
|
||||
# Load model
|
||||
model = attempt_load(weights, map_location=device) # load FP32 model
|
||||
stride = int(model.stride.max()) # model stride
|
||||
imgsz = check_img_size(imgsz, s=stride) # check img_size
|
||||
imgsz = check_img_size(imgsz, s=stride) # check image size
|
||||
names = model.module.names if hasattr(model, 'module') else model.names # get class names
|
||||
if half:
|
||||
model.half() # to FP16
|
||||
|
||||
Reference in new issue
Block a user