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

how to take inference on multiple threads? #244

Open
hamza-projectz opened this issue May 11, 2023 · 0 comments
Open

how to take inference on multiple threads? #244

hamza-projectz opened this issue May 11, 2023 · 0 comments

Comments

@hamza-projectz
Copy link

I tried with loading model with multiple objects. The model have been loaded but failed to take inference as given below:
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/projectz-pc8/anaconda3/envs/orion_tadgan/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/home/projectz-pc8/anaconda3/envs/orion_tadgan/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/media/projectz-pc8/Development/Hamza/violation_detection/violation_detection_app/views.py", line 104, in gen_2_with_inference
container_2 = violation_detection(frame2, container_2)
File "/media/projectz-pc8/Development/Hamza/violation_detection/rtsp_inference.py", line 126, in main
detection_class = class_pred(video_full_path, container['model'])
File "/media/projectz-pc8/Development/Hamza/violation_detection/video_classification.py", line 34, in main
res = mmaction2(**call_args)
File "/media/projectz-pc8/Development/Hamza/violation_detection/mmaction/apis/inferencers/mmaction2_inferencer.py", line 161, in call
preds = self.forward(ori_inputs, batch_size, **forward_kwargs)
File "/media/projectz-pc8/Development/Hamza/violation_detection/mmaction/apis/inferencers/mmaction2_inferencer.py", line 93, in forward
predictions = self.actionrecog_inferencer(
File "/media/projectz-pc8/Development/Hamza/violation_detection/mmaction/apis/inferencers/actionrecog_inferencer.py", line 126, in call
return super().call(
File "/home/projectz-pc8/anaconda3/envs/orion_tadgan/lib/python3.8/site-packages/mmengine/infer/infer.py", line 216, in call
for data in track(inputs, description='Inference'):
File "/home/projectz-pc8/anaconda3/envs/orion_tadgan/lib/python3.8/site-packages/rich/progress.py", line 167, in track
with progress:
File "/home/projectz-pc8/anaconda3/envs/orion_tadgan/lib/python3.8/site-packages/rich/progress.py", line 1169, in enter
self.start()
File "/home/projectz-pc8/anaconda3/envs/orion_tadgan/lib/python3.8/site-packages/rich/progress.py", line 1160, in start
self.live.start(refresh=True)
File "/home/projectz-pc8/anaconda3/envs/orion_tadgan/lib/python3.8/site-packages/rich/live.py", line 113, in start
self.console.set_live(self)
File "/home/projectz-pc8/anaconda3/envs/orion_tadgan/lib/python3.8/site-packages/rich/console.py", line 835, in set_live
raise errors.LiveError("Only one live display may be active at once")
rich.errors.LiveError: Only one live display may be active at once

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

1 participant