WongKinYiu / yolov7

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
GNU General Public License v3.0
13.22k stars 4.18k forks source link

Failed training custom data set using CPU; using Macbook M1 Pro chip #1356

Open JonathanDiazRamos opened 1 year ago

JonathanDiazRamos commented 1 year ago

I would like to use my Mac's cpu -- here is my input line:

Input: !python train.py --device cpu --batch-size 16 --data data/custom_data.yaml --img 640 640 --cfg cfg/training/yolov7.yaml --weights yolov7_training.pt --name yolov7_custom_dataset --epoch 250

Output

YOLOR 🚀 v0.1-116-g8c0bf3f torch 1.13.1 CPU

Namespace(weights='yolov7_training.pt', cfg='cfg/training/yolov7.yaml', data='data/custom_data.yaml', hyp='data/hyp.scratch.p5.yaml', epochs=250, batch_size=16, img_size=[640, 640], rect=False, resume=False, nosave=False, notest=False, noautoanchor=False, evolve=False, bucket='', cache_images=False, image_weights=False, device='cpu', multi_scale=False, single_cls=False, adam=False, sync_bn=False, local_rank=-1, workers=8, project='runs/train', entity=None, name='yolov7_default', exist_ok=False, quad=False, linear_lr=False, label_smoothing=0.0, upload_dataset=False, bbox_interval=-1, save_period=-1, artifact_alias='latest', freeze=[0], v5_metric=False, world_size=1, global_rank=-1, save_dir='runs/train/yolov7_default', total_batch_size=16) tensorboard: Start with 'tensorboard --logdir runs/train', view at http://localhost:6006/

Help

This is all I get in return. No errors etc. It just seems to stop at the tensorboard line -- I have absolutely no idea how to tackle this issue.

yulin010101 commented 1 year ago

Can it be executed normally if --data data/coco.yaml is set?

JonathanDiazRamos commented 1 year ago

just tried it and still nothing. I looked at my activity monitor just to see if at least something was using my cpu, but its working at ~0.4%. If somehow this were training without my knowledge I would at least see my cpu at ~90% in use but i dont.

yulin010101 commented 1 year ago

Have you checked the environment? For example, is torch running normally?