Skip to content
New issue

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

Read image Error failed #224

Open
charlottte opened this issue Aug 3, 2023 · 9 comments
Open

Read image Error failed #224

charlottte opened this issue Aug 3, 2023 · 9 comments
Assignees

Comments

@charlottte
Copy link

2023-08-03 14:01:57,823 - 139852063110912 - image_decode_cv2.py-image_decode_cv2:40 - ERROR: Download image from http://904d20239a385ec9.jpg failed, error msg: {"Code":"NoSuchURL","Msg":"The specified URL does not exist."}, request code: 404
2023-08-03 14:01:57,823 - 139852063110912 - image_decode_cv2.py-image_decode_cv2:68 - ERROR: Read image http://
/904d20239a385ec9.jpg failed
when i use pipe to get image feature,if the url link failure,The pipe program will jam without export nothing
image

@junjiejiangjjj
Copy link
Contributor

You can use pstack or strace to see where the program is hanging

@charlottte
Copy link
Author

i find the function drop_emtpy in the Early version,but i don't know how to use it in the latest version,how to use it with pipe

@junjiejiangjjj
Copy link
Contributor

If an error occurs during execution, it will raise an exception. If you want to ignore the exception, you just need to catch it

try:
     # run pipeline
except:
    pass

@charlottte
Copy link
Author

Sorry, let me rephrase my question. I currently have a CSV file with URLs of images and their corresponding text descriptions. I would to extract features from both the images and text, then merge, and finally store them in a database. However, I am facing a few issues. Firstly, when reading the URLs, some of them may be failure. How can I implement handling to continue the program execution? Secondly, how can I perform batch processing? Are there any relevant examples available?

@junjiejiangjjj
Copy link
Contributor

The pipeline running error will only throw exceptions but won't hang, so we need to check the cause of the hang

@junjiejiangjjj
Copy link
Contributor

https://towhee.io/data-source/csv-reader Here are some examples related to processing CSV and Batch

@charlottte
Copy link
Author

thanks a lot!I've solved the hanging problem。BUT there is another questions,when i use batch, the Processing is not speeding up,can batch use with gpu ,is there any example

@junjiejiangjjj
Copy link
Contributor

You can use the debug interface to see where the performance bottleneck is, https://towhee.readthedocs.io/en/latest/debug/usage.html#usage

@junjiejiangjjj
Copy link
Contributor

The slowness could be caused by the image downloading and decoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants