Open shen-hhao opened 1 year ago
I met the same problem on a single RTX 3090, have you solved the problem?
I met the same problem on a single RTX 3090, have you solved the problem?
I didn't try this code later because I found some alternatives. If you want to use MobileSAM, the implementation here https://github.com/IDEA-Research/Grounded-Segment-Anything/tree/main/EfficientSAM#run-grounded-mobilesam-demo is fast, and I tried on single RTX4090.
Here is my code, just adding the time check on the demo code. It seems the encoding process is far more time-consuming than expected.
When using a GPU (RTX 3090), the output is:
cuda:1 (480, 640, 3) encoding time: 2.325988531112671 decoding time: 0.018665313720703125
When using cpu, the output is:
cpu (480, 640, 3) encoding time: 0.8602027893066406 decoding time: 0.08456754684448242
The cpu even runs faster on encoding