A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

jbnu/environment-adaptive-perception Private

[참조 MVP] 환경 적응형 인지 A-SW — 조도·강우·먼지 조건에 따라 탐지 임계값과 센서 우선순위를 조정합니다.

https://git.agrithing.ai/jbnu/environment-adaptive-perception.git
7 commits
2 items · main
·/ asw_component/component.py
python · 697 B · 02749ba Download
from __future__ import annotationsdef execute(payload: dict) -> dict:    lux = max(0.0, float(payload.get("brightness_lux", 500)))    rain = min(1.0, max(0.0, float(payload.get("rain_level", 0))))    dust = min(1.0, max(0.0, float(payload.get("dust_level", 0))))    threshold = float(payload.get("base_threshold", 0.5))    threshold += 0.08 if lux < 50 else (-0.03 if lux > 1000 else 0)    threshold += 0.1 * rain + 0.08 * dust    primary = "radar" if rain > 0.6 or dust > 0.6 else ("thermal_camera" if lux < 30 else "rgb_camera")    return {"detection_threshold": round(min(0.95, threshold), 3), "primary_sensor": primary, "degradation": round(max(rain, dust, max(0, (50-lux)/50)), 3)}