xingyizhou / CenterNet2

Two-stage CenterNet
Apache License 2.0
1.2k stars 188 forks source link

How to run projects/CenterNet2/demo.py #61

Open SHIsue opened 3 years ago

SHIsue commented 3 years ago
  1. download zip and unzip
  2. makesure your torch>=1.6
  3. open INSTALL.md and install Pre-Built Detectron2. For example, if your torch==1.6 & cuda==10.1, then run "python -m pip install detectron2 -f \ https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.6/index.html"
  4. cd CenterNet2-master
  5. python setup.py develop
  6. vim projects/CenterNet2/demo.py
  7. Comment out all cv2.imshow & cv2.nameWindow & cv2.waitkey() & cv2.destroyAllWindows() and save demo.py
  8. back to CenterNet2-master/ and run "CUDA_VISIBLE_DEVICES=5 python projects/CenterNet2/demo.py --config-file projects/CenterNet2/configs/CenterNet2_DLA-BiFPN-P3_24x.yaml --input datasets/imgs/ --opts MODEL.WEIGHTS ../models/CenterNet2_DLA-BiFPN-P3_24x.pth" (make sure you have imgs in datasets/imgs/ and download the model in models/ , Just An Example!!!!!)
shengyuan-tang commented 3 years ago

How do you find the 'CenterNet2_DLA-BiFPN-P3_24x.pth', i can't find this weights.

SHIsue commented 3 years ago

https://github.com/xingyizhou/CenterNet2/blob/master/projects/CenterNet2/centernet2_docs/MODEL_ZOO.md