Open9
Detectron2 + SparseInst / FreeSOLO / MGNet の動作環境構築
xhost +local: && \
docker run --gpus all -it --rm \
-v `pwd`:/home/user/workdir \
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \
--net=host \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e DISPLAY=$DISPLAY \
--privileged \
ghcr.io/pinto0309/openvino2tensorflow:latest
git clone https://github.com/hustvl/SparseInst.git \
&& cd SparseInst
sudo python -m pip install detectron2 -f \
https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html
wget https://download.pytorch.org/whl/cu113/torch-1.10.0%2Bcu113-cp38-cp38-linux_x86_64.whl
wget https://download.pytorch.org/whl/cu113/torchvision-0.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl
sudo pip install *.whl
sudo pip install timm
mkdir -p results
python demo.py \
--config-file configs/sparse_inst_r50_giam.yaml \
--input datasets/coco/val2017/* \
--output results \
--opt MODEL.WEIGHTS sparse_inst_r50_giam_aug_2b7d68.pth \
INPUT.MIN_SIZE_TEST 512
置き換え必要
参考メモ
- AdaptiveAvgPool2d を超適当に AvgPool2d に置き換えてとりあえず onnx 出力した様子
- FreeSOLO
cd demo
# demo.py の 43行目に下記を追記
from freesolo.modeling.solov2.pseudo_solov2 import PseudoSOLOv2
python demo.py \
--config-file ../configs/freesolo/freesolo_30k.yaml \
--input ../datasets/coco/val2017/000000001000.jpg \
--output ../outputs
python demo.py \
--config-file ../configs/freesolo/freesolo_30k.yaml \
--webcam