2018-08-26 08:51:39 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-02-20 22:21:42 +00:00
|
|
|
# New VM
|
2019-12-09 00:36:52 +00:00
|
|
|
rm -rf sample_data yolov3
|
2019-03-25 17:35:39 +00:00
|
|
|
git clone https://github.com/ultralytics/yolov3
|
2020-04-21 19:31:37 +00:00
|
|
|
# git clone -b test --depth 1 https://github.com/ultralytics/yolov3 test # branch
|
2020-02-03 07:35:03 +00:00
|
|
|
# sudo apt-get install zip
|
2020-01-04 19:36:36 +00:00
|
|
|
#git clone https://github.com/NVIDIA/apex && cd apex && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" . --user && cd .. && rm -rf apex
|
2019-12-09 00:34:01 +00:00
|
|
|
sudo conda install -yc conda-forge scikit-image pycocotools
|
2020-03-16 22:36:56 +00:00
|
|
|
# python3 -c "from yolov3.utils.google_utils import gdrive_download; gdrive_download('193Zp_ye-3qXMonR1nZj3YyxMtQkMy50k','coco2014.zip')"
|
|
|
|
python3 -c "from yolov3.utils.google_utils import gdrive_download; gdrive_download('1WQT6SOktSe8Uw6r10-2JhbEhMY5DJaph','coco2017.zip')"
|
2020-02-03 07:35:03 +00:00
|
|
|
python3 -c "from yolov3.utils.google_utils import gdrive_download; gdrive_download('1C3HewOG9akA3y456SZLBJZfNDPkBwAto','knife.zip')"
|
|
|
|
python3 -c "from yolov3.utils.google_utils import gdrive_download; gdrive_download('13g3LqdpkNE8sPosVJT6KFXlfoMypzRP4','sm4.zip')"
|
2020-02-21 23:11:11 +00:00
|
|
|
sudo shutdown
|
2019-02-20 22:21:42 +00:00
|
|
|
|
2020-01-02 06:44:21 +00:00
|
|
|
# Mount local SSD
|
|
|
|
lsblk
|
|
|
|
sudo mkfs.ext4 -F /dev/nvme0n1
|
|
|
|
sudo mkdir -p /mnt/disks/nvme0n1
|
|
|
|
sudo mount /dev/nvme0n1 /mnt/disks/nvme0n1
|
|
|
|
sudo chmod a+w /mnt/disks/nvme0n1
|
2020-01-02 20:39:20 +00:00
|
|
|
cp -r coco /mnt/disks/nvme0n1
|
2020-01-02 06:44:21 +00:00
|
|
|
|
2020-01-18 01:52:28 +00:00
|
|
|
# Kill All
|
2020-04-21 19:31:37 +00:00
|
|
|
t=ultralytics/yolov3:v1
|
2020-01-14 06:19:45 +00:00
|
|
|
docker kill $(docker ps -a -q --filter ancestor=$t)
|
2020-01-27 21:08:20 +00:00
|
|
|
|
|
|
|
# Evolve coco
|
|
|
|
sudo -s
|
2020-02-21 23:11:11 +00:00
|
|
|
t=ultralytics/yolov3:evolve
|
|
|
|
# docker kill $(docker ps -a -q --filter ancestor=$t)
|
|
|
|
for i in 0 1 6 7
|
2020-01-27 21:08:20 +00:00
|
|
|
do
|
2020-01-29 18:30:13 +00:00
|
|
|
docker pull $t && docker run --gpus all -d --ipc=host -v "$(pwd)"/coco:/usr/src/coco $t bash utils/evolve.sh $i
|
2020-02-03 07:35:03 +00:00
|
|
|
sleep 30
|
2020-01-14 06:19:45 +00:00
|
|
|
done
|
2019-12-21 20:00:16 +00:00
|
|
|
|
2020-04-21 19:31:37 +00:00
|
|
|
#COCO training
|
2020-04-28 22:06:33 +00:00
|
|
|
n=131 && t=ultralytics/coco:v131 && sudo docker pull $t && sudo docker run -it --gpus all --ipc=host -v "$(pwd)"/coco:/usr/src/coco $t python3 train.py --data coco2014.data --img-size 320 640 --epochs 300 --batch 16 --weights '' --device 0 --cfg yolov3-spp.cfg --bucket ult/coco --name $n && sudo shutdown
|
|
|
|
n=132 && t=ultralytics/coco:v131 && sudo docker pull $t && sudo docker run -it --gpus all --ipc=host -v "$(pwd)"/coco:/usr/src/coco $t python3 train.py --data coco2014.data --img-size 320 640 --epochs 300 --batch 64 --weights '' --device 0 --cfg yolov3-tiny.cfg --bucket ult/coco --name $n && sudo shutdown
|