Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

single GPU in training #398

Open
chiran7 opened this issue Jun 28, 2022 · 4 comments
Open

single GPU in training #398

chiran7 opened this issue Jun 28, 2022 · 4 comments

Comments

@chiran7
Copy link

chiran7 commented Jun 28, 2022

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.

@shrysh8bit
Copy link

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).

@chiran7
Copy link
Author

chiran7 commented Jul 6, 2022 via email

@chiran7
Copy link
Author

chiran7 commented Jul 6, 2022

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.

@chiran7
Copy link
Author

chiran7 commented Jul 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants