Create date: 2024/02/18. Test server: tesla.
Git clone this GitHub folder.
Command: git clone https://github.com/Spritea/BoxMOTS.git
Command: conda create -n myenv python=3.8
Command: conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
Command: python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.8/index.html
Because the default setting will install new version skimage 0.22, which will report error when we build this folder.
Command: pip install scikit-image==0.21
Command: python setup.py build develop
The ckpt link is updated to below in the latest AdelaiDet GitHub repo.
Command: wget https://huggingface.co/tianzhi/AdelaiDet-FCOS/resolve/main/FCOS_R_50_1x.pth?download=true -O fcos_R_50_1x.pth
The default installed latest pillow version 10.2.0 will report error AttributeError: module 'PIL.Image' has no attribute 'LINEAR'
, when we run the inference command below.
We need to install old version pillow to fix this issue.
Command: pip install pillow==9.5.0
OpenCV is needed to run the inference command below.
Command: pip install opencv-python
Follow the guidance in AdelaiDet GitHub repo to run inference. The image coco_val_0885.jpg is collected from the COCO dataset by cws. The result will appear in a pop-up window, if we run the command in MobaXterm.
Command: python demo/demo.py --config-file configs/FCOS-Detection/R_50_1x.yaml --input coco_val_0885.jpg --opts MODEL.WEIGHTS fcos_R_50_1x.pth
Follow my_code/change_detectron2
to modify/overwrite Detectron 2 package files.
Follow my_code/change_pycocotools
to modify/overwrite the pycocotools package file.
The new version rapidfuzz>=3.0.0 do not have string_metric
anymore. We need to install an older one. The rapidfuzz version on the server-4 is 2.0.11.
Command: pip install rapidfuzz==2.0.11
This GitHub issue says pip install rapidfuzz==2.15.1
also works, but I have not tried yet.