Skip to content

Error 'AttributeError: 'str' object has no attribute 'get'' at running train.py #1479

@Yasin40

Description

@Yasin40

Hi,
According this tutorial i decided train my custom data but i got this error:
``python` train.py --batch 16 --epochs 25 --data roadside1.yaml --weights ./weights/yolov5s.pt
Your branch is behind 'origin/master' by 25 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)

Using torch 1.7.0 CUDA:0 (GeForce GTX 1060 6GB, 6077MB)

Namespace(adam=False, batch_size=16, bucket='', cache_images=False, cfg='', data='roadside1.yaml', device='', epochs=25, evolve=False, exist_ok=False, global_rank=-1, hyp='data/hyp.scratch.yaml', image_weights=False, img_size=[640, 640], local_rank=-1, log_imgs=16, multi_scale=False, name='exp', noautoanchor=False, nosave=False, notest=False, project='runs/train', rect=False, resume=False, save_dir='runs/train/exp4', single_cls=False, sync_bn=False, total_batch_size=16, weights='./weights/yolov5s.pt', workers=8, world_size=1)
Start Tensorboard with "tensorboard --logdir runs/train", view at http://localhost:6006/
Hyperparameters {'lr0': 0.01, 'lrf': 0.2, 'momentum': 0.937, 'weight_decay': 0.0005, 'warmup_epochs': 3.0, 'warmup_momentum': 0.8, 'warmup_bias_lr': 0.1, 'box': 0.05, 'cls': 0.5, 'cls_pw': 1.0, 'obj': 1.0, 'obj_pw': 1.0, 'iou_t': 0.2, 'anchor_t': 4.0, 'fl_gamma': 0.0, 'hsv_h': 0.015, 'hsv_s': 0.7, 'hsv_v': 0.4, 'degrees': 0.0, 'translate': 0.1, 'scale': 0.5, 'shear': 0.0, 'perspective': 0.0, 'flipud': 0.0, 'fliplr': 0.5, 'mosaic': 1.0, 'mixup': 0.0}
Traceback (most recent call last):
File "train.py", line 490, in
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 69, in train
check_dataset(data_dict) # check
File "/home/anpr/adel/clones/yolov5/utils/general.py", line 80, in check_dataset
val, s = dict.get('val'), dict.get('download')
AttributeError: 'str' object has no attribute `'get'``

anyone can help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions