ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
51.24k stars 16.44k forks source link

Memory consumption comparison with EfficientDet #4139

Closed Ronald-Kray closed 3 years ago

Ronald-Kray commented 3 years ago

Hey! I have a question about memory consumption. I'm using for training Yolov5 and EfficientDet on GTX 2080 Ti 11G. Any idea why Yolov5 can allocate more batch size than EfficientDet and why EfficientDet requires so much memory for training? It would be clear if I could directly calculate the allocated memory.

Yolov5(MB)(Flops) | 1 batch(1 Gpu) MiB, Maximum batch size(1 Gpu) | EfficietnDet(MB)(Flops) | 1 batch(1 Gpu)  MiB, Maximum batch size(1 Gpu) -- | -- | -- | -- Yolov5s(14MB)(FLOPs 17B) | 1 batch:1,686 MiB, Max batch size:56(10,054 Mib) | EfficientDet-D0(15.5MB)(FLOPs 2.5B) | 1 batch:1,326 MiB, Max batch size:17(10,132 Mib) Yolov5m(41MB)(FLOPs 51.3B) | 1 batch:2,010 MiB, Max batch size:29(10,228 Mib) | EfficientDet-D1(26.4MB)(FLOPs 6B) | 1 batch:2,068 MiB, Max batch size:7(9,768 Mib) Yolov5l(90MB)(FLOPs 115.4B) | 1 batch: 2,528 MiB, Max batch size:17(10,170 Mib) | EfficientDet-D2(32.2MB)(FLOPs 11B) | 1 batch:2,840 MiB, Max batch size:4(9,002 Mib) Yolov5x(168MB)(FLOPs 218.8B) | 1 batch: 3,168 MiB, Max batch size:11(10,254 Mib) | EfficientDet-D3(47.7MB)(FLOPs 25B) | 1 batch:4,824 MiB, Max batch size:2(8738 Mib)
github-actions[bot] commented 3 years ago

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!