perf(unraid): fall back to official RTMDet-tiny
This commit is contained in:
@@ -111,7 +111,7 @@ def capabilities():
|
||||
"source_ip": os.environ["NDI_SOURCE_IP"], "nominal_width": config["nominal_width"],
|
||||
"nominal_height": config["nominal_height"], "coordinate_space": config["coordinate_space"],
|
||||
"horizontal_flip_applied": False, "rotation_deg": 0},
|
||||
"detector": {"name": "rtmdet-m-person", "framework": "mmdetection", "config": models.det_config,
|
||||
"detector": {"name": os.getenv("DETECTOR_NAME", "rtmdet-m-person"), "framework": "mmdetection", "config": models.det_config,
|
||||
"checkpoint": models.det_checkpoint, "checkpoint_sha256": models.sha256(models.det_checkpoint),
|
||||
"person_class_id": 0, "score_threshold": float(os.getenv("DETECTION_THRESHOLD", ".35")),
|
||||
"nms_iou_threshold": float(os.getenv("NMS_IOU_THRESHOLD", ".60"))},
|
||||
|
||||
@@ -18,7 +18,7 @@ def percentile(values: list[float], p: float) -> float:
|
||||
|
||||
|
||||
def run_offline_benchmark(models, threshold: float, max_people: int) -> None:
|
||||
path = "/logs/offline-benchmark.json"
|
||||
path = "/logs/offline-benchmark-" + os.getenv("DETECTOR_NAME", "unknown") + ".json"
|
||||
if os.path.exists(path):
|
||||
return
|
||||
try:
|
||||
@@ -48,4 +48,3 @@ def run_offline_benchmark(models, threshold: float, max_people: int) -> None:
|
||||
with open(path, "w", encoding="utf-8") as fh:
|
||||
json.dump({"error": f"{type(exc).__name__}: {str(exc)[:240]}", "source_url": DEMO_URL,
|
||||
"image_retained": False}, fh, indent=2)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import json
|
||||
import pathlib
|
||||
import os
|
||||
import statistics
|
||||
import time
|
||||
import urllib.request
|
||||
@@ -37,5 +38,4 @@ report = {"duration_seconds": round(time.time()-started, 3), "messages": len(fra
|
||||
"max_gpu_memory_used_mb": max((x["gpu"]["memory_used_mb"] for x in health_samples), default=None),
|
||||
"max_gpu_temperature_c": max((x["gpu"]["temperature_c"] for x in health_samples), default=None),
|
||||
"frames_or_crops_saved": False}
|
||||
pathlib.Path("/validation/soak-10m.json").write_text(json.dumps(report, indent=2))
|
||||
|
||||
pathlib.Path(f"/validation/soak-{os.getenv('DETECTOR_NAME', 'unknown')}-10m.json").write_text(json.dumps(report, indent=2))
|
||||
|
||||
Reference in New Issue
Block a user