We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
with latest labelme_json_to_dataset.py script and the .exe as well
windows 10
script fails with 'data type must be np.uint8' the problem is solved by adding this code before label2rgb():
import numpy as np
img = imgviz.asgray(img)
if img.dtype != np.uint8: img = (img/(np.max(img)/256)).astype('uint8')
lbl_viz = imgviz.label2rgb( lbl, img, label_names=label_names, loc="rb" )
the script should be able to handle mono 16-bit images
run the script with a json file with a 16-bit image
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Provide environment information
with latest labelme_json_to_dataset.py script and the .exe as well
What OS are you using?
windows 10
Describe the Bug
script fails with 'data type must be np.uint8'
the problem is solved by adding this code before label2rgb():
import numpy as np
asgray does NOT convert mono (gray) 16-bits to 8-bits
so do it here:
Expected Behavior
the script should be able to handle mono 16-bit images
To Reproduce
run the script with a json file with a 16-bit image
The text was updated successfully, but these errors were encountered: