mirror of https://github.com/AlexeyAB/darknet.git
Example of usage cv2.imread() in the darknet.py
This commit is contained in:
parent
71437a936d
commit
24f563ce71
|
@ -222,9 +222,11 @@ def detect(net, meta, image, thresh=.5, hier_thresh=.5, nms=.45, debug= False):
|
|||
"""
|
||||
#pylint: disable= C0321
|
||||
im = load_image(image, 0, 0)
|
||||
#import cv2
|
||||
#custom_image = cv2.imread(image) # use: detect(,,imagePath,)
|
||||
#import scipy.misc
|
||||
#sci_image = scipy.misc.imread(image)
|
||||
#im, arr = array_to_image(sci_image) # you should comment line below: free_image(im)
|
||||
#custom_image = scipy.misc.imread(image)
|
||||
#im, arr = array_to_image(custom_image) # you should comment line below: free_image(im)
|
||||
if debug: print("Loaded image")
|
||||
num = c_int(0)
|
||||
if debug: print("Assigned num")
|
||||
|
|
|
@ -2,6 +2,7 @@ rem download Python 2.7.14 from: https://www.python.org/downloads/release/python
|
|||
rem C:\Python27\Scripts\pip install numpy
|
||||
rem C:\Python27\Scripts\pip install scikit-image
|
||||
rem C:\Python27\Scripts\pip install scipy
|
||||
rem C:\Python27\Scripts\pip install opencv-python
|
||||
|
||||
C:\Python27\python.exe darknet.py
|
||||
|
||||
|
@ -11,6 +12,7 @@ rem Python 3.6
|
|||
rem C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install numpy
|
||||
rem C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install scikit-image
|
||||
rem C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install scipy
|
||||
rem C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install opencv-python
|
||||
|
||||
rem C:\Users\Alex\AppData\Local\Programs\Python\Python36\python.exe darknet.py
|
||||
|
||||
|
|
|
@ -222,9 +222,11 @@ def detect(net, meta, image, thresh=.5, hier_thresh=.5, nms=.45, debug= False):
|
|||
"""
|
||||
#pylint: disable= C0321
|
||||
im = load_image(image, 0, 0)
|
||||
#import cv2
|
||||
#custom_image = cv2.imread(image) # use: detect(,,imagePath,)
|
||||
#import scipy.misc
|
||||
#sci_image = scipy.misc.imread(image)
|
||||
#im, arr = array_to_image(sci_image) # you should comment line below: free_image(im)
|
||||
#custom_image = scipy.misc.imread(image)
|
||||
#im, arr = array_to_image(custom_image) # you should comment line below: free_image(im)
|
||||
if debug: print("Loaded image")
|
||||
num = c_int(0)
|
||||
if debug: print("Assigned num")
|
||||
|
|
Loading…
Reference in New Issue