greenhouse/utils/gcp.sh

54 lines
1.7 KiB
Bash
Raw Normal View History

2018-08-26 10:51:39 +02:00
#!/usr/bin/env bash
2019-02-20 23:21:42 +01:00
# New VM
2019-03-25 18:35:39 +01:00
git clone https://github.com/ultralytics/yolov3
2019-02-20 23:21:42 +01:00
bash yolov3/data/get_coco_dataset.sh
2019-03-25 18:35:39 +01:00
bash yolov3/weights/download_yolov3_weights.sh && cp -r yolov3/weights weights
git clone https://github.com/cocodataset/cocoapi && cd cocoapi/PythonAPI && make && cd ../.. && cp -r cocoapi/PythonAPI/pycocotools yolov3
sudo reboot now
2019-02-20 23:21:42 +01:00
2019-03-22 17:53:06 +02:00
# Train
2019-03-18 00:59:24 +02:00
sudo rm -rf yolov3 && git clone https://github.com/ultralytics/yolov3
cp -r weights yolov3
2019-03-25 18:35:39 +01:00
cd yolov3 && python3 train.py --batch-size 24 --epochs 1
2019-03-22 15:08:03 +02:00
sudo shutdown
2018-08-26 10:51:39 +02:00
# Resume
python3 train.py --resume
2018-08-26 10:51:39 +02:00
# Detect
2019-03-22 17:53:06 +02:00
python3 detect.py
2018-08-26 10:51:39 +02:00
2019-03-22 17:53:06 +02:00
# Clone a branch
sudo rm -rf yolov3 && git clone -b multi_gpu --depth 1 https://github.com/ultralytics/yolov3
cp -r weights yolov3
2019-03-25 18:35:39 +01:00
cd yolov3 && python3 train.py --batch-size 24 --epochs 1
sudo shutdown
# Git pull branch
git pull https://github.com/ultralytics/yolov3 multi_gpu
2018-09-04 14:36:51 +02:00
# Test
2019-02-26 15:12:21 +01:00
sudo rm -rf yolov3 && git clone https://github.com/ultralytics/yolov3
sudo rm -rf cocoapi && git clone https://github.com/cocodataset/cocoapi && cd cocoapi/PythonAPI && make && cd ../.. && cp -r cocoapi/PythonAPI/pycocotools yolov3
cd yolov3 && python3 test.py --save-json --conf-thres 0.001 --img-size 416
2018-09-10 16:41:02 +02:00
2019-03-22 17:53:06 +02:00
# Test Darknet training
python3 test.py --img_size 416 --weights ../darknet/backup/yolov3.backup
2018-12-04 19:17:03 +01:00
2019-03-22 17:53:06 +02:00
# Download with wget
2018-11-07 15:17:00 +01:00
wget https://storage.googleapis.com/ultralytics/yolov3.pt -O weights/latest.pt
2018-10-09 19:22:33 +02:00
2018-11-07 15:17:00 +01:00
# Copy latest.pt to bucket
gsutil cp yolov3/weights/latest1gpu.pt gs://ultralytics
2018-11-13 11:20:01 +00:00
# Copy latest.pt from bucket
gsutil cp gs://ultralytics/latest.pt yolov3/weights/latest.pt
2018-12-03 15:42:10 +01:00
wget https://storage.googleapis.com/ultralytics/latest.pt
2018-11-13 11:20:01 +00:00
2019-03-22 17:53:06 +02:00
# Trade Studies
sudo rm -rf yolov3 && git clone https://github.com/ultralytics/yolov3
cp -r weights yolov3
cd yolov3 && python3 train.py --batch-size 16 --epochs 1
2018-11-27 18:43:46 +01:00
sudo shutdown