Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wimspaargaren/yolov3
Go implementation of the yolo v3 object detection system
https://github.com/wimspaargaren/yolov3
Last synced: 3 months ago
JSON representation
Go implementation of the yolo v3 object detection system
- Host: GitHub
- URL: https://github.com/wimspaargaren/yolov3
- Owner: wimspaargaren
- License: mit
- Created: 2021-04-06T21:28:13.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T15:19:27.000Z (9 months ago)
- Last Synced: 2024-08-03T01:25:42.597Z (7 months ago)
- Language: Go
- Size: 4.27 MB
- Stars: 76
- Watchers: 1
- Forks: 15
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-yolo-object-detection - wimspaargaren/yolov3
- awesome-yolo-object-detection - wimspaargaren/yolov3
README
# Go YOLO V3
[](https://github.com/wimspaargaren/yolov3/actions)

[](https://pkg.go.dev/github.com/wimspaargaren/yolov3)This repository provides a plug and play implementation of the [Yolo V3](https://pjreddie.com/darknet/yolo/) object detection system in Go, leveraging [gocv](https://github.com/hybridgroup/gocv).
# Prerequisites
Since this implementation builds on top of the [gocv](https://github.com/hybridgroup/gocv) library, make sure you either use one of the provided [docker images](https://github.com/hybridgroup/gocv/blob/release/Dockerfile) to run the example, or install the opencv dependencies on your system.
Furthermore, make sure you've got the yolov3 models downloaded before running the examples.
Simply run `$ make models`
# Run the examples
## Bird example
`$ make bird-example`
Output
## Street example
`$ make street-example`
Output
## Webcam example
`$ make webcam-example`
Note that this will not run smoothly on most machines, as the default net target type is set to `NetTargetCPU`. If you have cuda installed, adjust the net initialization to:
```GOLANG
conf := yolov3.DefaultConfig()
// Adjust the backend and target type
conf.NetBackendType = gocv.NetBackendCUDA
conf.NetTargetType = gocv.NetTargetCUDA// Create the net with created config
yolonet, err := yolov3.NewNetWithConfig(yolov3WeightsPath, yolov3ConfigPath, cocoNames, conf)
if err != nil {
log.WithError(err).Fatal("unable to create yolo net")
}
```## Cuda example
Execute 50 fps test render with cuda, also see the [CUDA](#CUDA) section.`$ make cuda-example`
# CUDA
If you're interested in running yolo in Go with CUDA support, check the `cmd/example_cuda` to see a dummy example and test results of running object detection at 50 fps. The [gocv cuda README](https://github.com/hybridgroup/gocv/blob/release/cuda/README.md) provides detailed installation instructions.
# Issues
If you have any issues, feel free to open a PR or create an issue!