updates
This commit is contained in:
parent
be2c70106b
commit
585f2e2cc1
|
@ -40,7 +40,7 @@ def detect(
|
|||
# Set Dataloader
|
||||
if webcam:
|
||||
save_images = False
|
||||
dataloader = LoadWebcam(images, img_size=img_size)
|
||||
dataloader = LoadWebcam(img_size=img_size)
|
||||
else:
|
||||
dataloader = LoadImages(images, img_size=img_size)
|
||||
|
||||
|
@ -50,7 +50,7 @@ def detect(
|
|||
|
||||
for i, (path, img, im0) in enumerate(dataloader):
|
||||
t = time.time()
|
||||
print("%g/%g '%s': " % (i + 1, len(dataloader), path), end='')
|
||||
print("%g/%g '%s': " % (i + 1, len(dataloader), path if not webcam else 'webcam'), end='')
|
||||
save_path = os.path.join(output, path.split('/')[-1])
|
||||
|
||||
# Get detections
|
||||
|
|
|
@ -56,7 +56,7 @@ class LoadImages: # for inference
|
|||
|
||||
|
||||
class LoadWebcam: # for inference
|
||||
def __init__(self, path, img_size=416):
|
||||
def __init__(self, img_size=416):
|
||||
self.cam = cv2.VideoCapture(0)
|
||||
self.nF = 9999 # number of image files
|
||||
self.height = img_size
|
||||
|
|
Loading…
Reference in New Issue