You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Mr.Hu,
Step-g) How to make inference on images based on a trained model
Test on other images: (e.g. sample_inputs/a.png)
python2 fc4.py test pretrained/colorchecker_fold1and2.ckpt -1 sample_inputs/a.png
is not working with the above command. Observing the below error:
Loading image pack None
Traceback (most recent call last):
File "fc4.py", line 227, in
globals()mode
File "fc4.py", line 34, in test
data = load_data(image_pack_name.split(','))
File "/data/color_constancy/fc4/data_provider.py", line 23, in load_data
with open(fn) as f:
TypeError: coercing to Unicode: need string or buffer, NoneType found
Please help to resolve the issue. Tried to execute with sample_inputs/a.png
Thank you..
The text was updated successfully, but these errors were encountered:
It works fine in my environment.
You can try to use pdb.set_trace() to print out input filename and see if there is any weird thing occur under your environment, so that test_external() is not able to cv2.imread the image file correctly.
Hi...
Finally able to run inference on own image using 'python3', with below change to resolve pickle load compatibility issue:
replace Line: 22 in squeeze_net.py -----> self.model = pkl.load(open(MODEL_PATH, 'r')) with
with open(MODEL_PATH, "rb") as f:
self.model = pkl.load(f, encoding="latin")
However the issue still remains with python2.
Please correct if i am missing something.
Hello Mr.Hu,
Step-g) How to make inference on images based on a trained model
Test on other images: (e.g. sample_inputs/a.png)
python2 fc4.py test pretrained/colorchecker_fold1and2.ckpt -1 sample_inputs/a.png
is not working with the above command. Observing the below error:
Loading image pack None
Traceback (most recent call last):
File "fc4.py", line 227, in
globals()mode
File "fc4.py", line 34, in test
data = load_data(image_pack_name.split(','))
File "/data/color_constancy/fc4/data_provider.py", line 23, in load_data
with open(fn) as f:
TypeError: coercing to Unicode: need string or buffer, NoneType found
Please help to resolve the issue. Tried to execute with sample_inputs/a.png
Thank you..
The text was updated successfully, but these errors were encountered: