Major changes: - Organized Python v1 implementation into v1/ subdirectory - Created Rust workspace with 9 modular crates: - wifi-densepose-core: Core types, traits, errors - wifi-densepose-signal: CSI processing, phase sanitization, FFT - wifi-densepose-nn: Neural network inference (ONNX/Candle/tch) - wifi-densepose-api: Axum-based REST/WebSocket API - wifi-densepose-db: SQLx database layer - wifi-densepose-config: Configuration management - wifi-densepose-hardware: Hardware abstraction - wifi-densepose-wasm: WebAssembly bindings - wifi-densepose-cli: Command-line interface Documentation: - ADR-001: Workspace structure - ADR-002: Signal processing library selection - ADR-003: Neural network inference strategy - DDD domain model with bounded contexts Testing: - 69 tests passing across all crates - Signal processing: 45 tests - Neural networks: 21 tests - Core: 3 doc tests Performance targets: - 10x faster CSI processing (~0.5ms vs ~5ms) - 5x lower memory usage (~100MB vs ~500MB) - WASM support for browser deployment
2961 lines
95 KiB
JSON
2961 lines
95 KiB
JSON
{
|
|
"total_tests": 26,
|
|
"passed": 15,
|
|
"failed": 11,
|
|
"errors": [
|
|
"WebSocket /ws/pose - Exception: server rejected WebSocket connection: HTTP 403",
|
|
"WebSocket /ws/hardware - Exception: server rejected WebSocket connection: HTTP 403"
|
|
],
|
|
"test_details": [
|
|
{
|
|
"test_name": "GET /health/health",
|
|
"description": "System health check",
|
|
"url": "http://localhost:8000/health/health",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 1007.09,
|
|
"response_data": {
|
|
"status": "unhealthy",
|
|
"timestamp": "2025-06-07T12:31:10.227495",
|
|
"uptime_seconds": 0.0,
|
|
"components": {
|
|
"hardware": {
|
|
"name": "Hardware Service",
|
|
"status": "unhealthy",
|
|
"message": "Health check failed: 'HardwareService' object has no attribute 'health_check'",
|
|
"last_check": "2025-06-07T12:31:10.227495",
|
|
"uptime_seconds": null,
|
|
"metrics": null
|
|
},
|
|
"pose": {
|
|
"name": "Pose Service",
|
|
"status": "healthy",
|
|
"message": "Service is running normally",
|
|
"last_check": "2025-06-07T12:31:10.227495",
|
|
"uptime_seconds": 0.0,
|
|
"metrics": {
|
|
"total_processed": 11593,
|
|
"success_rate": 1.0,
|
|
"average_processing_time_ms": 0.7697883205382553
|
|
}
|
|
},
|
|
"stream": {
|
|
"name": "Stream Service",
|
|
"status": "unhealthy",
|
|
"message": "Health check failed: 'StreamService' object has no attribute 'health_check'",
|
|
"last_check": "2025-06-07T12:31:10.227495",
|
|
"uptime_seconds": null,
|
|
"metrics": null
|
|
}
|
|
},
|
|
"system_metrics": {
|
|
"cpu": {
|
|
"percent": 41.6,
|
|
"count": 2
|
|
},
|
|
"memory": {
|
|
"total_gb": 7.75,
|
|
"available_gb": 3.42,
|
|
"used_gb": 3.96,
|
|
"percent": 55.8
|
|
},
|
|
"disk": {
|
|
"total_gb": 31.33,
|
|
"free_gb": 7.99,
|
|
"used_gb": 21.72,
|
|
"percent": 69.34
|
|
},
|
|
"network": {
|
|
"bytes_sent": 3966865385,
|
|
"bytes_recv": 37266864859,
|
|
"packets_sent": 1208137,
|
|
"packets_recv": 25822484
|
|
}
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.229468"
|
|
},
|
|
{
|
|
"test_name": "GET /health/ready",
|
|
"description": "Readiness check",
|
|
"url": "http://localhost:8000/health/ready",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 2.8,
|
|
"response_data": {
|
|
"ready": false,
|
|
"timestamp": "2025-06-07T12:31:11.231718",
|
|
"checks": {},
|
|
"message": "Readiness check failed: 'HardwareService' object has no attribute 'is_ready'"
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.232458"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/current",
|
|
"description": "Current pose estimation",
|
|
"url": "http://localhost:8000/api/v1/pose/current",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 4.78,
|
|
"response_data": {
|
|
"timestamp": "2025-06-07T12:31:11.236304",
|
|
"frame_id": "frame_1749299471",
|
|
"persons": [
|
|
{
|
|
"person_id": "0",
|
|
"confidence": 0.7293420300231561,
|
|
"bounding_box": {
|
|
"x": 0.20030137087111707,
|
|
"y": 0.34797650745590625,
|
|
"width": 0.3981145986577058,
|
|
"height": 0.37970677378320483
|
|
},
|
|
"keypoints": [
|
|
{
|
|
"name": "nose",
|
|
"x": 0.44823595638505365,
|
|
"y": 0.28977208775102437,
|
|
"confidence": 0.5542371581192655
|
|
},
|
|
{
|
|
"name": "left_eye",
|
|
"x": 0.4952690740858373,
|
|
"y": 0.5432792007858821,
|
|
"confidence": 0.8389099658520509
|
|
},
|
|
{
|
|
"name": "right_eye",
|
|
"x": 0.5804648567981479,
|
|
"y": 0.4647719962179129,
|
|
"confidence": 0.8566402128570042
|
|
},
|
|
{
|
|
"name": "left_ear",
|
|
"x": 0.3908451092263244,
|
|
"y": 0.47632227436288144,
|
|
"confidence": 0.8663735676067241
|
|
},
|
|
{
|
|
"name": "right_ear",
|
|
"x": 0.7239991852126997,
|
|
"y": 0.23663541301872126,
|
|
"confidence": 0.8765906890203725
|
|
},
|
|
{
|
|
"name": "left_shoulder",
|
|
"x": 0.8047991402971765,
|
|
"y": 0.5945560513865605,
|
|
"confidence": 0.6733604589224793
|
|
},
|
|
{
|
|
"name": "right_shoulder",
|
|
"x": 0.5827385517549469,
|
|
"y": 0.6480707247526286,
|
|
"confidence": 0.6619337464371322
|
|
},
|
|
{
|
|
"name": "left_elbow",
|
|
"x": 0.22838735429686896,
|
|
"y": 0.5384875625869312,
|
|
"confidence": 0.8898981616721842
|
|
},
|
|
{
|
|
"name": "right_elbow",
|
|
"x": 0.30698440179370057,
|
|
"y": 0.7681933243920521,
|
|
"confidence": 0.8650395359923496
|
|
},
|
|
{
|
|
"name": "left_wrist",
|
|
"x": 0.2513618929990984,
|
|
"y": 0.7888295208071133,
|
|
"confidence": 0.7868846288735598
|
|
},
|
|
{
|
|
"name": "right_wrist",
|
|
"x": 0.7451812973100521,
|
|
"y": 0.8656266393186364,
|
|
"confidence": 0.6986352734789892
|
|
},
|
|
{
|
|
"name": "left_hip",
|
|
"x": 0.8711882610447488,
|
|
"y": 0.21107445509375788,
|
|
"confidence": 0.7641797518172958
|
|
},
|
|
{
|
|
"name": "right_hip",
|
|
"x": 0.6886993071914757,
|
|
"y": 0.8831958965641219,
|
|
"confidence": 0.607316198276865
|
|
},
|
|
{
|
|
"name": "left_knee",
|
|
"x": 0.8309229095457401,
|
|
"y": 0.6179393131368978,
|
|
"confidence": 0.9484639425058705
|
|
},
|
|
{
|
|
"name": "right_knee",
|
|
"x": 0.41084910063004776,
|
|
"y": 0.871048879535313,
|
|
"confidence": 0.5869033936285174
|
|
},
|
|
{
|
|
"name": "left_ankle",
|
|
"x": 0.868380526885448,
|
|
"y": 0.29994798097554654,
|
|
"confidence": 0.8711292170158544
|
|
},
|
|
{
|
|
"name": "right_ankle",
|
|
"x": 0.23919791092843745,
|
|
"y": 0.7835125578080285,
|
|
"confidence": 0.9296263841499632
|
|
}
|
|
],
|
|
"segmentation": null,
|
|
"zone_id": "zone_1",
|
|
"activity": "standing",
|
|
"timestamp": "2025-06-07T12:31:11.236213"
|
|
},
|
|
{
|
|
"person_id": "1",
|
|
"confidence": 0.8305294582546161,
|
|
"bounding_box": {
|
|
"x": 0.10170118349182375,
|
|
"y": 0.509137090786002,
|
|
"width": 0.3259154094555018,
|
|
"height": 0.4358340805173928
|
|
},
|
|
"keypoints": [
|
|
{
|
|
"name": "nose",
|
|
"x": 0.7996096118501625,
|
|
"y": 0.4189010321170784,
|
|
"confidence": 0.7875794312662672
|
|
},
|
|
{
|
|
"name": "left_eye",
|
|
"x": 0.5403213329708182,
|
|
"y": 0.13855592879699596,
|
|
"confidence": 0.8437237511382353
|
|
},
|
|
{
|
|
"name": "right_eye",
|
|
"x": 0.2505573867103854,
|
|
"y": 0.5510193548451794,
|
|
"confidence": 0.5797273597406184
|
|
},
|
|
{
|
|
"name": "left_ear",
|
|
"x": 0.29465523309165254,
|
|
"y": 0.5004435349476023,
|
|
"confidence": 0.5256923965994024
|
|
},
|
|
{
|
|
"name": "right_ear",
|
|
"x": 0.10508828814487554,
|
|
"y": 0.2184534539190664,
|
|
"confidence": 0.8756781626026862
|
|
},
|
|
{
|
|
"name": "left_shoulder",
|
|
"x": 0.8377841792777977,
|
|
"y": 0.18844840254336265,
|
|
"confidence": 0.7698670827453382
|
|
},
|
|
{
|
|
"name": "right_shoulder",
|
|
"x": 0.6564289264434737,
|
|
"y": 0.2950417676475364,
|
|
"confidence": 0.5628219479670884
|
|
},
|
|
{
|
|
"name": "left_elbow",
|
|
"x": 0.8616201746562163,
|
|
"y": 0.32561299054520615,
|
|
"confidence": 0.5902388830139175
|
|
},
|
|
{
|
|
"name": "right_elbow",
|
|
"x": 0.11771705352091671,
|
|
"y": 0.39582637396144527,
|
|
"confidence": 0.6664287966202559
|
|
},
|
|
{
|
|
"name": "left_wrist",
|
|
"x": 0.36669984890698537,
|
|
"y": 0.32526726218772384,
|
|
"confidence": 0.7301083696222967
|
|
},
|
|
{
|
|
"name": "right_wrist",
|
|
"x": 0.3744711338414852,
|
|
"y": 0.8933040570358391,
|
|
"confidence": 0.5122297141321303
|
|
},
|
|
{
|
|
"name": "left_hip",
|
|
"x": 0.7985778946077506,
|
|
"y": 0.5687873058337637,
|
|
"confidence": 0.6074860985303865
|
|
},
|
|
{
|
|
"name": "right_hip",
|
|
"x": 0.5180730784431439,
|
|
"y": 0.5935681806822019,
|
|
"confidence": 0.5910472810213829
|
|
},
|
|
{
|
|
"name": "left_knee",
|
|
"x": 0.8925273303822093,
|
|
"y": 0.5082354807403022,
|
|
"confidence": 0.5840320751794993
|
|
},
|
|
{
|
|
"name": "right_knee",
|
|
"x": 0.2434866909431669,
|
|
"y": 0.45900413964604203,
|
|
"confidence": 0.8146230907081062
|
|
},
|
|
{
|
|
"name": "left_ankle",
|
|
"x": 0.24287115223795253,
|
|
"y": 0.5886422119226908,
|
|
"confidence": 0.538079819702979
|
|
},
|
|
{
|
|
"name": "right_ankle",
|
|
"x": 0.13785439476462882,
|
|
"y": 0.55143292524988,
|
|
"confidence": 0.6143995946811053
|
|
}
|
|
],
|
|
"segmentation": null,
|
|
"zone_id": "zone_1",
|
|
"activity": "sitting",
|
|
"timestamp": "2025-06-07T12:31:11.236245"
|
|
},
|
|
{
|
|
"person_id": "2",
|
|
"confidence": 0.35207768693851665,
|
|
"bounding_box": {
|
|
"x": 0.2765498034316859,
|
|
"y": 0.43247003414159246,
|
|
"width": 0.3633750931147725,
|
|
"height": 0.4938780359990873
|
|
},
|
|
"keypoints": [
|
|
{
|
|
"name": "nose",
|
|
"x": 0.1604126898801905,
|
|
"y": 0.7048573375998496,
|
|
"confidence": 0.8581798084049611
|
|
},
|
|
{
|
|
"name": "left_eye",
|
|
"x": 0.6259335884734869,
|
|
"y": 0.1354705040619779,
|
|
"confidence": 0.819327861459654
|
|
},
|
|
{
|
|
"name": "right_eye",
|
|
"x": 0.2224865667621713,
|
|
"y": 0.2511125866479431,
|
|
"confidence": 0.6648104591620027
|
|
},
|
|
{
|
|
"name": "left_ear",
|
|
"x": 0.28267723109996246,
|
|
"y": 0.7010864289589891,
|
|
"confidence": 0.6583613618546853
|
|
},
|
|
{
|
|
"name": "right_ear",
|
|
"x": 0.6582362844836986,
|
|
"y": 0.6774698981379421,
|
|
"confidence": 0.7718210170365041
|
|
},
|
|
{
|
|
"name": "left_shoulder",
|
|
"x": 0.5010676026491517,
|
|
"y": 0.624190408133553,
|
|
"confidence": 0.6576163884997456
|
|
},
|
|
{
|
|
"name": "right_shoulder",
|
|
"x": 0.15790445933321814,
|
|
"y": 0.15004632002693477,
|
|
"confidence": 0.7594042257523519
|
|
},
|
|
{
|
|
"name": "left_elbow",
|
|
"x": 0.20869968465749827,
|
|
"y": 0.752452930071922,
|
|
"confidence": 0.6641317132561305
|
|
},
|
|
{
|
|
"name": "right_elbow",
|
|
"x": 0.13046426795540295,
|
|
"y": 0.7327015399000987,
|
|
"confidence": 0.6758027109229907
|
|
},
|
|
{
|
|
"name": "left_wrist",
|
|
"x": 0.4345695137883485,
|
|
"y": 0.5446404217456786,
|
|
"confidence": 0.542865592244768
|
|
},
|
|
{
|
|
"name": "right_wrist",
|
|
"x": 0.43901163390535314,
|
|
"y": 0.3619519039597633,
|
|
"confidence": 0.6601105659903144
|
|
},
|
|
{
|
|
"name": "left_hip",
|
|
"x": 0.2757230842405501,
|
|
"y": 0.518388401337965,
|
|
"confidence": 0.6001522829729531
|
|
},
|
|
{
|
|
"name": "right_hip",
|
|
"x": 0.8475196635818669,
|
|
"y": 0.22121972448055588,
|
|
"confidence": 0.9312842260680301
|
|
},
|
|
{
|
|
"name": "left_knee",
|
|
"x": 0.1524562739710847,
|
|
"y": 0.5882665393601244,
|
|
"confidence": 0.608415603676807
|
|
},
|
|
{
|
|
"name": "right_knee",
|
|
"x": 0.3584782192826531,
|
|
"y": 0.7061205470828577,
|
|
"confidence": 0.6664268999572104
|
|
},
|
|
{
|
|
"name": "left_ankle",
|
|
"x": 0.5306479556640387,
|
|
"y": 0.12301150869111269,
|
|
"confidence": 0.5707161903293938
|
|
},
|
|
{
|
|
"name": "right_ankle",
|
|
"x": 0.6960744941693561,
|
|
"y": 0.3499669479123747,
|
|
"confidence": 0.8047024098152354
|
|
}
|
|
],
|
|
"segmentation": null,
|
|
"zone_id": "zone_1",
|
|
"activity": "walking",
|
|
"timestamp": "2025-06-07T12:31:11.236274"
|
|
}
|
|
],
|
|
"zone_summary": {
|
|
"zone_1": 3
|
|
},
|
|
"processing_time_ms": 0.88,
|
|
"metadata": {
|
|
"mock_data": true
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.237579"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/current",
|
|
"description": "Current pose estimation with parameters",
|
|
"url": "http://localhost:8000/api/v1/pose/current",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 2.89,
|
|
"response_data": {
|
|
"timestamp": "2025-06-07T12:31:11.239863",
|
|
"frame_id": "frame_1749299471",
|
|
"persons": [
|
|
{
|
|
"person_id": "0",
|
|
"confidence": 0.370854019093324,
|
|
"bounding_box": {
|
|
"x": 0.3280213489240438,
|
|
"y": 0.5056874516731203,
|
|
"width": 0.34589685227387285,
|
|
"height": 0.47589268657270345
|
|
},
|
|
"keypoints": [
|
|
{
|
|
"name": "nose",
|
|
"x": 0.3302264155127105,
|
|
"y": 0.7666441068864577,
|
|
"confidence": 0.7508261047121239
|
|
},
|
|
{
|
|
"name": "left_eye",
|
|
"x": 0.12389961372528831,
|
|
"y": 0.11265742644399035,
|
|
"confidence": 0.8837280434618697
|
|
},
|
|
{
|
|
"name": "right_eye",
|
|
"x": 0.18858293506049215,
|
|
"y": 0.7947507286048676,
|
|
"confidence": 0.5359988354449617
|
|
},
|
|
{
|
|
"name": "left_ear",
|
|
"x": 0.5347969458129921,
|
|
"y": 0.7870219960840005,
|
|
"confidence": 0.7414861777052862
|
|
},
|
|
{
|
|
"name": "right_ear",
|
|
"x": 0.3292265722716323,
|
|
"y": 0.7785133611119565,
|
|
"confidence": 0.8477129538006556
|
|
},
|
|
{
|
|
"name": "left_shoulder",
|
|
"x": 0.13562914539480025,
|
|
"y": 0.3344314232704363,
|
|
"confidence": 0.9454547470280737
|
|
},
|
|
{
|
|
"name": "right_shoulder",
|
|
"x": 0.25887956115193844,
|
|
"y": 0.7416711354578321,
|
|
"confidence": 0.7324120210502734
|
|
},
|
|
{
|
|
"name": "left_elbow",
|
|
"x": 0.6914834506347959,
|
|
"y": 0.38708923719225985,
|
|
"confidence": 0.579309423206422
|
|
},
|
|
{
|
|
"name": "right_elbow",
|
|
"x": 0.6834006677040783,
|
|
"y": 0.7855844577079371,
|
|
"confidence": 0.8490986880142513
|
|
},
|
|
{
|
|
"name": "left_wrist",
|
|
"x": 0.24260255118250731,
|
|
"y": 0.4797335535386199,
|
|
"confidence": 0.921154556089327
|
|
},
|
|
{
|
|
"name": "right_wrist",
|
|
"x": 0.1891051300648476,
|
|
"y": 0.5006337124188301,
|
|
"confidence": 0.7549395147774483
|
|
},
|
|
{
|
|
"name": "left_hip",
|
|
"x": 0.45339484199301894,
|
|
"y": 0.29619229004614245,
|
|
"confidence": 0.7057449559345098
|
|
},
|
|
{
|
|
"name": "right_hip",
|
|
"x": 0.6828279036525241,
|
|
"y": 0.4389721586483025,
|
|
"confidence": 0.6670246048009738
|
|
},
|
|
{
|
|
"name": "left_knee",
|
|
"x": 0.795841186477223,
|
|
"y": 0.7857120647589356,
|
|
"confidence": 0.741616459417308
|
|
},
|
|
{
|
|
"name": "right_knee",
|
|
"x": 0.547482111130874,
|
|
"y": 0.2302439433466714,
|
|
"confidence": 0.636430810102298
|
|
},
|
|
{
|
|
"name": "left_ankle",
|
|
"x": 0.7008616321278732,
|
|
"y": 0.27001333971446473,
|
|
"confidence": 0.513728640448088
|
|
},
|
|
{
|
|
"name": "right_ankle",
|
|
"x": 0.6414064601962457,
|
|
"y": 0.30920956468078786,
|
|
"confidence": 0.6426693578712224
|
|
}
|
|
],
|
|
"segmentation": null,
|
|
"zone_id": "zone_1",
|
|
"activity": "walking",
|
|
"timestamp": "2025-06-07T12:31:11.239814"
|
|
},
|
|
{
|
|
"person_id": "1",
|
|
"confidence": 0.6657660984774105,
|
|
"bounding_box": {
|
|
"x": 0.21596985766055174,
|
|
"y": 0.554765890040542,
|
|
"width": 0.3476945882637141,
|
|
"height": 0.3225980858655065
|
|
},
|
|
"keypoints": [
|
|
{
|
|
"name": "nose",
|
|
"x": 0.34509773586217474,
|
|
"y": 0.6039962595178552,
|
|
"confidence": 0.9356445420281669
|
|
},
|
|
{
|
|
"name": "left_eye",
|
|
"x": 0.11776846716563166,
|
|
"y": 0.225173660788648,
|
|
"confidence": 0.5522696395103206
|
|
},
|
|
{
|
|
"name": "right_eye",
|
|
"x": 0.7338523292829059,
|
|
"y": 0.599335853110952,
|
|
"confidence": 0.7027590082539141
|
|
},
|
|
{
|
|
"name": "left_ear",
|
|
"x": 0.465126361351207,
|
|
"y": 0.48658170608878937,
|
|
"confidence": 0.6790517153428199
|
|
},
|
|
{
|
|
"name": "right_ear",
|
|
"x": 0.688443714096417,
|
|
"y": 0.7906320580116033,
|
|
"confidence": 0.517047439500365
|
|
},
|
|
{
|
|
"name": "left_shoulder",
|
|
"x": 0.4323501414184646,
|
|
"y": 0.15862144143634993,
|
|
"confidence": 0.7673209239676191
|
|
},
|
|
{
|
|
"name": "right_shoulder",
|
|
"x": 0.4567671996735275,
|
|
"y": 0.28872739596598096,
|
|
"confidence": 0.7592842348741403
|
|
},
|
|
{
|
|
"name": "left_elbow",
|
|
"x": 0.11321639253514633,
|
|
"y": 0.2050364311471884,
|
|
"confidence": 0.6376305366974446
|
|
},
|
|
{
|
|
"name": "right_elbow",
|
|
"x": 0.1859980824352567,
|
|
"y": 0.3008205738608011,
|
|
"confidence": 0.9225066732217158
|
|
},
|
|
{
|
|
"name": "left_wrist",
|
|
"x": 0.8383453588356334,
|
|
"y": 0.280898583891389,
|
|
"confidence": 0.8429876370472138
|
|
},
|
|
{
|
|
"name": "right_wrist",
|
|
"x": 0.8426749298154382,
|
|
"y": 0.2295432901116694,
|
|
"confidence": 0.7959672377339402
|
|
},
|
|
{
|
|
"name": "left_hip",
|
|
"x": 0.46079681719277765,
|
|
"y": 0.7435169063799625,
|
|
"confidence": 0.6206533611359297
|
|
},
|
|
{
|
|
"name": "right_hip",
|
|
"x": 0.48616078823152187,
|
|
"y": 0.304553494425842,
|
|
"confidence": 0.9071440594833815
|
|
},
|
|
{
|
|
"name": "left_knee",
|
|
"x": 0.8607378771474717,
|
|
"y": 0.2557244351579886,
|
|
"confidence": 0.5296887736025605
|
|
},
|
|
{
|
|
"name": "right_knee",
|
|
"x": 0.5503887821224759,
|
|
"y": 0.5978507779253809,
|
|
"confidence": 0.7883542631669029
|
|
},
|
|
{
|
|
"name": "left_ankle",
|
|
"x": 0.7268171280616471,
|
|
"y": 0.23228222221949216,
|
|
"confidence": 0.5462757240883648
|
|
},
|
|
{
|
|
"name": "right_ankle",
|
|
"x": 0.3592243197510716,
|
|
"y": 0.38341299101117987,
|
|
"confidence": 0.795125616127961
|
|
}
|
|
],
|
|
"segmentation": null,
|
|
"zone_id": "zone_1",
|
|
"activity": "sitting",
|
|
"timestamp": "2025-06-07T12:31:11.239833"
|
|
},
|
|
{
|
|
"person_id": "2",
|
|
"confidence": 0.6388533885804164,
|
|
"bounding_box": {
|
|
"x": 0.2019039986313679,
|
|
"y": 0.24933561207668617,
|
|
"width": 0.350285539244766,
|
|
"height": 0.40394161253795735
|
|
},
|
|
"keypoints": [
|
|
{
|
|
"name": "nose",
|
|
"x": 0.46387437669009546,
|
|
"y": 0.21912840561578115,
|
|
"confidence": 0.5415202898138071
|
|
},
|
|
{
|
|
"name": "left_eye",
|
|
"x": 0.250282606200101,
|
|
"y": 0.7636670564326579,
|
|
"confidence": 0.567373830235719
|
|
},
|
|
{
|
|
"name": "right_eye",
|
|
"x": 0.5082089357810013,
|
|
"y": 0.31123588871298963,
|
|
"confidence": 0.5150436226533691
|
|
},
|
|
{
|
|
"name": "left_ear",
|
|
"x": 0.2144005859969986,
|
|
"y": 0.804912450132936,
|
|
"confidence": 0.9443468898852558
|
|
},
|
|
{
|
|
"name": "right_ear",
|
|
"x": 0.2930593433202765,
|
|
"y": 0.1422330200282742,
|
|
"confidence": 0.9257622652361159
|
|
},
|
|
{
|
|
"name": "left_shoulder",
|
|
"x": 0.4265533807468792,
|
|
"y": 0.8652060982958156,
|
|
"confidence": 0.6218485643101248
|
|
},
|
|
{
|
|
"name": "right_shoulder",
|
|
"x": 0.5208915723508785,
|
|
"y": 0.717661133362763,
|
|
"confidence": 0.626112755781511
|
|
},
|
|
{
|
|
"name": "left_elbow",
|
|
"x": 0.36740642026204207,
|
|
"y": 0.5694059472552029,
|
|
"confidence": 0.5609663660779218
|
|
},
|
|
{
|
|
"name": "right_elbow",
|
|
"x": 0.5391920258178114,
|
|
"y": 0.6442125494598956,
|
|
"confidence": 0.7938092697509699
|
|
},
|
|
{
|
|
"name": "left_wrist",
|
|
"x": 0.5956602387413871,
|
|
"y": 0.4140777212387293,
|
|
"confidence": 0.8343460554256876
|
|
},
|
|
{
|
|
"name": "right_wrist",
|
|
"x": 0.6315100214312287,
|
|
"y": 0.4197139630733008,
|
|
"confidence": 0.7478878756557799
|
|
},
|
|
{
|
|
"name": "left_hip",
|
|
"x": 0.36187976548941314,
|
|
"y": 0.31173051173969923,
|
|
"confidence": 0.7630685098335477
|
|
},
|
|
{
|
|
"name": "right_hip",
|
|
"x": 0.36416445946060205,
|
|
"y": 0.14747762132213227,
|
|
"confidence": 0.6620742395104553
|
|
},
|
|
{
|
|
"name": "left_knee",
|
|
"x": 0.6284491176264971,
|
|
"y": 0.5616090769899043,
|
|
"confidence": 0.6558174035602283
|
|
},
|
|
{
|
|
"name": "right_knee",
|
|
"x": 0.10567959136772603,
|
|
"y": 0.8789306746324227,
|
|
"confidence": 0.9494355835172135
|
|
},
|
|
{
|
|
"name": "left_ankle",
|
|
"x": 0.7780648824658661,
|
|
"y": 0.7498553660012194,
|
|
"confidence": 0.6501985656038138
|
|
},
|
|
{
|
|
"name": "right_ankle",
|
|
"x": 0.4951401143008306,
|
|
"y": 0.6615737813418059,
|
|
"confidence": 0.6275415002667539
|
|
}
|
|
],
|
|
"segmentation": null,
|
|
"zone_id": "zone_1",
|
|
"activity": "walking",
|
|
"timestamp": "2025-06-07T12:31:11.239846"
|
|
}
|
|
],
|
|
"zone_summary": {
|
|
"zone_1": 3
|
|
},
|
|
"processing_time_ms": 0.65,
|
|
"metadata": {
|
|
"mock_data": true
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.240803"
|
|
},
|
|
{
|
|
"test_name": "POST /api/v1/pose/analyze",
|
|
"description": "Pose analysis (requires auth)",
|
|
"url": "http://localhost:8000/api/v1/pose/analyze",
|
|
"method": "POST",
|
|
"expected_status": 200,
|
|
"actual_status": 401,
|
|
"response_time_ms": 1.1,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 401,
|
|
"message": "Authentication required",
|
|
"type": "http_error",
|
|
"path": "/api/v1/pose/analyze"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.242270"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/zones/zone_1/occupancy",
|
|
"description": "Zone occupancy",
|
|
"url": "http://localhost:8000/api/v1/pose/zones/zone_1/occupancy",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 1.35,
|
|
"response_data": {
|
|
"zone_id": "zone_1",
|
|
"current_occupancy": 5,
|
|
"max_occupancy": 10,
|
|
"persons": [
|
|
{
|
|
"person_id": "person_0",
|
|
"confidence": 0.9299048917915331,
|
|
"activity": "standing"
|
|
},
|
|
{
|
|
"person_id": "person_1",
|
|
"confidence": 0.8890436892848852,
|
|
"activity": "standing"
|
|
},
|
|
{
|
|
"person_id": "person_2",
|
|
"confidence": 0.8888218199253267,
|
|
"activity": "walking"
|
|
},
|
|
{
|
|
"person_id": "person_3",
|
|
"confidence": 0.942871490533826,
|
|
"activity": "standing"
|
|
},
|
|
{
|
|
"person_id": "person_4",
|
|
"confidence": 0.8544064588886042,
|
|
"activity": "sitting"
|
|
}
|
|
],
|
|
"timestamp": "2025-06-07T12:31:11.243107"
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.243759"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/zones/summary",
|
|
"description": "All zones summary",
|
|
"url": "http://localhost:8000/api/v1/pose/zones/summary",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 1.2,
|
|
"response_data": {
|
|
"timestamp": "2025-06-07T12:31:11.244523",
|
|
"total_persons": 6,
|
|
"zones": {
|
|
"zone_1": {
|
|
"occupancy": 1,
|
|
"max_occupancy": 10,
|
|
"status": "active"
|
|
},
|
|
"zone_2": {
|
|
"occupancy": 1,
|
|
"max_occupancy": 10,
|
|
"status": "active"
|
|
},
|
|
"zone_3": {
|
|
"occupancy": 2,
|
|
"max_occupancy": 10,
|
|
"status": "active"
|
|
},
|
|
"zone_4": {
|
|
"occupancy": 2,
|
|
"max_occupancy": 10,
|
|
"status": "active"
|
|
}
|
|
},
|
|
"active_zones": 4
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.245234"
|
|
},
|
|
{
|
|
"test_name": "POST /api/v1/pose/historical",
|
|
"description": "Historical pose data (requires auth)",
|
|
"url": "http://localhost:8000/api/v1/pose/historical",
|
|
"method": "POST",
|
|
"expected_status": 200,
|
|
"actual_status": 401,
|
|
"response_time_ms": 1.43,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 401,
|
|
"message": "Authentication required",
|
|
"type": "http_error",
|
|
"path": "/api/v1/pose/historical"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.246811"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/activities",
|
|
"description": "Recent activities",
|
|
"url": "http://localhost:8000/api/v1/pose/activities",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 500,
|
|
"response_time_ms": 1.35,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 500,
|
|
"message": "Failed to get activities: name 'timedelta' is not defined",
|
|
"type": "http_error",
|
|
"path": "/api/v1/pose/activities"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.248287"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/activities",
|
|
"description": "Activities for specific zone",
|
|
"url": "http://localhost:8000/api/v1/pose/activities",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 500,
|
|
"response_time_ms": 1.29,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 500,
|
|
"message": "Failed to get activities: name 'timedelta' is not defined",
|
|
"type": "http_error",
|
|
"path": "/api/v1/pose/activities"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.249941"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/calibration/status",
|
|
"description": "Calibration status (requires auth)",
|
|
"url": "http://localhost:8000/api/v1/pose/calibration/status",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 401,
|
|
"response_time_ms": 1.07,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 401,
|
|
"message": "Authentication required",
|
|
"type": "http_error",
|
|
"path": "/api/v1/pose/calibration/status"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.251405"
|
|
},
|
|
{
|
|
"test_name": "POST /api/v1/pose/calibrate",
|
|
"description": "Start calibration (requires auth)",
|
|
"url": "http://localhost:8000/api/v1/pose/calibrate",
|
|
"method": "POST",
|
|
"expected_status": 200,
|
|
"actual_status": 401,
|
|
"response_time_ms": 1.28,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 401,
|
|
"message": "Authentication required",
|
|
"type": "http_error",
|
|
"path": "/api/v1/pose/calibrate"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.253054"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/stats",
|
|
"description": "Pose statistics",
|
|
"url": "http://localhost:8000/api/v1/pose/stats",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 1.23,
|
|
"response_data": {
|
|
"period": {
|
|
"start_time": "2025-06-06T12:31:11.253946",
|
|
"end_time": "2025-06-07T12:31:11.253946",
|
|
"hours": 24
|
|
},
|
|
"statistics": {
|
|
"total_detections": 314,
|
|
"successful_detections": 286,
|
|
"failed_detections": 28,
|
|
"success_rate": 0.910828025477707,
|
|
"average_confidence": 0.8154860610274203,
|
|
"average_processing_time_ms": 74.08005120410309,
|
|
"unique_persons": 19,
|
|
"most_active_zone": "zone_1",
|
|
"activity_distribution": {
|
|
"standing": 0.3631605264291814,
|
|
"sitting": 0.3294888900969729,
|
|
"walking": 0.29592515904686695,
|
|
"lying": 0.057631257973703554
|
|
}
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.254736"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/pose/stats",
|
|
"description": "Pose statistics (12 hours)",
|
|
"url": "http://localhost:8000/api/v1/pose/stats",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 1.14,
|
|
"response_data": {
|
|
"period": {
|
|
"start_time": "2025-06-07T00:31:11.255512",
|
|
"end_time": "2025-06-07T12:31:11.255512",
|
|
"hours": 12
|
|
},
|
|
"statistics": {
|
|
"total_detections": 654,
|
|
"successful_detections": 604,
|
|
"failed_detections": 50,
|
|
"success_rate": 0.9235474006116208,
|
|
"average_confidence": 0.852208852930976,
|
|
"average_processing_time_ms": 106.7372839201018,
|
|
"unique_persons": 17,
|
|
"most_active_zone": "zone_1",
|
|
"activity_distribution": {
|
|
"standing": 0.37644162607601667,
|
|
"sitting": 0.22403324279769943,
|
|
"walking": 0.11425361491788977,
|
|
"lying": 0.019586953828269162
|
|
}
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.256156"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/stream/status",
|
|
"description": "Stream status",
|
|
"url": "http://localhost:8000/api/v1/stream/status",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 500,
|
|
"response_time_ms": 1.2,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 500,
|
|
"message": "Failed to get stream status: 'is_active'",
|
|
"type": "http_error",
|
|
"path": "/api/v1/stream/status"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.257473"
|
|
},
|
|
{
|
|
"test_name": "POST /api/v1/stream/start",
|
|
"description": "Start streaming (requires auth)",
|
|
"url": "http://localhost:8000/api/v1/stream/start",
|
|
"method": "POST",
|
|
"expected_status": 200,
|
|
"actual_status": 401,
|
|
"response_time_ms": 1.01,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 401,
|
|
"message": "Authentication required",
|
|
"type": "http_error",
|
|
"path": "/api/v1/stream/start"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.258782"
|
|
},
|
|
{
|
|
"test_name": "POST /api/v1/stream/stop",
|
|
"description": "Stop streaming (requires auth)",
|
|
"url": "http://localhost:8000/api/v1/stream/stop",
|
|
"method": "POST",
|
|
"expected_status": 200,
|
|
"actual_status": 401,
|
|
"response_time_ms": 1.19,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 401,
|
|
"message": "Authentication required",
|
|
"type": "http_error",
|
|
"path": "/api/v1/stream/stop"
|
|
}
|
|
},
|
|
"success": false,
|
|
"timestamp": "2025-06-07T12:31:11.260080"
|
|
},
|
|
{
|
|
"test_name": "WebSocket /ws/pose",
|
|
"description": "Pose WebSocket",
|
|
"url": "ws://localhost:8000/ws/pose",
|
|
"method": "WebSocket",
|
|
"response_time_ms": null,
|
|
"response_data": null,
|
|
"success": false,
|
|
"error": "server rejected WebSocket connection: HTTP 403",
|
|
"traceback": "Traceback (most recent call last):\n File \"/workspaces/wifi-densepose/scripts/test_api_endpoints.py\", line 164, in test_websocket_endpoint\n async with websockets.connect(ws_url) as websocket:\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 587, in __aenter__\n return await self\n ^^^^^^^^^^\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 543, in __await_impl__\n await self.connection.handshake(\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 114, in handshake\n raise self.protocol.handshake_exc\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 325, in parse\n self.process_response(response)\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 142, in process_response\n raise InvalidStatus(response)\nwebsockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 403\n",
|
|
"timestamp": "2025-06-07T12:31:11.294223"
|
|
},
|
|
{
|
|
"test_name": "WebSocket /ws/hardware",
|
|
"description": "Hardware WebSocket",
|
|
"url": "ws://localhost:8000/ws/hardware",
|
|
"method": "WebSocket",
|
|
"response_time_ms": null,
|
|
"response_data": null,
|
|
"success": false,
|
|
"error": "server rejected WebSocket connection: HTTP 403",
|
|
"traceback": "Traceback (most recent call last):\n File \"/workspaces/wifi-densepose/scripts/test_api_endpoints.py\", line 164, in test_websocket_endpoint\n async with websockets.connect(ws_url) as websocket:\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 587, in __aenter__\n return await self\n ^^^^^^^^^^\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 543, in __await_impl__\n await self.connection.handshake(\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 114, in handshake\n raise self.protocol.handshake_exc\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 325, in parse\n self.process_response(response)\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 142, in process_response\n raise InvalidStatus(response)\nwebsockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 403\n",
|
|
"timestamp": "2025-06-07T12:31:11.307920"
|
|
},
|
|
{
|
|
"test_name": "GET /docs",
|
|
"description": "API documentation",
|
|
"url": "http://localhost:8000/docs",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 3.76,
|
|
"response_data": {
|
|
"raw_response": "\n <!DOCTYPE html>\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.css\">\n <link rel=\"shortcut icon\" href=\"https://fastapi.tiangolo.com/img/favicon.png\">\n <title>WiFi-DensePose API - Swagger UI</title>\n </head>\n <body>\n <div id=\"swagger-ui\">\n </div>\n <script src=\"https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.js\"></script>\n <!-- `SwaggerUIBundle` is now available on the page -->\n <script>\n const ui = SwaggerUIBundle({\n url: '/openapi.json',\n \"dom_id\": \"#swagger-ui\",\n\"layout\": \"BaseLayout\",\n\"deepLinking\": true,\n\"showExtensions\": true,\n\"showCommonExtensions\": true,\noauth2RedirectUrl: window.location.origin + '/docs/oauth2-redirect',\n presets: [\n SwaggerUIBundle.presets.apis,\n SwaggerUIBundle.SwaggerUIStandalonePreset\n ],\n })\n </script>\n </body>\n </html>\n "
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.311823"
|
|
},
|
|
{
|
|
"test_name": "GET /openapi.json",
|
|
"description": "OpenAPI schema",
|
|
"url": "http://localhost:8000/openapi.json",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 4.89,
|
|
"response_data": {
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "WiFi-DensePose API",
|
|
"description": "WiFi-based human pose estimation and activity recognition API",
|
|
"version": "1.0.0"
|
|
},
|
|
"paths": {
|
|
"/health/health": {
|
|
"get": {
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Health Check",
|
|
"description": "Comprehensive system health check.",
|
|
"operationId": "health_check_health_health_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SystemHealth"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/health/ready": {
|
|
"get": {
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Readiness Check",
|
|
"description": "Check if system is ready to serve requests.",
|
|
"operationId": "readiness_check_health_ready_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ReadinessCheck"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/health/live": {
|
|
"get": {
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Liveness Check",
|
|
"description": "Simple liveness check for load balancers.",
|
|
"operationId": "liveness_check_health_live_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/health/metrics": {
|
|
"get": {
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Get System Metrics",
|
|
"description": "Get detailed system metrics.",
|
|
"operationId": "get_system_metrics_health_metrics_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/health/version": {
|
|
"get": {
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Get Version Info",
|
|
"description": "Get application version information.",
|
|
"operationId": "get_version_info_health_version_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/pose/current": {
|
|
"get": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Get Current Pose Estimation",
|
|
"description": "Get current pose estimation from WiFi signals.",
|
|
"operationId": "get_current_pose_estimation_api_v1_pose_current_get",
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "confidence_threshold",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number",
|
|
"maximum": 1.0,
|
|
"minimum": 0.0
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Confidence Threshold"
|
|
}
|
|
},
|
|
{
|
|
"name": "max_persons",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"maximum": 50,
|
|
"minimum": 1
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Max Persons"
|
|
}
|
|
},
|
|
{
|
|
"name": "include_keypoints",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"title": "Include Keypoints"
|
|
}
|
|
},
|
|
{
|
|
"name": "include_segmentation",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"title": "Include Segmentation"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Zone Ids"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PoseEstimationResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/pose/analyze": {
|
|
"post": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Analyze Pose Data",
|
|
"description": "Trigger pose analysis with custom parameters.",
|
|
"operationId": "analyze_pose_data_api_v1_pose_analyze_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PoseEstimationRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PoseEstimationResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/pose/zones/{zone_id}/occupancy": {
|
|
"get": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Get Zone Occupancy",
|
|
"description": "Get current occupancy for a specific zone.",
|
|
"operationId": "get_zone_occupancy_api_v1_pose_zones__zone_id__occupancy_get",
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "zone_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Zone Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/pose/zones/summary": {
|
|
"get": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Get Zones Summary",
|
|
"description": "Get occupancy summary for all zones.",
|
|
"operationId": "get_zones_summary_api_v1_pose_zones_summary_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/pose/historical": {
|
|
"post": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Get Historical Data",
|
|
"description": "Get historical pose estimation data.",
|
|
"operationId": "get_historical_data_api_v1_pose_historical_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HistoricalDataRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/pose/activities": {
|
|
"get": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Get Detected Activities",
|
|
"description": "Get recently detected activities.",
|
|
"operationId": "get_detected_activities_api_v1_pose_activities_get",
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "zone_id",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Filter by zone ID",
|
|
"title": "Zone Id"
|
|
},
|
|
"description": "Filter by zone ID"
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"description": "Maximum number of activities",
|
|
"default": 10,
|
|
"title": "Limit"
|
|
},
|
|
"description": "Maximum number of activities"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/pose/calibrate": {
|
|
"post": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Calibrate Pose System",
|
|
"description": "Calibrate the pose estimation system.",
|
|
"operationId": "calibrate_pose_system_api_v1_pose_calibrate_post",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/pose/calibration/status": {
|
|
"get": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Get Calibration Status",
|
|
"description": "Get current calibration status.",
|
|
"operationId": "get_calibration_status_api_v1_pose_calibration_status_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/pose/stats": {
|
|
"get": {
|
|
"tags": [
|
|
"Pose Estimation"
|
|
],
|
|
"summary": "Get Pose Statistics",
|
|
"description": "Get pose estimation statistics.",
|
|
"operationId": "get_pose_statistics_api_v1_pose_stats_get",
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "hours",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"maximum": 168,
|
|
"minimum": 1,
|
|
"description": "Hours of data to analyze",
|
|
"default": 24,
|
|
"title": "Hours"
|
|
},
|
|
"description": "Hours of data to analyze"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stream/status": {
|
|
"get": {
|
|
"tags": [
|
|
"Streaming"
|
|
],
|
|
"summary": "Get Stream Status",
|
|
"description": "Get current streaming status.",
|
|
"operationId": "get_stream_status_api_v1_stream_status_get",
|
|
"parameters": [
|
|
{
|
|
"name": "websocket_token",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Websocket Token"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StreamStatus"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stream/start": {
|
|
"post": {
|
|
"tags": [
|
|
"Streaming"
|
|
],
|
|
"summary": "Start Streaming",
|
|
"description": "Start the streaming service.",
|
|
"operationId": "start_streaming_api_v1_stream_start_post",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/stream/stop": {
|
|
"post": {
|
|
"tags": [
|
|
"Streaming"
|
|
],
|
|
"summary": "Stop Streaming",
|
|
"description": "Stop the streaming service.",
|
|
"operationId": "stop_streaming_api_v1_stream_stop_post",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/stream/clients": {
|
|
"get": {
|
|
"tags": [
|
|
"Streaming"
|
|
],
|
|
"summary": "Get Connected Clients",
|
|
"description": "Get list of connected WebSocket clients.",
|
|
"operationId": "get_connected_clients_api_v1_stream_clients_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/stream/clients/{client_id}": {
|
|
"delete": {
|
|
"tags": [
|
|
"Streaming"
|
|
],
|
|
"summary": "Disconnect Client",
|
|
"description": "Disconnect a specific WebSocket client.",
|
|
"operationId": "disconnect_client_api_v1_stream_clients__client_id__delete",
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "client_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Client Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stream/broadcast": {
|
|
"post": {
|
|
"tags": [
|
|
"Streaming"
|
|
],
|
|
"summary": "Broadcast Message",
|
|
"description": "Broadcast a message to connected WebSocket clients.",
|
|
"operationId": "broadcast_message_api_v1_stream_broadcast_post",
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "stream_type",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Target stream type",
|
|
"title": "Stream Type"
|
|
},
|
|
"description": "Target stream type"
|
|
},
|
|
{
|
|
"name": "zone_ids",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Target zone IDs",
|
|
"title": "Zone Ids"
|
|
},
|
|
"description": "Target zone IDs"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"title": "Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stream/metrics": {
|
|
"get": {
|
|
"tags": [
|
|
"Streaming"
|
|
],
|
|
"summary": "Get Streaming Metrics",
|
|
"description": "Get streaming performance metrics.",
|
|
"operationId": "get_streaming_metrics_api_v1_stream_metrics_get",
|
|
"parameters": [
|
|
{
|
|
"name": "websocket_token",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Websocket Token"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/": {
|
|
"get": {
|
|
"summary": "Root",
|
|
"description": "Root endpoint with API information.",
|
|
"operationId": "root__get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/info": {
|
|
"get": {
|
|
"summary": "Api Info",
|
|
"description": "Get detailed API information.",
|
|
"operationId": "api_info_api_v1_info_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/status": {
|
|
"get": {
|
|
"summary": "Api Status",
|
|
"description": "Get current API status.",
|
|
"operationId": "api_status_api_v1_status_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/metrics": {
|
|
"get": {
|
|
"summary": "Api Metrics",
|
|
"description": "Get API metrics.",
|
|
"operationId": "api_metrics_api_v1_metrics_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/dev/config": {
|
|
"get": {
|
|
"summary": "Dev Config",
|
|
"description": "Get current configuration (development only).",
|
|
"operationId": "dev_config_api_v1_dev_config_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/dev/reset": {
|
|
"post": {
|
|
"summary": "Dev Reset",
|
|
"description": "Reset services (development only).",
|
|
"operationId": "dev_reset_api_v1_dev_reset_post",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"ComponentHealth": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name",
|
|
"description": "Component name"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"title": "Status",
|
|
"description": "Health status (healthy, degraded, unhealthy)"
|
|
},
|
|
"message": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Message",
|
|
"description": "Status message"
|
|
},
|
|
"last_check": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "Last Check",
|
|
"description": "Last health check timestamp"
|
|
},
|
|
"uptime_seconds": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Uptime Seconds",
|
|
"description": "Component uptime"
|
|
},
|
|
"metrics": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Metrics",
|
|
"description": "Component metrics"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"status",
|
|
"last_check"
|
|
],
|
|
"title": "ComponentHealth",
|
|
"description": "Health status for a system component."
|
|
},
|
|
"HTTPValidationError": {
|
|
"properties": {
|
|
"detail": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ValidationError"
|
|
},
|
|
"type": "array",
|
|
"title": "Detail"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "HTTPValidationError"
|
|
},
|
|
"HistoricalDataRequest": {
|
|
"properties": {
|
|
"start_time": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "Start Time",
|
|
"description": "Start time for data query"
|
|
},
|
|
"end_time": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "End Time",
|
|
"description": "End time for data query"
|
|
},
|
|
"zone_ids": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Zone Ids",
|
|
"description": "Filter by specific zones"
|
|
},
|
|
"aggregation_interval": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"maximum": 3600.0,
|
|
"minimum": 60.0
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Aggregation Interval",
|
|
"description": "Aggregation interval in seconds",
|
|
"default": 300
|
|
},
|
|
"include_raw_data": {
|
|
"type": "boolean",
|
|
"title": "Include Raw Data",
|
|
"description": "Include raw detection data",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"start_time",
|
|
"end_time"
|
|
],
|
|
"title": "HistoricalDataRequest",
|
|
"description": "Request model for historical pose data."
|
|
},
|
|
"PersonPose": {
|
|
"properties": {
|
|
"person_id": {
|
|
"type": "string",
|
|
"title": "Person Id",
|
|
"description": "Unique person identifier"
|
|
},
|
|
"confidence": {
|
|
"type": "number",
|
|
"title": "Confidence",
|
|
"description": "Detection confidence score"
|
|
},
|
|
"bounding_box": {
|
|
"additionalProperties": {
|
|
"type": "number"
|
|
},
|
|
"type": "object",
|
|
"title": "Bounding Box",
|
|
"description": "Person bounding box"
|
|
},
|
|
"keypoints": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Keypoints",
|
|
"description": "Body keypoints with coordinates and confidence"
|
|
},
|
|
"segmentation": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Segmentation",
|
|
"description": "DensePose segmentation data"
|
|
},
|
|
"zone_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Zone Id",
|
|
"description": "Zone where person is detected"
|
|
},
|
|
"activity": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Activity",
|
|
"description": "Detected activity"
|
|
},
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "Timestamp",
|
|
"description": "Detection timestamp"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"person_id",
|
|
"confidence",
|
|
"bounding_box",
|
|
"timestamp"
|
|
],
|
|
"title": "PersonPose",
|
|
"description": "Person pose data model."
|
|
},
|
|
"PoseEstimationRequest": {
|
|
"properties": {
|
|
"zone_ids": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Zone Ids",
|
|
"description": "Specific zones to analyze (all zones if not specified)"
|
|
},
|
|
"confidence_threshold": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number",
|
|
"maximum": 1.0,
|
|
"minimum": 0.0
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Confidence Threshold",
|
|
"description": "Minimum confidence threshold for detections"
|
|
},
|
|
"max_persons": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"maximum": 50.0,
|
|
"minimum": 1.0
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Max Persons",
|
|
"description": "Maximum number of persons to detect"
|
|
},
|
|
"include_keypoints": {
|
|
"type": "boolean",
|
|
"title": "Include Keypoints",
|
|
"description": "Include detailed keypoint data",
|
|
"default": true
|
|
},
|
|
"include_segmentation": {
|
|
"type": "boolean",
|
|
"title": "Include Segmentation",
|
|
"description": "Include DensePose segmentation masks",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "PoseEstimationRequest",
|
|
"description": "Request model for pose estimation."
|
|
},
|
|
"PoseEstimationResponse": {
|
|
"properties": {
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "Timestamp",
|
|
"description": "Analysis timestamp"
|
|
},
|
|
"frame_id": {
|
|
"type": "string",
|
|
"title": "Frame Id",
|
|
"description": "Unique frame identifier"
|
|
},
|
|
"persons": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PersonPose"
|
|
},
|
|
"type": "array",
|
|
"title": "Persons",
|
|
"description": "Detected persons"
|
|
},
|
|
"zone_summary": {
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
},
|
|
"type": "object",
|
|
"title": "Zone Summary",
|
|
"description": "Person count per zone"
|
|
},
|
|
"processing_time_ms": {
|
|
"type": "number",
|
|
"title": "Processing Time Ms",
|
|
"description": "Processing time in milliseconds"
|
|
},
|
|
"metadata": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Metadata",
|
|
"description": "Additional metadata"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"timestamp",
|
|
"frame_id",
|
|
"persons",
|
|
"zone_summary",
|
|
"processing_time_ms"
|
|
],
|
|
"title": "PoseEstimationResponse",
|
|
"description": "Response model for pose estimation."
|
|
},
|
|
"ReadinessCheck": {
|
|
"properties": {
|
|
"ready": {
|
|
"type": "boolean",
|
|
"title": "Ready",
|
|
"description": "Whether system is ready to serve requests"
|
|
},
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "Timestamp",
|
|
"description": "Readiness check timestamp"
|
|
},
|
|
"checks": {
|
|
"additionalProperties": {
|
|
"type": "boolean"
|
|
},
|
|
"type": "object",
|
|
"title": "Checks",
|
|
"description": "Individual readiness checks"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"title": "Message",
|
|
"description": "Readiness status message"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"ready",
|
|
"timestamp",
|
|
"checks",
|
|
"message"
|
|
],
|
|
"title": "ReadinessCheck",
|
|
"description": "System readiness check result."
|
|
},
|
|
"StreamStatus": {
|
|
"properties": {
|
|
"is_active": {
|
|
"type": "boolean",
|
|
"title": "Is Active",
|
|
"description": "Whether streaming is active"
|
|
},
|
|
"connected_clients": {
|
|
"type": "integer",
|
|
"title": "Connected Clients",
|
|
"description": "Number of connected clients"
|
|
},
|
|
"streams": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array",
|
|
"title": "Streams",
|
|
"description": "Active streams"
|
|
},
|
|
"uptime_seconds": {
|
|
"type": "number",
|
|
"title": "Uptime Seconds",
|
|
"description": "Stream uptime in seconds"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"is_active",
|
|
"connected_clients",
|
|
"streams",
|
|
"uptime_seconds"
|
|
],
|
|
"title": "StreamStatus",
|
|
"description": "Stream status model."
|
|
},
|
|
"SystemHealth": {
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"title": "Status",
|
|
"description": "Overall system status"
|
|
},
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "Timestamp",
|
|
"description": "Health check timestamp"
|
|
},
|
|
"uptime_seconds": {
|
|
"type": "number",
|
|
"title": "Uptime Seconds",
|
|
"description": "System uptime"
|
|
},
|
|
"components": {
|
|
"additionalProperties": {
|
|
"$ref": "#/components/schemas/ComponentHealth"
|
|
},
|
|
"type": "object",
|
|
"title": "Components",
|
|
"description": "Component health status"
|
|
},
|
|
"system_metrics": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "System Metrics",
|
|
"description": "System-level metrics"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"timestamp",
|
|
"uptime_seconds",
|
|
"components",
|
|
"system_metrics"
|
|
],
|
|
"title": "SystemHealth",
|
|
"description": "Overall system health status."
|
|
},
|
|
"ValidationError": {
|
|
"properties": {
|
|
"loc": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
]
|
|
},
|
|
"type": "array",
|
|
"title": "Location"
|
|
},
|
|
"msg": {
|
|
"type": "string",
|
|
"title": "Message"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"title": "Error Type"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"loc",
|
|
"msg",
|
|
"type"
|
|
],
|
|
"title": "ValidationError"
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"HTTPBearer": {
|
|
"type": "http",
|
|
"scheme": "bearer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.317201"
|
|
},
|
|
{
|
|
"test_name": "GET /",
|
|
"description": "Root endpoint",
|
|
"url": "http://localhost:8000/",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 3.06,
|
|
"response_data": {
|
|
"name": "WiFi-DensePose API",
|
|
"version": "1.0.0",
|
|
"environment": "development",
|
|
"docs_url": "/docs",
|
|
"api_prefix": "/api/v1",
|
|
"features": {
|
|
"authentication": false,
|
|
"rate_limiting": false,
|
|
"websockets": true,
|
|
"real_time_processing": true
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.320563"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/info",
|
|
"description": "API information",
|
|
"url": "http://localhost:8000/api/v1/info",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 5.05,
|
|
"response_data": {
|
|
"api": {
|
|
"name": "WiFi-DensePose API",
|
|
"version": "1.0.0",
|
|
"environment": "development",
|
|
"prefix": "/api/v1"
|
|
},
|
|
"services": {
|
|
"total_services": 7,
|
|
"initialized": true,
|
|
"started": true,
|
|
"background_tasks": 2,
|
|
"services": {
|
|
"health": {
|
|
"type": "HealthCheckService",
|
|
"module": "src.services.health_check"
|
|
},
|
|
"metrics": {
|
|
"type": "MetricsService",
|
|
"module": "src.services.metrics"
|
|
},
|
|
"hardware": {
|
|
"type": "HardwareService",
|
|
"module": "src.services.hardware_service"
|
|
},
|
|
"pose": {
|
|
"type": "PoseService",
|
|
"module": "src.services.pose_service"
|
|
},
|
|
"stream": {
|
|
"type": "StreamService",
|
|
"module": "src.services.stream_service"
|
|
},
|
|
"pose_stream_handler": {
|
|
"type": "PoseStreamHandler",
|
|
"module": "src.api.websocket.pose_stream"
|
|
},
|
|
"connection_manager": {
|
|
"type": "ConnectionManager",
|
|
"module": "src.api.websocket.connection_manager"
|
|
}
|
|
}
|
|
},
|
|
"features": {
|
|
"authentication": false,
|
|
"rate_limiting": false,
|
|
"websockets": true,
|
|
"real_time_processing": true,
|
|
"historical_data": true
|
|
},
|
|
"limits": {
|
|
"rate_limit_requests": 100,
|
|
"rate_limit_window": 3600
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.325942"
|
|
},
|
|
{
|
|
"test_name": "GET /api/v1/status",
|
|
"description": "API status",
|
|
"url": "http://localhost:8000/api/v1/status",
|
|
"method": "GET",
|
|
"expected_status": 200,
|
|
"actual_status": 200,
|
|
"response_time_ms": 3.88,
|
|
"response_data": {
|
|
"api": {
|
|
"status": "healthy",
|
|
"version": "1.0.0",
|
|
"environment": "development"
|
|
},
|
|
"services": {
|
|
"health": {
|
|
"status": "healthy",
|
|
"initialized": true,
|
|
"running": true,
|
|
"services_monitored": 6,
|
|
"uptime": 426.1675431728363
|
|
},
|
|
"metrics": {
|
|
"status": "healthy",
|
|
"initialized": true,
|
|
"running": true,
|
|
"metrics_count": 14,
|
|
"counters_count": 0,
|
|
"gauges_count": 0,
|
|
"histograms_count": 0,
|
|
"uptime": 426.1675446033478
|
|
},
|
|
"hardware": {
|
|
"status": "healthy",
|
|
"running": true,
|
|
"last_error": null,
|
|
"statistics": {
|
|
"total_samples": 0,
|
|
"successful_samples": 0,
|
|
"failed_samples": 0,
|
|
"average_sample_rate": 0.0,
|
|
"last_sample_time": null,
|
|
"connected_routers": 0
|
|
},
|
|
"configuration": {
|
|
"mock_hardware": true,
|
|
"wifi_interface": "wlan0",
|
|
"polling_interval": 0.1,
|
|
"buffer_size": 1000
|
|
},
|
|
"routers": [
|
|
{
|
|
"router_id": "main_router",
|
|
"healthy": false,
|
|
"connected": false,
|
|
"last_data_time": null,
|
|
"error_count": 0,
|
|
"configuration": {
|
|
"host": "192.168.1.1",
|
|
"port": 22,
|
|
"username": "admin",
|
|
"interface": "wlan0"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"pose": {
|
|
"status": "healthy",
|
|
"initialized": true,
|
|
"running": true,
|
|
"last_error": null,
|
|
"statistics": {
|
|
"total_processed": 11598,
|
|
"successful_detections": 11598,
|
|
"failed_detections": 0,
|
|
"average_confidence": 0.6238356508747995,
|
|
"processing_time_ms": 0.7697966890843242
|
|
},
|
|
"configuration": {
|
|
"mock_data": true,
|
|
"confidence_threshold": 0.5,
|
|
"max_persons": 10,
|
|
"batch_size": 32
|
|
}
|
|
},
|
|
"stream": {
|
|
"status": "healthy",
|
|
"running": true,
|
|
"last_error": null,
|
|
"connections": {
|
|
"active": 0,
|
|
"total": 0
|
|
},
|
|
"buffers": {
|
|
"pose_buffer_size": 0,
|
|
"csi_buffer_size": 0,
|
|
"max_buffer_size": 100
|
|
},
|
|
"statistics": {
|
|
"active_connections": 0,
|
|
"total_connections": 0,
|
|
"messages_sent": 0,
|
|
"messages_failed": 0,
|
|
"data_points_streamed": 0,
|
|
"average_latency_ms": 0.0
|
|
},
|
|
"configuration": {
|
|
"stream_fps": 30,
|
|
"buffer_size": 100,
|
|
"ping_interval": 60,
|
|
"timeout": 300
|
|
}
|
|
},
|
|
"pose_stream_handler": {
|
|
"status": "unknown"
|
|
},
|
|
"connection_manager": {
|
|
"status": "unknown"
|
|
}
|
|
},
|
|
"connections": {
|
|
"total_clients": 0,
|
|
"clients_by_type": {},
|
|
"clients_by_zone": {},
|
|
"active_clients": 0,
|
|
"inactive_clients": 0
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.329977"
|
|
},
|
|
{
|
|
"test_name": "GET /nonexistent",
|
|
"description": "Non-existent endpoint",
|
|
"url": "http://localhost:8000/nonexistent",
|
|
"method": "GET",
|
|
"expected_status": 404,
|
|
"actual_status": 404,
|
|
"response_time_ms": 3.24,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 404,
|
|
"message": "Not Found",
|
|
"type": "http_error",
|
|
"path": "/nonexistent"
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.333478"
|
|
},
|
|
{
|
|
"test_name": "POST /api/v1/pose/analyze",
|
|
"description": "Unauthorized request (no auth)",
|
|
"url": "http://localhost:8000/api/v1/pose/analyze",
|
|
"method": "POST",
|
|
"expected_status": 401,
|
|
"actual_status": 401,
|
|
"response_time_ms": 8.17,
|
|
"response_data": {
|
|
"error": {
|
|
"code": 401,
|
|
"message": "Authentication required",
|
|
"type": "http_error",
|
|
"path": "/api/v1/pose/analyze"
|
|
}
|
|
},
|
|
"success": true,
|
|
"timestamp": "2025-06-07T12:31:11.341935"
|
|
}
|
|
]
|
|
} |