GenerateFeatureVectors
abstract class GenerateFeatureVectors extends Job implements ShouldQueue
Traits
Methods
Get the bounding box of an annotation
Modify a bounding box so it adheres to the aspect ratio given by width and height.
Adjust the position and size of the box so it is contained in a box with the given dimensions.
Get the bounding box of a point annotation.
Get the bounding box of a circle annotation.
Get the bounding box of an annotation that is no point, circle or whole frame.
Round and cast box values to int.
Generate the input for the python script.
Run the Python command.
Generator to read the output CSV row by row.
Details
at line 21
array
getAnnotationBoundingBox(array $points, Shape $shape, int $pointPadding = 112, int $boxPadding = 0, int $minSize = 32)
Get the bounding box of an annotation
at line 70
array
ensureBoxAspectRatio(array $box, int $aspectWidth, int $aspectHeight)
Modify a bounding box so it adheres to the aspect ratio given by width and height.
at line 108
makeBoxContained(array $box, int|null $maxWidth, int|null $maxHeight)
Adjust the position and size of the box so it is contained in a box with the given dimensions.
at line 134
protected array
getPointBoundingBox(array $points, int $padding)
Get the bounding box of a point annotation.
at line 147
protected array
getCircleBoundingBox(array $points)
Get the bounding box of a circle annotation.
at line 160
protected array
getPolygonBoundingBox(array $points)
Get the bounding box of an annotation that is no point, circle or whole frame.
at line 180
protected array
makeBoxIntegers(array $box)
Round and cast box values to int.
at line 194
protected array
generateInput(array $files, array $paths, Collection $annotations)
Generate the input for the python script.
at line 211
protected array
generateFileInput(VolumeFile $file, Collection $annotations)
No description
at line 246
protected
python(string $inputPath, string $outputPath)
Run the Python command.
at line 262
protected Generator
readOutputCsv(string $path)
Generator to read the output CSV row by row.