This is a minimum implementation of YOLOv4 in Swift for TensorFlow, S4TF. Everything, including helper functions, is implemented in Swift. This repository is a complete example for researchers/engineers to get a first insight of pure S4TF, even though it supports Python libraries =).
Requirement:
- Swift for TensorFlow, 0.9. (used a lot of hacked tricks)
- swift-jupyter + SPM
Achieved:
- EXACT OUTPUT same as Darknet (numerical error < 5e-5)
- 100% faster than Darknet on CPU
feature:
- CORE
- yolov4 structure
- YOLO layer
- post-processing, NMS
- I/O
- Darknet I/O
- Swift load Images
- resize Image
- Swift Visualization
- Train
- refactor code (it's my first swift project, hacky things need to be improved.
NN components:
- SPP, Spatial Pyramid Pooling
- CSP, Cross-Stage-Partial-connections
- mish, activation function
- Darknet-padding methods(used in Convolutional_layer)
- Yolo layer