|
@@ -53,6 +53,7 @@ __all__ = [
|
|
|
"detect_hoist_high",
|
|
"detect_hoist_high",
|
|
|
"detect_spreader_contact",
|
|
"detect_spreader_contact",
|
|
|
"detect_structure_v2",
|
|
"detect_structure_v2",
|
|
|
|
|
+ "find_texture_top",
|
|
|
"ground_like_ratio",
|
|
"ground_like_ratio",
|
|
|
"horizontal_bands",
|
|
"horizontal_bands",
|
|
|
"pick_box_and_bed",
|
|
"pick_box_and_bed",
|
|
@@ -102,6 +103,20 @@ class EvidenceV2Params:
|
|
|
# P0-Q3:门板阵列的 x 跨度下限(占工作宽度)。真实 C70 横跨车体(A 25%~66%),
|
|
# P0-Q3:门板阵列的 x 跨度下限(占工作宽度)。真实 C70 横跨车体(A 25%~66%),
|
|
|
# 平车车轮/制动梁只在窄区给伪立柱(B ~20%)→ 取 0.23(B 挡、A f1100 保留)。
|
|
# 平车车轮/制动梁只在窄区给伪立柱(B ~20%)→ 取 0.23(B 挡、A f1100 保留)。
|
|
|
min_post_span_ratio: float = 0.23
|
|
min_post_span_ratio: float = 0.23
|
|
|
|
|
+ # P0-Q4:天空/电线 ROI 约束(与 C++ 同名同义)。
|
|
|
|
|
+ texture_top_enable: bool = True
|
|
|
|
|
+ texture_grad_th: float = 50.0
|
|
|
|
|
+ texture_block_px: int = 16
|
|
|
|
|
+ texture_block_hit_ratio: float = 0.03
|
|
|
|
|
+ texture_coverage_min: float = 0.50
|
|
|
|
|
+ texture_run_rows: int = 3
|
|
|
|
|
+ texture_smooth_rows: int = 7
|
|
|
|
|
+ texture_top_margin_ratio: float = 0.02
|
|
|
|
|
+ # P0-Q4:空车/无箱兜底(纹理车体 ROI 再数一次门板立柱)
|
|
|
|
|
+ body_fallback_enable: bool = True
|
|
|
|
|
+ body_bottom_ratio: float = 0.75
|
|
|
|
|
+ body_min_opacity: float = 0.75
|
|
|
|
|
+ body_min_roi_px: int = 90
|
|
|
# P0-Q3:`1`(敞车)还必须有"八"字斜撑/三角撑证据(docs/edge_evidence.md §4.1)。
|
|
# P0-Q3:`1`(敞车)还必须有"八"字斜撑/三角撑证据(docs/edge_evidence.md §4.1)。
|
|
|
# 容器侧壁只有瓦楞、没有斜撑 → 防"上层箱坐在下层箱上"被判成敞车。
|
|
# 容器侧壁只有瓦楞、没有斜撑 → 防"上层箱坐在下层箱上"被判成敞车。
|
|
|
# 0 = 关闭该门(只用于对照实验,现场不要关)。
|
|
# 0 = 关闭该门(只用于对照实验,现场不要关)。
|
|
@@ -168,6 +183,24 @@ class EvidenceV2Params:
|
|
|
raise ValueError("min_post_spacing_px 不能为负")
|
|
raise ValueError("min_post_spacing_px 不能为负")
|
|
|
if not 0.0 <= self.min_post_span_ratio <= 1.0:
|
|
if not 0.0 <= self.min_post_span_ratio <= 1.0:
|
|
|
raise ValueError("min_post_span_ratio 必须在 [0,1]")
|
|
raise ValueError("min_post_span_ratio 必须在 [0,1]")
|
|
|
|
|
+ if self.texture_grad_th <= 0.0:
|
|
|
|
|
+ raise ValueError("texture_grad_th 必须 > 0")
|
|
|
|
|
+ if self.texture_block_px < 4:
|
|
|
|
|
+ raise ValueError("texture_block_px 至少 4")
|
|
|
|
|
+ if not 0.0 <= self.texture_block_hit_ratio <= 1.0:
|
|
|
|
|
+ raise ValueError("texture_block_hit_ratio 必须在 [0,1]")
|
|
|
|
|
+ if not 0.0 <= self.texture_coverage_min <= 1.0:
|
|
|
|
|
+ raise ValueError("texture_coverage_min 必须在 [0,1]")
|
|
|
|
|
+ if self.texture_run_rows < 1 or self.texture_smooth_rows < 1:
|
|
|
|
|
+ raise ValueError("texture_run_rows / texture_smooth_rows 至少 1")
|
|
|
|
|
+ if not 0.0 <= self.texture_top_margin_ratio <= 0.5:
|
|
|
|
|
+ raise ValueError("texture_top_margin_ratio 必须在 [0,0.5]")
|
|
|
|
|
+ if not 0.0 < self.body_bottom_ratio <= 1.0:
|
|
|
|
|
+ raise ValueError("body_bottom_ratio 必须在 (0,1]")
|
|
|
|
|
+ if not 0.0 <= self.body_min_opacity <= 1.0:
|
|
|
|
|
+ raise ValueError("body_min_opacity 必须在 [0,1]")
|
|
|
|
|
+ if self.body_min_roi_px < 8:
|
|
|
|
|
+ raise ValueError("body_min_roi_px 至少 8")
|
|
|
if self.min_diagonal_braces < 0:
|
|
if self.min_diagonal_braces < 0:
|
|
|
raise ValueError("min_diagonal_braces 不能为负")
|
|
raise ValueError("min_diagonal_braces 不能为负")
|
|
|
if self.box_height_m <= 0.0:
|
|
if self.box_height_m <= 0.0:
|
|
@@ -199,6 +232,18 @@ class EvidenceV2Params:
|
|
|
min_post_len_ratio=float(raw.get("min_post_len_ratio", 0.30)),
|
|
min_post_len_ratio=float(raw.get("min_post_len_ratio", 0.30)),
|
|
|
min_post_spacing_px=float(raw.get("min_post_spacing_px", 24.0)),
|
|
min_post_spacing_px=float(raw.get("min_post_spacing_px", 24.0)),
|
|
|
min_post_span_ratio=float(raw.get("min_post_span_ratio", 0.23)),
|
|
min_post_span_ratio=float(raw.get("min_post_span_ratio", 0.23)),
|
|
|
|
|
+ texture_top_enable=bool(raw.get("texture_top_enable", True)),
|
|
|
|
|
+ texture_grad_th=float(raw.get("texture_grad_th", 50.0)),
|
|
|
|
|
+ texture_block_px=int(raw.get("texture_block_px", 16)),
|
|
|
|
|
+ texture_block_hit_ratio=float(raw.get("texture_block_hit_ratio", 0.03)),
|
|
|
|
|
+ texture_coverage_min=float(raw.get("texture_coverage_min", 0.50)),
|
|
|
|
|
+ texture_run_rows=int(raw.get("texture_run_rows", 3)),
|
|
|
|
|
+ texture_smooth_rows=int(raw.get("texture_smooth_rows", 7)),
|
|
|
|
|
+ texture_top_margin_ratio=float(raw.get("texture_top_margin_ratio", 0.02)),
|
|
|
|
|
+ body_fallback_enable=bool(raw.get("body_fallback_enable", True)),
|
|
|
|
|
+ body_bottom_ratio=float(raw.get("body_bottom_ratio", 0.75)),
|
|
|
|
|
+ body_min_opacity=float(raw.get("body_min_opacity", 0.75)),
|
|
|
|
|
+ body_min_roi_px=int(raw.get("body_min_roi_px", 90)),
|
|
|
min_diagonal_braces=int(raw.get("min_diagonal_braces", 1)),
|
|
min_diagonal_braces=int(raw.get("min_diagonal_braces", 1)),
|
|
|
min_wall_opacity=float(raw.get("min_wall_opacity", 0.35)),
|
|
min_wall_opacity=float(raw.get("min_wall_opacity", 0.35)),
|
|
|
max_flat_gap_px=float(raw.get("max_flat_gap_px", 40.0)),
|
|
max_flat_gap_px=float(raw.get("max_flat_gap_px", 40.0)),
|
|
@@ -240,6 +285,7 @@ class EvidenceV2Result:
|
|
|
view: ViewMode = ViewMode.UNKNOWN
|
|
view: ViewMode = ViewMode.UNKNOWN
|
|
|
box_bottom_y: Optional[float] = None
|
|
box_bottom_y: Optional[float] = None
|
|
|
box_top_y: Optional[float] = None
|
|
box_top_y: Optional[float] = None
|
|
|
|
|
+ texture_top_y: Optional[float] = None
|
|
|
box_h_px: Optional[float] = None
|
|
box_h_px: Optional[float] = None
|
|
|
px_per_m: Optional[float] = None
|
|
px_per_m: Optional[float] = None
|
|
|
scale_ok: bool = False
|
|
scale_ok: bool = False
|
|
@@ -296,9 +342,10 @@ class EvidenceV2Result:
|
|
|
ok = self.publishable(require_commit)
|
|
ok = self.publishable(require_commit)
|
|
|
state = int(self.state) if ok else int(SceneState.UNKNOWN)
|
|
state = int(self.state) if ok else int(SceneState.UNKNOWN)
|
|
|
conf = float(self.confidence) if ok else 0.0
|
|
conf = float(self.confidence) if ok else 0.0
|
|
|
- reason = "v2:%s view=%s posts=%d opacity=%.2f deck=%d under_deck=%d gap=%s commit=%s hoist=%d" % (
|
|
|
|
|
|
|
+ reason = "v2:%s view=%s top=%s posts=%d opacity=%.2f deck=%d under_deck=%d gap=%s commit=%s hoist=%d" % (
|
|
|
"ok" if ok else "abstain",
|
|
"ok" if ok else "abstain",
|
|
|
self.view.value,
|
|
self.view.value,
|
|
|
|
|
+ "n/a" if self.texture_top_y is None else "%.0f" % self.texture_top_y,
|
|
|
int(self.door_posts),
|
|
int(self.door_posts),
|
|
|
float(self.wall_opacity),
|
|
float(self.wall_opacity),
|
|
|
int(bool(self.deck_edge)),
|
|
int(bool(self.deck_edge)),
|
|
@@ -325,6 +372,7 @@ class EvidenceV2Result:
|
|
|
"view": self.view.value,
|
|
"view": self.view.value,
|
|
|
"box_bottom_y": _round_opt(self.box_bottom_y),
|
|
"box_bottom_y": _round_opt(self.box_bottom_y),
|
|
|
"box_top_y": _round_opt(self.box_top_y),
|
|
"box_top_y": _round_opt(self.box_top_y),
|
|
|
|
|
+ "texture_top_y": _round_opt(self.texture_top_y),
|
|
|
"box_h_px": _round_opt(self.box_h_px),
|
|
"box_h_px": _round_opt(self.box_h_px),
|
|
|
"px_per_m": _round_opt(self.px_per_m),
|
|
"px_per_m": _round_opt(self.px_per_m),
|
|
|
"scale_ok": bool(self.scale_ok),
|
|
"scale_ok": bool(self.scale_ok),
|
|
@@ -372,6 +420,37 @@ def _to_gray(image: np.ndarray) -> np.ndarray:
|
|
|
return cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
|
return cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+def find_texture_top(gray: np.ndarray, window: Tuple[int, int, int, int],
|
|
|
|
|
+ params: EvidenceV2Params) -> float:
|
|
|
|
|
+ """P0-Q4:用“竖向梯度块覆盖率”找车体顶;-1 = 未找到/关闭。"""
|
|
|
|
|
+
|
|
|
|
|
+ if not params.texture_top_enable or gray.size == 0:
|
|
|
|
|
+ return -1.0
|
|
|
|
|
+ gx = np.abs(cv2.Sobel(gray, cv2.CV_32F, 1, 0, ksize=3))
|
|
|
|
|
+ x0 = max(0, min(int(window[0]), gray.shape[1]))
|
|
|
|
|
+ x1 = min(gray.shape[1], max(x0, int(window[2])))
|
|
|
|
|
+ block = max(4, int(params.texture_block_px))
|
|
|
|
|
+ nb = (x1 - x0) // block
|
|
|
|
|
+ if nb < 2:
|
|
|
|
|
+ return -1.0
|
|
|
|
|
+ cov = np.zeros(gray.shape[0], dtype=np.float32)
|
|
|
|
|
+ for y in range(gray.shape[0]):
|
|
|
|
|
+ hit = 0
|
|
|
|
|
+ for i in range(nb):
|
|
|
|
|
+ bx = x0 + i * block
|
|
|
|
|
+ if float((gx[y, bx:bx + block] >= params.texture_grad_th).mean()) >= \
|
|
|
|
|
+ params.texture_block_hit_ratio:
|
|
|
|
|
+ hit += 1
|
|
|
|
|
+ cov[y] = hit / nb
|
|
|
|
|
+ smooth = max(1, int(params.texture_smooth_rows))
|
|
|
|
|
+ sm = np.convolve(cov, np.ones(smooth, dtype=np.float32) / smooth, mode="same")
|
|
|
|
|
+ run = max(1, int(params.texture_run_rows))
|
|
|
|
|
+ for y in range(max(0, int(window[1])), gray.shape[0] - run + 1):
|
|
|
|
|
+ if all(sm[y + k] >= params.texture_coverage_min for k in range(run)):
|
|
|
|
|
+ return float(y)
|
|
|
|
|
+ return -1.0
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
def _row_mean(gray: np.ndarray, x0: int, x1: int, y0: int, y1: int) -> float:
|
|
def _row_mean(gray: np.ndarray, x0: int, x1: int, y0: int, y1: int) -> float:
|
|
|
"""``[x0,x1) × [y0,y1)`` 的灰度均值(越界自动钳制;空框返回 0)。"""
|
|
"""``[x0,x1) × [y0,y1)`` 的灰度均值(越界自动钳制;空框返回 0)。"""
|
|
|
|
|
|
|
@@ -1053,9 +1132,20 @@ class EvidenceV2:
|
|
|
int(self.p.window[2] * ww), int(self.p.window[3] * wh),
|
|
int(self.p.window[2] * ww), int(self.p.window[3] * wh),
|
|
|
)
|
|
)
|
|
|
max_h = max(6, int(self.p.band_max_h_ratio * wh))
|
|
max_h = max(6, int(self.p.band_max_h_ratio * wh))
|
|
|
|
|
+ # P0-Q4:车体顶以上(天空电线/水印)的亮/暗带不参与 box/bed 选择。
|
|
|
|
|
+ texture_top = find_texture_top(gray, window, self.p)
|
|
|
bright, dark = horizontal_bands(
|
|
bright, dark = horizontal_bands(
|
|
|
gray, window, min_h=max(1, int(self.p.band_min_h * scale)), max_h=max_h
|
|
gray, window, min_h=max(1, int(self.p.band_min_h * scale)), max_h=max_h
|
|
|
)
|
|
)
|
|
|
|
|
+ if texture_top > 0.0 and texture_top > window[1] + 0.05 * wh:
|
|
|
|
|
+ margin = self.p.texture_top_margin_ratio * wh
|
|
|
|
|
+ bright_all, dark_all = list(bright), list(dark)
|
|
|
|
|
+ bright = [b for b in bright if b.y1 >= texture_top - margin]
|
|
|
|
|
+ dark = [b for b in dark if b.y1 >= texture_top - margin]
|
|
|
|
|
+ if not bright:
|
|
|
|
|
+ bright = bright_all
|
|
|
|
|
+ if not dark:
|
|
|
|
|
+ dark = dark_all
|
|
|
# 先估一个箱高,用于“车体上缘搜索窗”(P0 固定 120 px 的等价物)。
|
|
# 先估一个箱高,用于“车体上缘搜索窗”(P0 固定 120 px 的等价物)。
|
|
|
box_hint = max(80.0, 0.40 * wh)
|
|
box_hint = max(80.0, 0.40 * wh)
|
|
|
box, bed = pick_box_and_bed(
|
|
box, bed = pick_box_and_bed(
|
|
@@ -1263,10 +1353,61 @@ class EvidenceV2:
|
|
|
diagonal_braces=int(structure["diagonal_lines"]),
|
|
diagonal_braces=int(structure["diagonal_lines"]),
|
|
|
post_span_ratio=float(post_span_ratio),
|
|
post_span_ratio=float(post_span_ratio),
|
|
|
)
|
|
)
|
|
|
|
|
+ body = None
|
|
|
|
|
+ body_roi = None
|
|
|
|
|
+ if (self.p.body_fallback_enable and texture_top > 0.0 and state != 1
|
|
|
|
|
+ and texture_top > window[1] + 0.05 * wh):
|
|
|
|
|
+ by0 = max(int(window[1]), int(round(texture_top)))
|
|
|
|
|
+ by1 = min(int(window[3]), int(round(
|
|
|
|
|
+ texture_top + self.p.body_bottom_ratio * (window[3] - texture_top))))
|
|
|
|
|
+ if by1 > by0:
|
|
|
|
|
+ body_roi = (window[0], by0, window[2], by1)
|
|
|
|
|
+ bst = detect_structure_v2(
|
|
|
|
|
+ gray, body_roi,
|
|
|
|
|
+ min_post_len_ratio=self.p.min_post_len_ratio,
|
|
|
|
|
+ cluster_gap_px=9.0, scale=scale,
|
|
|
|
|
+ )
|
|
|
|
|
+ bpos = bst.get("post_positions") or []
|
|
|
|
|
+ bspan = (
|
|
|
|
|
+ (max(bpos) - min(bpos)) / max(1.0, float(body_roi[2] - body_roi[0]))
|
|
|
|
|
+ if len(bpos) >= 2 else 0.0
|
|
|
|
|
+ )
|
|
|
|
|
+ bground, bblocks = ground_like_ratio(
|
|
|
|
|
+ gray, body_roi, bst.get("lines", []), # type: ignore[arg-type]
|
|
|
|
|
+ block_px=self.p.ground_block_px,
|
|
|
|
|
+ density_lo=self.p.ground_density_lo,
|
|
|
|
|
+ density_hi=self.p.ground_density_hi,
|
|
|
|
|
+ )
|
|
|
|
|
+ bopacity = 1.0 - bground if bblocks > 0 else 0.0
|
|
|
|
|
+ bh = (by1 - by0) / max(scale, 1e-6)
|
|
|
|
|
+ if (bh >= self.p.body_min_roi_px
|
|
|
|
|
+ and int(bst["post_count"]) >= self.p.min_door_posts
|
|
|
|
|
+ and bspan >= self.p.min_post_span_ratio
|
|
|
|
|
+ and bopacity >= self.p.body_min_opacity
|
|
|
|
|
+ and int(bst["diagonal_lines"]) >= self.p.min_diagonal_braces):
|
|
|
|
|
+ state = 1
|
|
|
|
|
+ conf = min(1.0, 0.55 + 0.25 * min(1.0, bst["post_count"] / 8.0)
|
|
|
|
|
+ + 0.15 * bopacity)
|
|
|
|
|
+ hits = min(1.0, 0.40 + 0.05 * bst["post_count"] + 0.20 * bopacity)
|
|
|
|
|
+ reason = "body_fallback_wall"
|
|
|
|
|
+ gap_px = 0.0
|
|
|
|
|
+ body = {
|
|
|
|
|
+ "posts": int(bst["post_count"]),
|
|
|
|
|
+ "diagonal": int(bst["diagonal_lines"]),
|
|
|
|
|
+ "opacity": bopacity,
|
|
|
|
|
+ }
|
|
|
gap_m = (
|
|
gap_m = (
|
|
|
None if gap_px is None or px_per_m is None or px_per_m <= 0.0
|
|
None if gap_px is None or px_per_m is None or px_per_m <= 0.0
|
|
|
else gap_px / px_per_m
|
|
else gap_px / px_per_m
|
|
|
)
|
|
)
|
|
|
|
|
+ if body is not None:
|
|
|
|
|
+ gap_m = 0.0
|
|
|
|
|
+ if (body is None and texture_top > 0.0 and state == 2 and posts == 0
|
|
|
|
|
+ and box.y1 > texture_top + 0.02 * wh):
|
|
|
|
|
+ state = 255
|
|
|
|
|
+ conf = 0.0
|
|
|
|
|
+ hits = 0.0
|
|
|
|
|
+ reason = "ambiguous_empty_vehicle"
|
|
|
commit = self.tracker.update(
|
|
commit = self.tracker.update(
|
|
|
ts,
|
|
ts,
|
|
|
state=state,
|
|
state=state,
|
|
@@ -1287,24 +1428,27 @@ class EvidenceV2:
|
|
|
view=self.p.view,
|
|
view=self.p.view,
|
|
|
box_bottom_y=box.y1 / max(scale, 1e-6),
|
|
box_bottom_y=box.y1 / max(scale, 1e-6),
|
|
|
box_top_y=box_top,
|
|
box_top_y=box_top,
|
|
|
|
|
+ texture_top_y=(
|
|
|
|
|
+ None if texture_top <= 0.0 else texture_top / max(scale, 1e-6)
|
|
|
|
|
+ ),
|
|
|
box_h_px=box_h_px,
|
|
box_h_px=box_h_px,
|
|
|
px_per_m=px_per_m,
|
|
px_per_m=px_per_m,
|
|
|
scale_ok=px_per_m is not None,
|
|
scale_ok=px_per_m is not None,
|
|
|
bed_top_y=None if bed is None else bed.y0 / max(scale, 1e-6),
|
|
bed_top_y=None if bed is None else bed.y0 / max(scale, 1e-6),
|
|
|
gap_px=gap_px,
|
|
gap_px=gap_px,
|
|
|
gap_m=gap_m,
|
|
gap_m=gap_m,
|
|
|
- door_posts=posts,
|
|
|
|
|
|
|
+ door_posts=(body["posts"] if body else posts),
|
|
|
post_spacing_px=(
|
|
post_spacing_px=(
|
|
|
None if spacing_median is None else float(spacing_median) / max(scale, 1e-6)
|
|
None if spacing_median is None else float(spacing_median) / max(scale, 1e-6)
|
|
|
),
|
|
),
|
|
|
post_spacing_cv=None if spacing_cv is None else float(spacing_cv),
|
|
post_spacing_cv=None if spacing_cv is None else float(spacing_cv),
|
|
|
rect_doors=int(structure["rect_doors"]),
|
|
rect_doors=int(structure["rect_doors"]),
|
|
|
- diagonal_braces=int(structure["diagonal_lines"]),
|
|
|
|
|
- wall_opacity=opacity,
|
|
|
|
|
- deck_edge=bool(deck_edge),
|
|
|
|
|
- under_deck=bool(under_deck),
|
|
|
|
|
|
|
+ diagonal_braces=(body["diagonal"] if body else int(structure["diagonal_lines"])),
|
|
|
|
|
+ wall_opacity=(body["opacity"] if body else opacity),
|
|
|
|
|
+ deck_edge=bool(deck_edge) and body is None,
|
|
|
|
|
+ under_deck=bool(under_deck) and body is None,
|
|
|
wheel_count=int(wheels),
|
|
wheel_count=int(wheels),
|
|
|
- ground_ratio=ground,
|
|
|
|
|
|
|
+ ground_ratio=(1.0 - body["opacity"]) if body else ground,
|
|
|
phase=phase,
|
|
phase=phase,
|
|
|
committed=bool(commit.committed),
|
|
committed=bool(commit.committed),
|
|
|
commit_reason=commit.reason,
|
|
commit_reason=commit.reason,
|
|
@@ -1317,11 +1461,16 @@ class EvidenceV2:
|
|
|
else ("" if state in (0, 1, 2) else reason)
|
|
else ("" if state in (0, 1, 2) else reason)
|
|
|
),
|
|
),
|
|
|
below_roi=(
|
|
below_roi=(
|
|
|
- int(round(below_work[0] / scale)), int(round(below_work[1] / scale)),
|
|
|
|
|
- int(round(below_work[2] / scale)), int(round(below_work[3] / scale)),
|
|
|
|
|
|
|
+ (int(round(body_roi[0] / scale)), int(round(body_roi[1] / scale)),
|
|
|
|
|
+ int(round(body_roi[2] / scale)), int(round(body_roi[3] / scale)))
|
|
|
|
|
+ if body else
|
|
|
|
|
+ (int(round(below_work[0] / scale)), int(round(below_work[1] / scale)),
|
|
|
|
|
+ int(round(below_work[2] / scale)), int(round(below_work[3] / scale)))
|
|
|
),
|
|
),
|
|
|
diagnostics={
|
|
diagnostics={
|
|
|
"class_reason": reason,
|
|
"class_reason": reason,
|
|
|
|
|
+ "texture_top": None if texture_top <= 0.0 else round(texture_top / scale, 2),
|
|
|
|
|
+ "body_fallback": bool(body),
|
|
|
"box_band": [round(box.y0 / scale, 2), round(box.y1 / scale, 2)],
|
|
"box_band": [round(box.y0 / scale, 2), round(box.y1 / scale, 2)],
|
|
|
"bed_band": None if bed is None else [round(bed.y0 / scale, 2), round(bed.y1 / scale, 2)],
|
|
"bed_band": None if bed is None else [round(bed.y0 / scale, 2), round(bed.y1 / scale, 2)],
|
|
|
"under_deck": bool(under_deck),
|
|
"under_deck": bool(under_deck),
|