pytorch-auto-drive icon indicating copy to clipboard operation
pytorch-auto-drive copied to clipboard

How can i run it in a realtime image

Open stiglioglu opened this issue 3 years ago • 5 comments

How can i run it in a realtime image

stiglioglu avatar Aug 26 '22 07:08 stiglioglu

@stiglioglu We don't have camera APIs, if that is what you want.

I think your use case is similar to a video input? We have a video-inference-visualize pipeline:

https://github.com/voldemortX/pytorch-auto-drive/blob/master/docs/VISUALIZATION.md#segmentation-mask-video

voldemortX avatar Aug 26 '22 07:08 voldemortX

Thank you for your answer. I want to run on ros camera topic. How can I run on snapshot eg image from webcam.

stiglioglu avatar Aug 26 '22 07:08 stiglioglu

The general method is read the image, make the testing transforms (e.g., resize), then inference, finally apply specific post-processings. For some lane detection methods, they already have a inference() method, which includes the post-process.

An lane example is https://github.com/voldemortX/pytorch-auto-drive/blob/9ec8172481b6d38201bdc2308caadc8a5feb02f5/utils/runners/lane_det_visualizer.py#L153

voldemortX avatar Aug 26 '22 07:08 voldemortX

where do you read the video frames can you help me i couldn't find it

stiglioglu avatar Aug 26 '22 08:08 stiglioglu

where do you read the video frames can you help me i couldn't find it

We use a torch style dataloader for video reading: https://github.com/voldemortX/pytorch-auto-drive/blob/master/utils/datasets/video.py

voldemortX avatar Aug 26 '22 08:08 voldemortX