-
Notifications
You must be signed in to change notification settings - Fork 29
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
How to get list of image paths into dali pipeline? #238
Comments
Hey @Skier23 Could you tell more about the use-case you have? Why don't you want to just send the files' data instead of filepaths? |
My usecase is this: |
Unfortunately it's not possible in DALI itself right now. The only solution that comes to my mind is using another model to read the video files from disk. You can use a Python backend to run a script that would read file (without decoding it) and return it as output. It would be passed through an ensemble to the DALI model that can use video input or video decoder to decode video file from memory. Here we have an example of using the video decoder in DALI backend: https://github.com/triton-inference-server/dali_backend/tree/main/docs/examples/video_decoding And the video input: https://github.com/triton-inference-server/dali_backend/tree/main/docs/examples/video_decode_remap Video input can be used to process the video file part by part (generating multiple responses for a single video file) |
That's an approach I was wondering about. On that approach, would reading the whole video in (keeping it encoded) and passing it to the DALI pipeline be more overhead? Or in other words, if I were to read a video in directly from DALI and then I select frames from various timestamps in the video, would DALI load the entire video into memory and then decode it or only load data at the selected time stamps? |
I'm looking to do something like this:
However, this code has an error:
The argument
files
for operatorFile
should not be aDataNode
but a str or list of strThis seems to be because fn.readers.file doesn't support a DataNode which is returned by external_source. So in this case, how would I get the underlying list of strings that external_source contains to fn.readers.file so it can read in all those images?
The text was updated successfully, but these errors were encountered: