Go YOLO V3

This repository provides a plug and play implementation of the Yolo V3 object detection system in Go, leveraging gocv.

Prerequisites

Since this implementation builds on top of the gocv library, make sure you either use one of the provided docker images 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

birds-output

Street example

$ make street-example

Output

street-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:

	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(vehicleWeights, vehicleNetcfg, 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 section.

$ make cuda-example

GitHub

https://github.com/wimspaargaren/yolov3