nuScenes > nuImages > samples > CAM_FRONT 데이터 확인
https://github.com/nutonomy/nuscenes-devkit
nuscenes-devkit/python-sdk/nuscenes/scripts/export_kitti.py
이용한 이미지 결과물
직접 변환 (대완 작업)
2000장 사용 결정
2435 이미지
yoloandnu
Transfer Learning1의 kitti 데이터 & nuScenes 학습
cp ~/datasets/kitti/data_object_image_2/training/image_2/*.png ~/datasets/yoloandnu/img/
cp ~/datasets/kitti/data_object_label_2/training/label_2/*.txt ~/datasets/yoloandnu/labels/
cp ~/datasets/nu_yolo/img/*.jpg ~/datasets/yoloandnu/img/
cp ~/datasets/nu_yolo/labels/*.txt ~/datasets/yoloandnu/labels/
kitti 7,481 데이터
nuScenes 2,435 데이터
kitti 데이터 & nuScenes 7,481 + 2,435
훈련 디렉터리로 복사
cp /TL/datasets/yoloandnu/img/* TL/datasets/yolo/images/
cp /TL/datasets/yoloandnu/labels/* /TL/datasets/yolo/labels/
jpg -> png 변경
yolov5 container 사용
root@eaebb6b3b151:/
python3 utils/converter.py
rm /TL/datasets/yolo/images/*.jpg
convert2Yolo
convert2Yolo container 사용
root@deb95701588a:/
python3 convert2Yolo/example.py \
--datasets KITTI \
--img_path /TL/datasets/yolo/images \
--label /TL/datasets/yoloandnu/labels \
--convert_output_path "/TL/datasets/yolo/labels" \
--img_type ".png" \
--cls_list_file ../kitti.names
train.txt test.txt 생성
train : val = 8924 : 992
python3 utils/split.py
yolov5
yolov5 container 사용
root@eaebb6b3b151:/
python3 \
train.py \
--img 640 \
--batch 16 \
--epochs 30 \
--data /TL/datasets/yolo/kitti.yaml \
--cfg models/yolov5s.yaml \
--name yoloandnu
tl
Transfer Learning1의 kitti 데이터의 Car, Pedestrian 제거 후 학습
cp /TL/datasets/kitti/data_object_label_2/training/label_2/*.txt \
/TL/datasets/kitti_no_car_ped/label_2
python3 utils/exclude.py
제거 전 | 제거 후 |
---|---|
kitti 데이터 & nuScenes 7,481 + 2,435
cp /TL/datasets/kitti_no_car_ped/label_2/*.txt \
> /TL/datasets/yoloandnu_no/labels
cp /TL/datasets/nu_yolo/labels/*.txt \
> /TL/datasets/yoloandnu_no/labels/
convert2Yolo
yolo_path="/TL/datasets"
python3 convert2Yolo/example.py \
--datasets KITTI \
--img_path /TL/datasets/yolo/images \
--label "$yolo_path/yoloandnu_no/labels" \
--convert_output_path "$yolo_path/yolo/labels" \
--img_type ".png" \
--cls_list_file ../kitti.names
yolov5
Doncare가 없으므로 .yaml nc 8
로 수정
python3 \
train.py \
--img 640 \
--batch 16 \
--epochs 30 \
--data /TL/datasets/yolo/kitti.yaml \
--cfg models/yolov5s.yaml \
--name yoloandnu_no