-
-
Save amankharwal/4c17f9f890b375259c961f5524642571 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cvNet = cv2.dnn.readNetFromCaffe('weights.caffemodel') | |
def getJSON(filePathandName): | |
with open(filePathandName,'r') as f: | |
return json.load(f) | |
def adjust_gamma(image, gamma=1.0): | |
invGamma = 1.0 / gamma | |
table = np.array([((i / 255.0) ** invGamma) * 255 for i in np.arange(0, 256)]) | |
return cv2.LUT(image.astype(np.uint8), table.astype(np.uint8)) |
error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-q3d_8t8e\opencv\modules\dnn\src\caffe\caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "weights.caffemodel" in function 'cv::dnn::ReadProtoFromTextFile'
how to deal with this error
OpenCV(4.1.2) /io/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "weights.caffemodel" in function 'ReadProtoFromTextFile'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First line shows an error
error: OpenCV(4.1.2) /io/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "weights.caffemodel" in function 'ReadProtoFromTextFile'