nil dets?

This commit is contained in:
dimahkiin
2018-09-20 13:53:40 +03:00
parent c2698c68d1
commit acadb46eb6
3 changed files with 6 additions and 5 deletions

View File

@@ -5,11 +5,11 @@ This is an example Go application which uses go-darknet.
## Install
```shell
go get github.com/gyonluks/go-darknet
go install github.com/gyonluks/go-darknet/example
go get github.com/LdDl/go-darknet
go install github.com/LdDl/go-darknet/example
# Alternatively
go build github.com/gyonluks/go-darknet/example
go build github.com/LdDl/go-darknet/example
```
An executable named `example` should be in your `$GOPATH/bin`, if using

BIN
example/main Executable file

Binary file not shown.

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"log"
darknet "github.com/gyonluks/go-darknet"
darknet "github.com/LdDl/go-darknet"
)
var dataConfigFile = flag.String("dataConfigFile", "",
@@ -43,6 +43,7 @@ func main() {
}
defer n.Close()
log.Println("we are here")
img, err := darknet.ImageFromPath(*imageFile)
if err != nil {
printError(err)
@@ -55,7 +56,7 @@ func main() {
printError(err)
return
}
log.Println("we are here 2")
log.Println("Network-only time taken:", dr.NetworkOnlyTimeTaken)
log.Println("Overall time taken:", dr.OverallTimeTaken)
for _, d := range dr.Detections {