티스토리 뷰
MonoFlex는 3D object detection의 한 모델이다.
SMOKE보다 약간 느린 실행 속도를 가지고 있지만 정확도는 더 높다.
자 이제 build를 시작해보지!
https://github.com/zhangyp15/MonoFlex
GitHub - zhangyp15/MonoFlex: Released code for Objects are Different: Flexible Monocular 3D Object Detection, CVPR21
Released code for Objects are Different: Flexible Monocular 3D Object Detection, CVPR21 - GitHub - zhangyp15/MonoFlex: Released code for Objects are Different: Flexible Monocular 3D Object Detectio...
github.com
1. git clone
git clone https://github.com/zhangyp15/MonoFlex.git
2. package 설치
python3 -m pip install torch==1.4.0 torchvision==0.5.0
python3 -m pip -r requirement.txt
아, torch랑 torchvision 빼고 requirement.txt로 설치할 package들이 정리되어있으니 넘편하다..
Error1) ModuleNotFoundError: No module named 'skbuild'
Solution) python3 -m pip install --upgrade pip
Error2) inplace_abn 설치 중 ValueError: Unknown CUDA arch (8.6) or GPU not supported
Solution) CUDA_VISIBLE_DEVICES=로 CUDA version 10.1 지원하는 GPU로 설정해줌.
3. Build DCNv2
cd model/backbone/DCNv2
vim make.sh : python --> python3 로 고쳐줌. 나는... python default가 python2라 그냥 python3을 쓸 때는 python3을 입력하는 편..
. make.sh
cd ../../..
python3 setup.py develop
+) 참고로 나는 main GPU가 RTX 3090이라 웬만한 모든 command를 실행할 때 CUDA_VISIBLE_DEVICES=Nubmer 를 붙여주었다. 물론 그냥 아예 shell의src file에 써둬도 되지만 그리 귀찮지 않기 때문에 그냥 그때그때 입력하는걸로...
4. Data 경로 설정
Documents에 root라고 되어있어서 저 root가 뭐지 하고 찾아보니 config/paths_catalog.py에
DATA_DIR과 DATASETS을 설정할 수 있게 되어 있었다.
이 경로를 나 편하게 고쳐주고 나서 Kitti dataset을 연결해주었다.
ln -s /workspace/Kitti/object/testing [내가 설정한 경로]
ln -s /workspace/Kitti/object/training [내가 설정한 경로]
5. Training
CUDA_VISIBLE_DEVICES=2 python3 tools/plain_train_net.py --batch_size 8 --config runs/monoflex.yaml --output output/exp
Error1) ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Solution) apt-get install libgl1-mesa-glx
Training은 다행히 별 탈 없이 진행되었다.
끄읏.
이 아니라 evaluation까지 해보자..
6. Evaluation
CUDA_VISIBLE_DEVICES=2 python tools/plain_train_net.py --config runs/monoflex.yaml --ckpt output/exp/model_final.pth --eval
Error1) 사실 error라기 보다 잘못된 결과가 나온다. AP가 싹다 0이 나오는 대 참사.. 왜그럴까? 이건 내 잘못이라기보다 코드가 어디가 이상한가? 왜지? ㅇㅅㅇ... 코드를 살펴서 고쳐야할 것 같다.
Solution)
'이것저것 자료 > 그 외' 카테고리의 다른 글
[Open-source build] MonoDLE build 하기 (0) | 2021.10.13 |
---|---|
[Open-source build] GUPnet build 하기 (0) | 2021.10.13 |
[Open-source build] SMOKE build 하기 (0) | 2021.10.12 |
[Open-source build] M3DSSD build 하기 (0) | 2021.09.24 |
[Apollo] Apollo 설치 command (0) | 2021.09.15 |
- Total
- Today
- Yesterday
- PIP
- CUDA
- docker
- 파이썬
- torch
- 백트래킹
- 다익스트라
- 카카오
- tensorflow
- BFS
- 백준
- LGSVL
- Python
- 코딩테스트
- 최소신장트리
- 프로그래머스
- notfound
- 이것이코딩테스트다
- 설치
- pytorch
- matplotlib
- shellscript
- torchscript
- 동적프로그래밍
- 설치하기
- version
- dfs
- error
- numpy
- n과m
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |