config

package
v0.0.0-...-7055065 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 8 Imported by: 0

README

sample of config.yml

darknetConfigFile: /root/go/src/github.com/zmisc/yolosvc/test/configgenerate/darknetfiles/nn.cfg
objNamesFile: /root/go/src/github.com/zmisc/yolosvc/test/configgenerate/darknetfiles/obj.names
darknetWeightsFile: /root/go/src/github.com/zmisc/yolosvc/test/configgenerate/darknetfiles/nn.weights
detectThreshold: 0.8
portOfGrpcSvc: 37658
objClasses:
- id: 0
  name: yellowGourami
  # yellow
  labelColorR: 255
  labelColorG: 255
  labelColorB: 0
- id: 1
  name: blueGourami
  # light blue
  labelColorR: 173
  labelColorG: 216
  labelColorB: 230
- id: 2
  name: redFighter
  # red
  labelColorR: 255
  labelColorG: 0
  labelColorB: 0
- id: 3
  name: originalFighter
  # orange
  labelColorR: 255
  labelColorG: 165
  labelColorB: 0
- id: 4
  name: fox
  # blue
  labelColorR: 0
  labelColorG: 0
  labelColorB: 255
- id: 5
  name: sucker
  # green
  labelColorR: 0
  labelColorG: 128
  labelColorB: 0
- id: 6
  name: tiger
  # dark red
  labelColorR: 139
  labelColorG: 0
  labelColorB: 0
- id: 7
  name: WCMM
  # pale green
  labelColorR: 152
  labelColorG: 251
  labelColorB: 152

Documentation

Index

Constants

View Source
const (
	DEFAULT_DARKNET_FILES_DIR    = `darknetfiles`
	DEFAULT_DARKNET_CONFIGFILE   = `nn.cfg`
	DEFAULT_DARKNET_OBJNAMESFILE = `obj.names`
	DEFAULT_DARKNET_WEIGHTSFILE  = `nn.weights`
	DEFAULT_DETECT_THRESHOLD     = 0.8
	DEFAULT_PORT_OF_GRPCSVC      = 37658
)

Variables

View Source
var (
	ExecutablePath, ExecutableFile = getExecutablePath()
	GlobalConfig                   = newConfig()
)

Functions

This section is empty.

Types

type Config

type Config struct {
	DarknetConfigFile  string  `yaml:"darknetConfigFile"`
	ObjNamesFile       string  `yaml:"objNamesFile"`
	DarknetWeightsFile string  `yaml:"darknetWeightsFile"`
	DetectThreshold    float32 `yaml:"detectThreshold"`
	PortOfGrpcSvc      int     `yaml:"portOfGrpcSvc"`

	ObjClasses []*ObjClass `yaml:"objClasses"`
}

func (*Config) GetClassNames

func (cfg *Config) GetClassNames() []string

func (*Config) GetClassNumber

func (cfg *Config) GetClassNumber() int

type ObjClass

type ObjClass struct {
	Id          int    `yaml:"id"`
	Name        string `yaml:"name"`
	LabelColorR int    `yaml:"labelColorR"`
	LabelColorG int    `yaml:"labelColorG"`
	LabelColorB int    `yaml:"labelColorB"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL