|
|
@ -313,7 +313,7 @@ netMain = None |
|
|
|
metaMain = None |
|
|
|
metaMain = None |
|
|
|
altNames = None |
|
|
|
altNames = None |
|
|
|
|
|
|
|
|
|
|
|
def performDetect(imagePath="data/dog.jpg", thresh= 0.25, configPath = "./cfg/yolov3.cfg", weightPath = "yolov3.weights", metaPath= "./cfg/coco.data", showImage= True, makeImageOnly = False, initOnly= False): |
|
|
|
def performDetect(imagePath="data/dog.jpg", thresh= 0.25, configPath = "./cfg/yolov4.cfg", weightPath = "yolov4.weights", metaPath= "./cfg/coco.data", showImage= True, makeImageOnly = False, initOnly= False): |
|
|
|
""" |
|
|
|
""" |
|
|
|
Convenience function to handle the detection and returns of objects. |
|
|
|
Convenience function to handle the detection and returns of objects. |
|
|
|
|
|
|
|
|
|
|
@ -456,7 +456,7 @@ def performDetect(imagePath="data/dog.jpg", thresh= 0.25, configPath = "./cfg/yo |
|
|
|
print("Unable to show image: "+str(e)) |
|
|
|
print("Unable to show image: "+str(e)) |
|
|
|
return detections |
|
|
|
return detections |
|
|
|
|
|
|
|
|
|
|
|
def performBatchDetect(thresh= 0.25, configPath = "./cfg/yolov3.cfg", weightPath = "yolov3.weights", metaPath= "./cfg/coco.data", hier_thresh=.5, nms=.45, batch_size=3): |
|
|
|
def performBatchDetect(thresh= 0.25, configPath = "./cfg/yolov4.cfg", weightPath = "yolov4.weights", metaPath= "./cfg/coco.data", hier_thresh=.5, nms=.45, batch_size=3): |
|
|
|
import cv2 |
|
|
|
import cv2 |
|
|
|
import numpy as np |
|
|
|
import numpy as np |
|
|
|
# NB! Image sizes should be the same |
|
|
|
# NB! Image sizes should be the same |
|
|
|