some questions about progress-cacd
Opened this issue · 3 comments
I have download the cacd dataset from the provided site. but I run the progress-cacd ,there comes some problems,
TypeError: call(): incompatible function arguments. The following argument types are supported:
1. (self: _dlib_pybind11.fhog_object_detector, image: array, upsample_num_times: int=0) -> _dlib_pybind11.rectangles
Invoked with: <_dlib_pybind11.fhog_object_detector object at 0x00000214FD970930>, None, 1。
I don't know how to fix it, please help me.
Hm that's weird. Haven't seen this before. I just ran the script and it seems to work fine for me. The software versions were
# DLIB: 19.22.0
# NumPy: 1.20.2
# OpenCV: 4.5.2
I added these to the script so when you run it it should show the current versions you have installed:
https://github.com/Raschka-research-group/coral-cnn/blob/master/datasets/image-preprocessing-code/preprocess-cacd.py
If there is a mismatch, maybe try to update and see if that solves the issue.
Thanks for reply !
I think the reason is that some names are not English so the function can not read the image
use :
stream = open(path, "rb")
bytes = bytearray(stream.read())
numpyarray = np.asarray(bytes, dtype=np.uint8)
img = cv2.imdecode(numpyarray, cv2.IMREAD_UNCHANGED)
instead of :
img = cv2.imread(os.path.join(orig_path, picture_name))