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

[question]: Multiple inference for single frame #161

Open
ManishAwale opened this issue Oct 25, 2024 · 4 comments
Open

[question]: Multiple inference for single frame #161

ManishAwale opened this issue Oct 25, 2024 · 4 comments

Comments

@ManishAwale
Copy link

While using process.json file, setting the inputs in inference_input field for frame data is working for single inference in a frame.
I want to run multiple inferences for each detected objects of a frame as my model doesn't support batch processing. Can this be achieved using process.json file? Does inference_input supports list of inputs for multiple inferences?

@miguelaeh
Copy link
Collaborator

Yes, you can simply add multiple stages to your pipeline, each stage will have a process.json and will run inference on every frame

@ManishAwale
Copy link
Author

Does this mean for every object detected from previous stage, i need to add stages dynamically?
what i am trying to do is: first stage detects objects in each frame. In second stage, for every detected objects, i need to run my model individually. For e.g. if 4 objects are detected, i need to run inference 4 times individually and add them as a final frame output.

I can do this in a process.py using a loop. But process.py doesn't allow me to run onnx model in CUDAExecutionProvider. So, I wanted to know if this is possible using process.json

@miguelaeh
Copy link
Collaborator

Oh, I understand it now. That cannot be achieved with process.json right now. You would need to do it using a python file. Why you can't run the model with CUDA execution provider?

@ManishAwale
Copy link
Author

While running the ONNX model with CUDA execution provider, it is showing segmentation fault and failing during initialization itself

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