티스토리 뷰
Camera 를 이용한 3D object detection model 중 하나인 SMOKE를 build 하고 training 시키는 과정을 기록.
SMOKE
- 현재 Baidu Apollo에서 쓰고 있는 camera object detection model
- 오직 RGB camera 만을 가지고 3d object detection을 할 수 있음(3d bbox 생성 가능)
- Real-time object detection
https://github.com/lzccccc/SMOKE
GitHub - lzccccc/SMOKE: SMOKE: Single-Stage Monocular 3D Object Detection via Keypoint Estimation
SMOKE: Single-Stage Monocular 3D Object Detection via Keypoint Estimation - GitHub - lzccccc/SMOKE: SMOKE: Single-Stage Monocular 3D Object Detection via Keypoint Estimation
github.com
1. git clone 받기
git clone https://github.com/lzccccc/SMOKE.git
2. python setup.py build develop
python3 -m pip install torch==1.3.1 torchvision==0.4.2
CUDA_VISIBLE_DEVICES=2 python3 setup.py build develop
CUDA_VISIBLE_DEVICES=2를 쓴 이유는,
ValueError: Unknown CUDA arch (8.6) or GPU not supported
라는 error가 떴는데, 나의 default GPU는 RTX 3090으로 CUDA 10.0을 support하지 않기 때문이다.
그래서 2080 Ti만을 CUDA_VISIBLE_DEVICES로 설정해주었다.
3. dataset lining
mkdir datasets
mkdir datasets/kitti
ln -s /workspace/Kitti/object/testing datasets/kitti/.
ln -s /workspace/Kitti/object/training datasets/kitti/.
그리고 datasets과 kitti folder를 만든 후 내가 다운받아놓은 Kitti data가 있는 folder와 연결해주었다.
4. 필요한 package install
python3 -m pip install yacs
python3 -m pip install pillow
python3 -m pip install scikit-image
python3 -m pip install tqdm
No module named 'yacs' ==> python3 -m pip install yacs
No module named 'PIL' ==> python3 -m pip install pillow
No module naemd 'skimage' ==> python3 -m pip install scikit-image
No module named 'tqdm' ==> python3 -m pip install tqdm
5. Training code 실행
CUDA_VISIBLE_DEVICES=1 python3 tools/plain_train_net.py --config-file "configs/smoke_gn_vector.yaml"
나는 1개의 GPU로 training을 할 거라 위 코드를 사용했다.
Github page에 가보면 multi gpu training을 위한 command도 써져있다. (아래 첨부)
CUDA_VISIBLE_DEVICES=1,2 python3 tools/plain_train_net.py --num-gpus 2 --config-file "configs/smoke_gn_vector.yaml"
(Multi gpu로 training을 하려고 할 때 TypeError: zip argument #1 must support iteration 가 나던데... issue에 같은 문제를 겪는 몇몇이 있었지만 나는 그들이 말한 방법으로 해결이 안돼서 training속도가 엄청나게 중요한 건 아니라 그냥 Single gpu환경에서 training을 하였다)
Error1) FileNotFoundError: [Errno 2] No such file or directory: 'datasets/kitti/training/ImageSets/trainval.txt'
Solution) trainval.txt, train.txt, val.txt file은 linking을 안해놓음.. linking하면 해결
Training 잘 진행되는 주웅... 25000 iter를 max iter로 했던데 언제 끝날지..!
'이것저것 자료 > 그 외' 카테고리의 다른 글
[Open-source build] GUPnet build 하기 (0) | 2021.10.13 |
---|---|
[Open-source build] MonoFlex build 하기 (0) | 2021.10.12 |
[Open-source build] M3DSSD build 하기 (0) | 2021.09.24 |
[Apollo] Apollo 설치 command (0) | 2021.09.15 |
[Apollo-LGSVL] Apollo와 LGSVL 제대로 연결해서 제대로 simulation하기 (0) | 2021.09.07 |
- Total
- Today
- Yesterday
- 백트래킹
- 동적프로그래밍
- tensorflow
- matplotlib
- LGSVL
- CUDA
- 코딩테스트
- 파이썬
- 이것이코딩테스트다
- 백준
- 다익스트라
- BFS
- notfound
- 프로그래머스
- numpy
- dfs
- docker
- version
- PIP
- 최소신장트리
- Python
- 설치
- 설치하기
- pytorch
- torchscript
- torch
- error
- n과m
- 카카오
- shellscript
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |