Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationColor ¶
type ConfigurationColor struct {
Background astiimage.RGBA `toml:"background"`
Fonts []astiimage.RGBA `toml:"fonts"`
}
ConfigurationColor represents a color configuration
type ConfigurationDetector ¶
type ConfigurationDetector struct {
// Path to the model
ModelPath string `toml:"model_path"`
}
ConfigurationDetector represents a detector configuration
type ConfigurationFont ¶
type ConfigurationFont struct {
File string `toml:"file"`
PositionRatio float64 `toml:"position_ratio"`
}
ConfigurationFont represents a font configuration
type ConfigurationImage ¶
ConfigurationImage represents an image configuration
type ConfigurationTrainer ¶
type ConfigurationTrainer struct {
// Path to the cache directory
CacheDirectoryPath string `toml:"cache_directory_path"`
// Number of images generated for both training and test purposes
Count int `toml:"count"`
// Color options
Colors []ConfigurationColor `toml:"colors"`
// Font options
Fonts []ConfigurationFont `toml:"fonts"`
// Image options
Image ConfigurationImage `toml:"image"`
// Path to the output directory
OutputDirectoryPath string `toml:"output_directory_path"`
// Path to the python binary
PythonBinaryPath string `toml:"python_binary_path"`
// Path to the scripts directory
ScriptsDirectoryPath string `toml:"scripts_directory_path"`
// Show box around labels
ShowBox bool `toml:"show_box"`
// Show entire grid
ShowGrid bool `toml:"show_grid"`
// Path to the tensorflow models directory
TensorFlowModelsDirectoryPath string `toml:"tensorflow_models_directory_path"`
// The proportion of test data in the generated images
TestDataProportion float64 `toml:"test_data_proportion"`
}
ConfigurationTrainer represents a trainer configuration
type DetectionBox ¶
DetectionBox represents a detection box
type DetectionResult ¶
type DetectionResult struct {
Box DetectionBox
Label string
Probability float64
}
DetectionResult represents a detection result
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector represents an object capable of detecting OCR
func NewDetector ¶
func NewDetector(c ConfigurationDetector) (d *Detector, err error)
NewDetector creates a new detector
type GatherSummary ¶
type GatherSummary struct {
Images []GatherSummaryImage `json:"images"`
}
GatherSummary represents a gather summary
type GatherSummaryBox ¶
type GatherSummaryBox struct {
Label string `json:"label"`
LabelIndex int `json:"label_index"`
X0 int `json:"x0"`
X1 int `json:"x1"`
Y0 int `json:"y0"`
Y1 int `json:"y1"`
}
GatherSummaryBox represents a gather summary box
type GatherSummaryImage ¶
type GatherSummaryImage struct {
Height int `json:"height"`
Boxes []GatherSummaryBox `json:"boxes"`
Path string `json:"path"`
Width int `json:"width"`
}
GatherSummaryImage represents a gather summary image
type Trainer ¶
type Trainer struct {
// contains filtered or unexported fields
}
Trainer represents an object capable of training a model
func NewTrainer ¶
func NewTrainer(c ConfigurationTrainer) (t *Trainer, err error)
NewTrainer creates a new trainer