REPOSITORY
jbnu/environment-adaptive-perception Private
[참조 MVP] 환경 적응형 인지 A-SW — 조도·강우·먼지 조건에 따라 탐지 임계값과 센서 우선순위를 조정합니다.
https://git.agrithing.ai/jbnu/environment-adaptive-perception.git f7fec31 feat: adopt python VPU SDV reference implementation
5816174 feat: adopt python VPU SDV reference implementation
ae4151f ci: add language-specific static and dynamic analysis
2ed89a8 docs: define component scope and interface contract
a8a443e ci: verify contract tests and evidence package
f4e589c feat: add executable reference MVP
be6d31d docs: define component scope and interface contract
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)}