mirror of
https://github.com/LdDl/go-darknet.git
synced 2025-09-26 19:51:27 +08:00
docs
This commit is contained in:
13
.gitignore
vendored
13
.gitignore
vendored
@@ -1,9 +1,10 @@
|
||||
example/main
|
||||
example/coco.names
|
||||
example/yolov3.cfg
|
||||
example/yolov3.weights
|
||||
example/yolov4.cfg
|
||||
example/yolov4.weights
|
||||
cmd/examples/main
|
||||
cmd/examples/base_example/main
|
||||
cmd/examples/coco.names
|
||||
cmd/examples/yolov3.cfg
|
||||
cmd/examples/yolov3.weights
|
||||
cmd/examples/yolov4.cfg
|
||||
cmd/examples/yolov4.weights
|
||||
darknet.h
|
||||
*.so
|
||||
predictions.png
|
||||
|
12
README.md
12
README.md
@@ -64,13 +64,13 @@ go get github.com/LdDl/go-darknet
|
||||
|
||||
## Usage
|
||||
|
||||
Example Go program is provided in the [example] directory. Please refer to the code on how to use this Go package.
|
||||
Example Go program is provided in the [examples] directory. Please refer to the code on how to use this Go package.
|
||||
|
||||
Building and running program:
|
||||
|
||||
* Navigate to [example] folder
|
||||
* Navigate to [examples] folder
|
||||
```shell
|
||||
cd $GOPATH/github.com/LdDl/go-darknet/example/base_example
|
||||
cd ${YOUR PATH}/github.com/LdDl/go-darknet/cmd/examples
|
||||
```
|
||||
|
||||
* Download dataset (sample of image, coco.names, yolov4.cfg (or v3), yolov4.weights(or v3)).
|
||||
@@ -106,10 +106,10 @@ Building and running program:
|
||||
It will reduce amount of VRAM used for detector test.
|
||||
|
||||
|
||||
* Build and run program
|
||||
* Build and run example program
|
||||
Yolo V4:
|
||||
```shell
|
||||
go build main.go && ./main --configFile=yolov4.cfg --weightsFile=yolov4.weights --imageFile=sample.jpg
|
||||
go build -o base_example/main base_example/main.go && ./base_example/main --configFile=yolov4.cfg --weightsFile=yolov4.weights --imageFile=sample.jpg
|
||||
```
|
||||
|
||||
Output should be something like this:
|
||||
@@ -165,5 +165,5 @@ go-darknet follows [Darknet]'s [license].
|
||||
[darknet.h]: https://github.com/AlexeyAB/darknet/blob/master/include/darknet.h
|
||||
[include/darknet.h]: https://github.com/AlexeyAB/darknet/blob/master/include/darknet.h
|
||||
[Makefile]: https://github.com/alexeyab/darknet/blob/master/Makefile
|
||||
[example]: /example/base_example
|
||||
[examples]: cmd/examples/base_example
|
||||
[GoDoc]: https://godoc.org/github.com/LdDl/go-darknet
|
||||
|
@@ -4,12 +4,13 @@ import (
|
||||
"bytes"
|
||||
"flag"
|
||||
"fmt"
|
||||
darknet "go-darknet"
|
||||
"image"
|
||||
"image/jpeg"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
darknet "github.com/LdDl/go-darknet"
|
||||
|
||||
"github.com/disintegration/imaging"
|
||||
)
|
||||
|
||||
@@ -60,7 +61,7 @@ func main() {
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
|
||||
|
||||
dr, err := n.Detect(imgDarknet)
|
||||
if err != nil {
|
||||
printError(err)
|
@@ -11,7 +11,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/LdDl/go-darknet"
|
||||
"go-darknet"
|
||||
)
|
||||
|
||||
var configFile = flag.String("configFile", "",
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
1
go.mod
1
go.mod
@@ -3,7 +3,6 @@ module go-darknet
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/LdDl/go-darknet v1.3.5
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410
|
||||
)
|
||||
|
2
go.sum
2
go.sum
@@ -1,5 +1,3 @@
|
||||
github.com/LdDl/go-darknet v1.3.5 h1:oOMpWesW0+8ZLOdZcGS4LfjKKS48cHUceNrBy1MU7aM=
|
||||
github.com/LdDl/go-darknet v1.3.5/go.mod h1:vNpwlxHd2mevaqWDYG9r/ABi1+cQrXw0HUuSPaDKuD8=
|
||||
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
|
||||
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
|
Reference in New Issue
Block a user