Initial public release
GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
from scripts.audit_yolo_label_outliers import classify_box
|
||||
from scripts.audit_yolo_label_relationships import Box
|
||||
|
||||
|
||||
DEFAULTS = {
|
||||
"tile_size": 640,
|
||||
"min_dimension_pixels": 4.0,
|
||||
"extreme_aspect_ratio": 8.0,
|
||||
"edge_tolerance_pixels": 0.5,
|
||||
}
|
||||
|
||||
|
||||
def test_classify_box_reports_independent_geometric_risks() -> None:
|
||||
box = Box(0, 0.5, 0.003, 0.2, 0.006)
|
||||
|
||||
assert classify_box(box, **DEFAULTS) == [
|
||||
{
|
||||
"category": "small_dimension",
|
||||
"width_px": 128.0,
|
||||
"height_px": 3.84,
|
||||
"area_px2": 491.52,
|
||||
"aspect_ratio": 33.333333,
|
||||
},
|
||||
{
|
||||
"category": "extreme_aspect_ratio",
|
||||
"width_px": 128.0,
|
||||
"height_px": 3.84,
|
||||
"area_px2": 491.52,
|
||||
"aspect_ratio": 33.333333,
|
||||
},
|
||||
{
|
||||
"category": "tile_edge",
|
||||
"edge_sides": ["top"],
|
||||
"width_px": 128.0,
|
||||
"height_px": 3.84,
|
||||
"area_px2": 491.52,
|
||||
"aspect_ratio": 33.333333,
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
def test_classify_box_ignores_ordinary_interior_box() -> None:
|
||||
box = Box(0, 0.5, 0.5, 0.1, 0.08)
|
||||
|
||||
assert classify_box(box, **DEFAULTS) == []
|
||||
Reference in New Issue
Block a user