Spaces:
Sleeping
Sleeping
fix: depth modules cpu issue
Browse files- api/routers/__pycache__/camera_stream.cpython-311.pyc +0 -0
- api/routers/__pycache__/dashboard_stream.cpython-311.pyc +0 -0
- api/routers/__pycache__/health.cpython-311.pyc +0 -0
- config/__pycache__/settings.cpython-311.pyc +0 -0
- infra/__pycache__/logger_structlog.cpython-311.pyc +0 -0
- infra/__pycache__/system_metrics.cpython-311.pyc +0 -0
- main.py +3 -2
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 |
-
|
|
|
|
| 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="
|
| 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)
|