Reject front-heavy balanced overhead vehicles
Browse filesReject front-facing vehicle cutouts when an explicit top-down brief requires paired features to be equally visible. The exact public rover false positive scores 0.305 rotational balance and is rejected by this narrow fail-closed check.
app.py
CHANGED
|
@@ -2505,7 +2505,9 @@ def has_front_view_like_top_down_silhouette(content: bytes, spec: AssetSpec) ->
|
|
| 2505 |
when a normalized, canvas-filling silhouette contradicts explicit user terms:
|
| 2506 |
compact humanoids cannot remain upright portraits; explicitly radial bodies
|
| 2507 |
must be broad and rotationally balanced; and explicitly wide vehicles must
|
| 2508 |
-
present a wide footprint.
|
|
|
|
|
|
|
| 2509 |
"""
|
| 2510 |
if spec.camera != "top_down" or spec.composition not in {"single_subject", "icon", "animation_frame"}:
|
| 2511 |
return False
|
|
@@ -2551,6 +2553,20 @@ def has_front_view_like_top_down_silhouette(content: bytes, spec: AssetSpec) ->
|
|
| 2551 |
)
|
| 2552 |
if explicitly_wide_vehicle and aspect >= 0.95:
|
| 2553 |
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2554 |
|
| 2555 |
narrow_subject_requested = contains_any_term(
|
| 2556 |
description,
|
|
|
|
| 2505 |
when a normalized, canvas-filling silhouette contradicts explicit user terms:
|
| 2506 |
compact humanoids cannot remain upright portraits; explicitly radial bodies
|
| 2507 |
must be broad and rotationally balanced; and explicitly wide vehicles must
|
| 2508 |
+
present a wide footprint. Vehicles whose brief explicitly requires balanced
|
| 2509 |
+
paired features must also retain rotational balance instead of tapering like
|
| 2510 |
+
a front-facing product shot. Narrow props remain exempt.
|
| 2511 |
"""
|
| 2512 |
if spec.camera != "top_down" or spec.composition not in {"single_subject", "icon", "animation_frame"}:
|
| 2513 |
return False
|
|
|
|
| 2553 |
)
|
| 2554 |
if explicitly_wide_vehicle and aspect >= 0.95:
|
| 2555 |
return True
|
| 2556 |
+
explicitly_balanced_vehicle = explicitly_wide_vehicle and contains_any_term(
|
| 2557 |
+
description,
|
| 2558 |
+
(
|
| 2559 |
+
"equally visible",
|
| 2560 |
+
"paired wheels",
|
| 2561 |
+
"paired circles",
|
| 2562 |
+
"balanced footprint",
|
| 2563 |
+
"symmetric footprint",
|
| 2564 |
+
"symmetrical footprint",
|
| 2565 |
+
"both sides equally",
|
| 2566 |
+
),
|
| 2567 |
+
)
|
| 2568 |
+
if explicitly_balanced_vehicle and foreground_rotational_symmetry(content) < 0.40:
|
| 2569 |
+
return True
|
| 2570 |
|
| 2571 |
narrow_subject_requested = contains_any_term(
|
| 2572 |
description,
|