XenoAura / yolov3

Go implementation of the yolo v3 object detection system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go YOLO V3

Build Status Coverage Badge Go Reference

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(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 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 provides detailed installation instructions.

Issues

If you have any issues, feel free to open a PR or create an issue!

About

Go implementation of the yolo v3 object detection system

License:MIT License


Languages

Language:Go 92.8%Language:Makefile 4.9%Language:Dockerfile 1.3%Language:Shell 1.0%