e1250 commited on
Commit
d6b54f6
·
1 Parent(s): 3a8656e

fix: depth modules cpu issue

Browse files
api/routers/__pycache__/camera_stream.cpython-311.pyc CHANGED
Binary files a/api/routers/__pycache__/camera_stream.cpython-311.pyc and b/api/routers/__pycache__/camera_stream.cpython-311.pyc differ
 
api/routers/__pycache__/dashboard_stream.cpython-311.pyc CHANGED
Binary files a/api/routers/__pycache__/dashboard_stream.cpython-311.pyc and b/api/routers/__pycache__/dashboard_stream.cpython-311.pyc differ
 
api/routers/__pycache__/health.cpython-311.pyc CHANGED
Binary files a/api/routers/__pycache__/health.cpython-311.pyc and b/api/routers/__pycache__/health.cpython-311.pyc differ
 
config/__pycache__/settings.cpython-311.pyc CHANGED
Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ
 
infra/__pycache__/logger_structlog.cpython-311.pyc CHANGED
Binary files a/infra/__pycache__/logger_structlog.cpython-311.pyc and b/infra/__pycache__/logger_structlog.cpython-311.pyc differ
 
infra/__pycache__/system_metrics.cpython-311.pyc CHANGED
Binary files a/infra/__pycache__/system_metrics.cpython-311.pyc and b/infra/__pycache__/system_metrics.cpython-311.pyc differ
 
main.py CHANGED
@@ -30,10 +30,11 @@ async def lifespan(app: FastAPI):
30
  asyncio.create_task(log_system_metrics(logger, logger_interval_sec=settings.intervals.system_metrics_seconds))
31
 
32
  # Using this way to can store data. it is acts as a dict which holds instances
33
- app.state.detection_model = YOLO_Detector(model_path="yolo26n.pt")
 
34
 
35
  depth_model_path = hf_hub_download(repo_id="depth-anything/Depth-Anything-V2-Small", filename="depth_anything_v2_vits.pth")
36
- app.state.depth_model = DepthAnything(encoder=settings.depth.encoder, depth_model_path=depth_model_path, DEVICE="cuda")
37
 
38
  safety_detection_path = hf_hub_download(repo_id="e1250/safety_detection", filename="yolo_smoke_fire.pt")
39
  app.state.safety_detection_model = YOLO_Detector(safety_detection_path)
 
30
  asyncio.create_task(log_system_metrics(logger, logger_interval_sec=settings.intervals.system_metrics_seconds))
31
 
32
  # Using this way to can store data. it is acts as a dict which holds instances
33
+ detection_model_path = hf_hub_download(repo_id="Ultralytics/YOLO26", filename="yolo26n.pt")
34
+ app.state.detection_model = YOLO_Detector(detection_model_path)
35
 
36
  depth_model_path = hf_hub_download(repo_id="depth-anything/Depth-Anything-V2-Small", filename="depth_anything_v2_vits.pth")
37
+ app.state.depth_model = DepthAnything(encoder=settings.depth.encoder, depth_model_path=depth_model_path, DEVICE="cpu")
38
 
39
  safety_detection_path = hf_hub_download(repo_id="e1250/safety_detection", filename="yolo_smoke_fire.pt")
40
  app.state.safety_detection_model = YOLO_Detector(safety_detection_path)