Files
go-darknet/example
2020-02-21 15:47:21 +03:00
..
2020-02-21 15:47:21 +03:00
2020-02-21 15:47:21 +03:00
upd
2019-12-03 08:23:40 +03:00

Example Go application using go-darknet

This is an example Go application which uses go-darknet.

Install

go get github.com/LdDl/go-darknet
go install github.com/LdDl/go-darknet/example

# Alternatively
go build github.com/LdDl/go-darknet/example

An executable named example should be in your $GOPATH/bin, if using go install; otherwise it will be in your current working directory ($PWD), if using go build.

Run

$GOPATH/bin/example

or

go run main.go -configFile=yolov3-320.cfg -dataConfigFile=coco.data -imageFile=sample.jpg -weightsFile=yolov3.weights

Please ensure that libdarknet.so is in your $LD_LIBRARY_PATH.

Notes

Note that the bounding boxes' values are ratios. To get the actual values, use the ratios and multiply with either the image's width or height, depending on which ratio is used.