NVIDIA-AI-IOT / nanosam

A distilled Segment Anything (SAM) model capable of running real-time with NVIDIA TensorRT
Apache License 2.0
616 stars 52 forks source link

Does it support multi-target real-time detection and segmentation? #3

Open HaoqianSong opened 11 months ago

HaoqianSong commented 11 months ago

Hi, Thanks for your great work! I have successfully run your example 4. The camera can collect and segment a single person in real time, but I do not know whether it supports real-time detection and segmentation of multiple people.

jaybdub commented 11 months ago

Hi @yangguanghaiann ,

Thanks for the feedback!

Currently example 4 assumes one person in the scene, but I'll try to update it soon to handle multiple detections.

While the image encoder only needs to run once per detection, the mask decoder needs to run for each mask you want to generate. So depending on the number of masks generated, the framerate may vary.

That said, it may still run real-time for a certain number of people.

Hope this helps.

John