WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

single GPU in training

chiran7 opened this issue · comments

Dear Authors,

In the training, it is mentioned that;
We use multiple GPUs for training. {YOLOv4-P5, YOLOv4-P6, YOLOv4-P7} use input resolution {896, 1280, 1536} for training respectively.

yolov4-p5

python -m torch.distributed.launch --nproc_per_node 4 train.py --batch-size 64 --img 896 896 --data coco.yaml --cfg yolov4-p5.yaml --weights '' --sync-bn --device 0,1,2,3 --name yolov4-p5
python -m torch.distributed.launch --nproc_per_node 4 train.py --batch-size 64 --img 896 896 --data coco.yaml --cfg yolov4-p5.yaml --weights 'runs/exp0_yolov4-p5/weights/last_298.pt' --sync-bn --device 0,1,2,3 --name yolov4-p5-tune --hyp 'data/hyp.finetune.yaml' --epochs 450 --resume

Can it be trained using a single GPU? If so, do we need to do any modifications in the train.py?

Thank you for your time and consideration.

Use the following command
python train.py --batch-size 64 --img 896 896 --data coco.yaml --cfg yolov4-p5.yaml --weights '' --device 0 --name yolov4-p5

Change the batch size and image dimensions as per your GPU configuration. For a GPU with 12 gigs RAM, i'm using batch size 32 and image size 320(Low resolution will give poorer result).

image

Can you explain the different layers? For instance, in [-1, 1, BottleneckCSP, [64]], it takes only one argument 64, but BottleneckCSP requires two inputs as arguments inside common.py.

Also, if we want to train for custom data, will it be ok if nc =80 is replaced, or do we need to change filter size as well before yolo layers in scaled yolov4?

Thank you for your time and consideration.

Use the following command python train.py --batch-size 64 --img 896 896 --data coco.yaml --cfg yolov4-p5.yaml --weights '' --device 0 --name yolov4-p5

Change the batch size and image dimensions as per your GPU configuration. For a GPU with 12 gigs RAM, i'm using batch size 32 and image size 320(Low resolution will give poorer result).

image

Can you explain the different layers? For instance, in [-1, 1, BottleneckCSP, [64]], it takes only one argument 64, but BottleneckCSP requires two inputs as arguments inside common.py.

Also, if we want to train for custom data, will it be ok if nc =80 is replaced, or do we need to change filter size as well before yolo layers in scaled yolov4?

Thank you for your time and consideration.