Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions EAutodet.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"private_outputs": true,
"provenance": [],
"machine_shape": "hm",
"gpuType": "A100",
"authorship_tag": "ABX9TyMvTTM6qJIF9fbb5iHAFlMx",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/aashikrasool/EAutoDet/blob/master/EAutodet.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "9eP4BfF8OdIX"
},
"outputs": [],
"source": [
"!git clone https://github.com/aashikrasool/EAutoDet.git"
]
},
{
"cell_type": "code",
"source": [
"cd EAutoDet"
],
"metadata": {
"id": "qbCniNOHOnDH"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"ls\n"
],
"metadata": {
"id": "gm3JophGOxeE"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!pip install thop"
],
"metadata": {
"id": "NMBr0rxhY_sy"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!pip install wandb"
],
"metadata": {
"id": "Dio2_oXWboTt"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!bash data/scripts/get_coco.sh"
],
"metadata": {
"id": "8Lg26SaJO99O"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!touch logs/EAutoDet-s_test1.log\n"
],
"metadata": {
"id": "M6YrDoKPcI0z"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!bash scripts/search.sh 0"
],
"metadata": {
"id": "8hnodOlxPFOI"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!python -u train_search.py --data $data --cfg $cfg --weights '' --epochs 50 --batch-size $BATCHSIZE > $LOG_DIR/${cfg_file}_test1.log 2>&1 &\n",
"\n"
],
"metadata": {
"id": "LruE8zGJPNuY"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!!python -u train_search.py --data $data --cfg $cfg --weights '' --epochs 50 --batch-size $BATCHSIZE > $LOG_DIR/${cfg_file}_test1.log 2>&1\n"
],
"metadata": {
"id": "Yq7qlZBtRrpq"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!bash scripts/full_train.sh 0"
],
"metadata": {
"id": "2xK2W_B9SFw7"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "RRnUZSD4SlNK"
},
"execution_count": null,
"outputs": []
}
]
}
24 changes: 12 additions & 12 deletions data/scripts/get_coco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
# /yolov5

# Download/unzip labels
d='../' # unzip directory
d='./' # unzip directory
url=https://github.com/ultralytics/yolov5/releases/download/v1.0/
f='coco2017labels.zip' # or 'coco2017labels-segments.zip', 68 MB
f='coco2017labels-segments.zip' # or 'coco2017labels.zip', 68 MB
echo 'Downloading' $url$f ' ...'
curl -L $url$f -o $f && unzip -q $f -d $d && rm $f & # download, unzip, remove in background

## Download/unzip images
#d='../coco/images' # unzip directory
#url=http://images.cocodataset.org/zips/
#f1='train2017.zip' # 19G, 118k images
#f2='val2017.zip' # 1G, 5k images
#f3='test2017.zip' # 7G, 41k images (optional)
#for f in $f1 $f2; do
# echo 'Downloading' $url$f '...'
# curl -L $url$f -o $f && unzip -q $f -d $d && rm $f & # download, unzip, remove in background
#done
# Download/unzip images
d='./coco/images' # unzip directory
url=http://images.cocodataset.org/zips/
f1='train2017.zip' # 19G, 118k images
f2='val2017.zip' # 1G, 5k images
f3='test2017.zip' # 7G, 41k images (optional)
for f in $f1 $f2 $f3; do
echo 'Downloading' $url$f '...'
curl -L $url$f -o $f && unzip -q $f -d $d && rm $f & # download, unzip, remove in background
done
wait # finish background tasks
1 change: 0 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,4 +680,3 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
plot_evolution(yaml_file)
print(f'Hyperparameter evolution complete. Best results saved as: {yaml_file}\n'
f'Command to train a new model with these hyperparameters: $ python train.py --hyp {yaml_file}')

Loading