Closed no251-1 closed 1 year ago
https://towhee.io/image-decode/cv2
ops.image_decode.cv2 ()
decodes to BGR
by default and ops.image_decode.cv2 ('rgb')
decodes to RGB
thanks. It works when i add 'rgb' into ops.image_decode('rgb')
.
p_embed = (
pipe.input('src')
.flat_map('src', 'img_path', load_image)
.map('img_path', 'img', ops.image_decode('rgb'))
.map('img', 'vec', ops.image_embedding.timm(model_name=MODEL, device=DEVICE))
)
but for the code below, i still don't know how to solve it.
p_search_img = (
p_search_pre.map('pred', 'pred images', read_images)
.output('img', 'pred images')
)
DataCollection(p_search_img('test/goldfish/*.JPEG')).show()
How do you define read_images, the rgb configuration should be set here.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Close the stale issues and pull requests after 7 days of inactivity. Reopen the issue with /reopen
.
Is there an existing issue for this?
Current Behavior
The color of image was wrong.
Here is the code.
here is the original image.
Expected Behavior
No response
Steps To Reproduce
No response
Environment
Anything else?
I don't know why. Maybe it is related with my computer or CV2.