-
Notifications
You must be signed in to change notification settings - Fork 264
How to train using custom model #178
-
Alright, I have seen the threads in issues before coming here. And, thank you everyone for your efforts.
Here is the thing, I consulted https://yolo-docs.readthedocs.io/en/latest/1_tutorials/0_allIn1.html. Followed the folder structure and run the training with lazy.py (use_wandb=False). However, I keep getting the output below, things do not seem to progress, there was even a time I waited for an hour. I used Google Colab for T4 GPU, same results, I used my own PC, CPU, same results. I also tried to export and used dataset format YOLOv9, same result, stuck in the first progress. Any help is appreciated on how to train. Thank you.
Command:
python yolo\lazy.py task=train dataset=v9-aug use_wandb=False device=cpu task.data.batch_size=12 name=t002
config.py:
hydra:
run:
dir: runs
name: v9-dev
defaults:
- _self_
- task: train
- dataset: v9-aug
- model: v9-c
- general
I am using COCO export format of my dataset from ROBOFLOW, I have the following yaml file in yolo/config/dataset/v9-aug.yaml:
path: C:\Users\LM\Downloads\v9-v1_aug.coco
train: C:\Users\LM\Downloads\v9-v1_aug.coco\images\train
validation: C:\Users\LM\Downloads\v9-v1_aug.coco\images\validation
test: C:\Users\LM\Downloads\v9-v1_aug.coco\images\test
class_num: 3
class_list: ['A', 'B', 'C']
Output is:
INFO 有 Found stride of model [8, 16, 32]
INFO ✅ Success load loss function
┏━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━┓
┃ ┃ Name ┃ Type ┃ Params ┃ Mode ┃
┡━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━┩
│ 0 │ model │ YOLO │ 51.0 M │ train │
│ 1 │ metric │ MeanAveragePrecision │ 0 │ train │
│ 2 │ ema │ YOLO │ 51.0 M │ train │
└───┴────────┴──────────────────────┴────────┴───────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Attributes ┃ Value ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Trainable params │ 51.0 M │
│ Non-trainable params │ 51.0 M │
│ Total params │ 102 M │
│ Total estimated model params size (MB) │ 408 │
│ Modules in train mode │ 2443 │
│ Modules in eval mode │ 0 │
└────────────────────────────────────────┴────────────┘
I also have the following output log on runs/train:
:chart_with_upwards_trend: Enable Model EMA
:tractor: Building YOLO
:building_construction: Building backbone
:building_construction: Building neck
:building_construction: Building head
:building_construction: Building detection
:building_construction: Building auxiliary
:warning: Weight Mismatch for key: 22.heads.0.class_conv
:warning: Weight Mismatch for key: 38.heads.0.class_conv
:warning: Weight Mismatch for key: 22.heads.2.class_conv
:warning: Weight Mismatch for key: 22.heads.1.class_conv
:warning: Weight Mismatch for key: 38.heads.1.class_conv
:warning: Weight Mismatch for key: 38.heads.2.class_conv
:white_check_mark: Success load model & weight
:package: Loaded C:\Users\LM\Downloads\v9-v1_aug.coco\images\validation cache
:package: Loaded C:\Users\LM\Downloads\v9-v1_aug.coco\images\train cache
:japanese_not_free_of_charge_button: Found stride of model [8, 16, 32]
:white_check_mark: Success load loss function
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 1 reply
-
Hello sir, have you found a solution to see the progress of learning?
Beta Was this translation helpful? Give feedback.
All reactions
-
I think this is bug
you can try
python yolo\lazy.py task=train dataset=v9-aug device=gpu task.data.batch_size=12 name=t002
wandb=true,then when ask
INFO 🌐 (1) Create a W&B account logging_utils.py:268
INFO 🌐 (2) Use an existing W&B account logging_utils.py:268
INFO 🌐 (3) Don't visualize my results logging_utils.py:268
select (3)
Beta Was this translation helpful? Give feedback.
All reactions
-
device=cuda or device=gpu? I haven't seen the latter thus far.
Beta Was this translation helpful? Give feedback.