Global code reformat and optimize imports
This commit is contained in:
parent
64ff05c499
commit
bf34ae007f
@ -6,13 +6,13 @@
|
|||||||
# Download labels from Google Drive, accepting presented query
|
# Download labels from Google Drive, accepting presented query
|
||||||
filename="coco2014labels.zip"
|
filename="coco2014labels.zip"
|
||||||
fileid="1s6-CmF5_SElM28r52P1OUrCcuXZN-SFo"
|
fileid="1s6-CmF5_SElM28r52P1OUrCcuXZN-SFo"
|
||||||
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
|
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" >/dev/null
|
||||||
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
|
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=$(awk '/download/ {print $NF}' ./cookie)&id=${fileid}" -o ${filename}
|
||||||
rm ./cookie
|
rm ./cookie
|
||||||
|
|
||||||
# Unzip labels
|
# Unzip labels
|
||||||
unzip -q ${filename} # for coco.zip
|
unzip -q ${filename} # for coco.zip
|
||||||
# tar -xzf ${filename} # for coco.tar.gz
|
# tar -xzf ${filename} # for coco.tar.gz
|
||||||
rm ${filename}
|
rm ${filename}
|
||||||
|
|
||||||
# Download and unzip images
|
# Download and unzip images
|
||||||
|
|||||||
@ -6,13 +6,13 @@
|
|||||||
# Download labels from Google Drive, accepting presented query
|
# Download labels from Google Drive, accepting presented query
|
||||||
filename="coco2017labels.zip"
|
filename="coco2017labels.zip"
|
||||||
fileid="1cXZR_ckHki6nddOmcysCuuJFM--T-Q6L"
|
fileid="1cXZR_ckHki6nddOmcysCuuJFM--T-Q6L"
|
||||||
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
|
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" >/dev/null
|
||||||
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
|
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=$(awk '/download/ {print $NF}' ./cookie)&id=${fileid}" -o ${filename}
|
||||||
rm ./cookie
|
rm ./cookie
|
||||||
|
|
||||||
# Unzip labels
|
# Unzip labels
|
||||||
unzip -q ${filename} # for coco.zip
|
unzip -q ${filename} # for coco.zip
|
||||||
# tar -xzf ${filename} # for coco.tar.gz
|
# tar -xzf ${filename} # for coco.tar.gz
|
||||||
rm ${filename}
|
rm ${filename}
|
||||||
|
|
||||||
# Download and unzip images
|
# Download and unzip images
|
||||||
|
|||||||
8
train.py
8
train.py
@ -356,10 +356,10 @@ def train(hyp):
|
|||||||
if save:
|
if save:
|
||||||
with open(results_file, 'r') as f: # create checkpoint
|
with open(results_file, 'r') as f: # create checkpoint
|
||||||
ckpt = {'epoch': epoch,
|
ckpt = {'epoch': epoch,
|
||||||
'best_fitness': best_fitness,
|
'best_fitness': best_fitness,
|
||||||
'training_results': f.read(),
|
'training_results': f.read(),
|
||||||
'model': ema.ema.module.state_dict() if hasattr(model, 'module') else ema.ema.state_dict(),
|
'model': ema.ema.module.state_dict() if hasattr(model, 'module') else ema.ema.state_dict(),
|
||||||
'optimizer': None if final_epoch else optimizer.state_dict()}
|
'optimizer': None if final_epoch else optimizer.state_dict()}
|
||||||
|
|
||||||
# Save last, best and delete
|
# Save last, best and delete
|
||||||
torch.save(ckpt, last)
|
torch.save(ckpt, last)
|
||||||
|
|||||||
@ -12,7 +12,6 @@ while true; do
|
|||||||
python3 train.py --data coco2014.data --img-size 512 608 --epochs 27 --batch 8 --accum 8 --evolve --weights '' --bucket ult/coco/sppa_512 --device $1 --cfg yolov3-sppa.cfg --multi
|
python3 train.py --data coco2014.data --img-size 512 608 --epochs 27 --batch 8 --accum 8 --evolve --weights '' --bucket ult/coco/sppa_512 --device $1 --cfg yolov3-sppa.cfg --multi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# coco epoch times --img-size 416 608 --epochs 27 --batch 16 --accum 4
|
# coco epoch times --img-size 416 608 --epochs 27 --batch 16 --accum 4
|
||||||
# 36:34 2080ti
|
# 36:34 2080ti
|
||||||
# 21:58 V100
|
# 21:58 V100
|
||||||
|
|||||||
@ -29,8 +29,7 @@ docker kill $(docker ps -a -q --filter ancestor=$t)
|
|||||||
sudo -s
|
sudo -s
|
||||||
t=ultralytics/yolov3:evolve
|
t=ultralytics/yolov3:evolve
|
||||||
# docker kill $(docker ps -a -q --filter ancestor=$t)
|
# docker kill $(docker ps -a -q --filter ancestor=$t)
|
||||||
for i in 0 1 6 7
|
for i in 0 1 6 7; do
|
||||||
do
|
|
||||||
docker pull $t && docker run --gpus all -d --ipc=host -v "$(pwd)"/coco:/usr/src/coco $t bash utils/evolve.sh $i
|
docker pull $t && docker run --gpus all -d --ipc=host -v "$(pwd)"/coco:/usr/src/coco $t bash utils/evolve.sh $i
|
||||||
sleep 30
|
sleep 30
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user