microsoft / RegionCLIP

[CVPR 2022] Official code for "RegionCLIP: Region-based Language-Image Pretraining"
Apache License 2.0
712 stars 52 forks source link

Can I run this on cpu #56

Closed manthansinghshekhawat closed 1 year ago

manthansinghshekhawat commented 1 year ago

I am running extract_region_feature.py and it's showing torch is not compatible with cuda I don't have cuda enabled gpu can I run this code on cpu only

YiwuZhong commented 1 year ago

This is a good question. But unfortunately, I haven't tried that before. Our codebase is built on top of Detectron2 and thus I'd recommend searching the usage of Detectron2. One quick solution is simply removing all .cuda() in the data loading and model forward, which port tensor onto GPU.