mseg-dataset / mseg-semantic

An Official Repo of CVPR '20 "MSeg: A Composite Dataset for Multi-Domain Segmentation"
MIT License
460 stars 78 forks source link

Added cuda checks to enable inference via the universal demo #7

Open Jrokisky opened 4 years ago

Jrokisky commented 4 years ago

Hi all, I added some conditionals around the cuda calls to enable some inference via cpu. The changes made allowed me to successfully run:

python -u mseg_semantic/tool/universal_demo.py   --config=mseg_semantic/config/test/default_config_360_ss.yaml   model_name mseg-3m   model_path ./mseg-3m-480p.pth input_file $IMAGE
johnwlambert commented 4 years ago

thanks very much for this contribution @Jrokisky , I've been meaning to add the cpu inference support. I'm traveling the next few days but will double check the integration tests when I get back and try to get this merged in by early next week

Jrokisky commented 4 years ago

@johnwlambert Sounds good. Thanks for sharing your work in such an easy to use way!