mirror of https://github.com/AlexeyAB/darknet.git
Minor fix
This commit is contained in:
parent
65506eb04a
commit
6d38218a04
|
@ -313,7 +313,7 @@ netMain = None
|
|||
metaMain = 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.
|
||||
|
||||
|
@ -456,7 +456,7 @@ def performDetect(imagePath="data/dog.jpg", thresh= 0.25, configPath = "./cfg/yo
|
|||
print("Unable to show image: "+str(e))
|
||||
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 numpy as np
|
||||
# NB! Image sizes should be the same
|
||||
|
|
|
@ -42,8 +42,8 @@ altNames = None
|
|||
def YOLO():
|
||||
|
||||
global metaMain, netMain, altNames
|
||||
configPath = "./cfg/yolov3.cfg"
|
||||
weightPath = "./yolov3.weights"
|
||||
configPath = "./cfg/yolov4.cfg"
|
||||
weightPath = "./yolov4.weights"
|
||||
metaPath = "./cfg/coco.data"
|
||||
if not os.path.exists(configPath):
|
||||
raise ValueError("Invalid config path `" +
|
||||
|
|
|
@ -313,7 +313,7 @@ netMain = None
|
|||
metaMain = 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.
|
||||
|
||||
|
@ -456,7 +456,7 @@ def performDetect(imagePath="data/dog.jpg", thresh= 0.25, configPath = "./cfg/yo
|
|||
print("Unable to show image: "+str(e))
|
||||
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 numpy as np
|
||||
# NB! Image sizes should be the same
|
||||
|
|
|
@ -42,8 +42,8 @@ altNames = None
|
|||
def YOLO():
|
||||
|
||||
global metaMain, netMain, altNames
|
||||
configPath = "./cfg/yolov3.cfg"
|
||||
weightPath = "./yolov3.weights"
|
||||
configPath = "./cfg/yolov4.cfg"
|
||||
weightPath = "./yolov4.weights"
|
||||
metaPath = "./cfg/coco.data"
|
||||
if not os.path.exists(configPath):
|
||||
raise ValueError("Invalid config path `" +
|
||||
|
|
|
@ -293,6 +293,8 @@ float gradient(float x, ACTIVATION a)
|
|||
return loggy_gradient(x);
|
||||
case RELU:
|
||||
return relu_gradient(x);
|
||||
case RELU6:
|
||||
return relu6_gradient(x);
|
||||
case NORM_CHAN:
|
||||
//return relu_gradient(x);
|
||||
case NORM_CHAN_SOFTMAX_MAXVAL:
|
||||
|
|
Loading…
Reference in New Issue