{"id":50153231,"url":"https://github.com/henriktrom/pose_inference","last_synced_at":"2026-05-24T09:04:56.610Z","repository":{"id":298465012,"uuid":"991330162","full_name":"HenrikTrom/pose_inference","owner":"HenrikTrom","description":"A high-performance, multi-threaded C++ pipeline for real-time multi-camera keypoint detection.","archived":false,"fork":false,"pushed_at":"2025-08-05T14:50:03.000Z","size":6307,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T11:21:24.969Z","etag":null,"topics":["cpp","keypoint-detection","multi-threading","open-source","real-time","research-software","rtmpose"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HenrikTrom.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"Citation.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-27T13:14:52.000Z","updated_at":"2025-08-20T02:28:32.000Z","dependencies_parsed_at":"2025-06-11T08:58:50.887Z","dependency_job_id":null,"html_url":"https://github.com/HenrikTrom/pose_inference","commit_stats":null,"previous_names":["henriktrom/pose_inference"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/HenrikTrom/pose_inference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikTrom%2Fpose_inference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikTrom%2Fpose_inference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikTrom%2Fpose_inference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikTrom%2Fpose_inference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HenrikTrom","download_url":"https://codeload.github.com/HenrikTrom/pose_inference/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikTrom%2Fpose_inference/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33427584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","keypoint-detection","multi-threading","open-source","real-time","research-software","rtmpose"],"created_at":"2026-05-24T09:04:55.953Z","updated_at":"2026-05-24T09:04:56.602Z","avatar_url":"https://github.com/HenrikTrom.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧍‍♂️ Pose-Inference\n\n[![DOI](https://zenodo.org/badge/991307682.svg)](https://zenodo.org/badge/latestdoi/991307682)\n\nA high-performance, multi-threaded C++ pipeline for **real-time multi-camera keypoint detection**.\n\nDeveloped as part of [my PhD thesis](todo-thesis-link), this module enables **3D human pose estimation** from bounding box proposals generated by my [detection pipeline](https://github.com/HenrikTrom/detection-inference).\n\nThis module supports deployment in robotic systems for real-time tracking and perception and is part of my  **ROS/ROS2** [real-time 3D tracker](https://github.com/HenrikTrom/real-time-3D-tracking) and its [docker-implementation](https://github.com/HenrikTrom/ROSTrack-RT-3D).\n\n![System Setup](content/4cams.gif)\n\n## 🧪 Test results\n\n* Intel(R) Xeon(R) W-2145 CPU @ 3.70GHz, Nvidia 2080 super, Ubuntu 20.04, CUDA 11.8, TensorRT 8.6.1.6, OpenCV 4.10.0 with RTMPose and BATCH_SIZE of 5 -\u003e **Preprocess: ~1ms, NN inference ~4ms, Postprocess: ~1ms (1000 samples)**\n* AMD Ryzen 9 7900X3D CPU @ 4.40GHz, Nvidia 4070 super, Ubuntu 20.04, CUDA 12.4, TensorRT 10.9.0.34, OpenCV 4.10.0 with Yolov8 and BATCH_SIZE of 5 -\u003e **Preprocess: \u003c1ms, NN inference ~2ms, Postprocess: ~\u003c1ms (1000 samples)**\n\n## 📑 Citation\n\nIf you use this software, please use the GitHub **“Cite this repository”** button at the top(-right) of this page.\n\n## Environment\n\nThis repository is designed to run inside the Docker 🐳 container provided here:  \n[OpenCV-TRT-DEV](https://github.com/HenrikTrom/Docker-OpenCV-TensorRT-Dev)\n\nIt includes all necessary dependencies (CUDA, cuDNN, OpenCV, TensorRT, CMake).\n\n### Prerequisites\n\nIn addition to the libraries installed in the container, this project relies on:\n\n- 📦 [tensorrt-cpp-api (fork)](https://github.com/HenrikTrom/tensorrt-cpp-api)  \n  *(Originally by [cyrusbehr](https://github.com/cyrusbehr/tensorrt-cpp-api))*\n- 🧵 [cpp-utils](https://github.com/HenrikTrom/cpp_utils)  \n  *(Handles multithreading, JSON config parsing, and utility tools)*\n\n\n#### Environment Variables\n\nSet the required variables (usually done via `.env` or your shell):\n\n```bash\nOPENCV_VERSION=4.10.0     # Your installed OpenCV version\nN_CAMERAS=5               # Optional: sets system-wide batch size\n```\n\n\u003e If `N_CAMERAS` is not set, CMake will default to a batch size of **5**.\n\nUse the `trt.sh` script in `./scripts` to convert your .onnx model to a fixed batch size.\n\n#### Notes\n\n* The batch size is treated as a **hardware constraint**, defined by the number of connected cameras.\n* You can change the default batch size in `CMakeLists.txt` to fit your system.\n* Although this repo is optimized for YOLOv8 models, you can modify the post-processing stage to support **any ONNX-compatible detection model**.\n\n### Installation\n\nRun the build and installation script:\n\n```bash\nsudo ./build_install.sh\n```\n\nThis will configure the build system, compile the inference pipeline, and generate the binaries.\n\n---\n\n### Usage\n\nBefore using the pipeline, ensure the following:\n\n### Environment Variables\n\nThese should be defined in your `.env` file or shell environment:\n\n```bash\nOPENCV_VERSION=4.10.0     # Your installed OpenCV version\nN_CAMERAS=5               # Optional: sets batch size (defaults to 5)\n```\n\n\u003e If `N_CAMERAS` is not set, the system assumes a default of **5** cameras.\n\n---\n\n### 🧠 Model Requirements\n\nThis repo is designed for trained [RTMPose](https://github.com/open-mmlab/mmpose/tree/main/projects/rtmpose) models exported as `.onnx`.\nThe model must be exported with a **fixed batch size** matching your multi-camera setup.\n\nCAdapt the configuration files in the `cfg/` folder to reflect your system and model setup.\n\nYou can change the default batch size in `CMakeLists.txt` if needed.\n\n---\n\n## Executables\n\n### Benchmark\n\nAfter configuring your setup:\n\n```bash\n./build/inference_benchmark\n```\n\nThis runs the inference pipeline, processes multi-camera input, and saves images with overlayed bounding boxes and labels to the `inputs/` folder.\n\n### Video Inference Export\n\nThis executable iterates over a directory of synchronized .mp4 videos and saves the result for each video in a .json file. \n\nThis example usage assumes \u003cBATCH_SIZE\u003e .mp4 videos in an arbitrary `./test` directory\n\n```bash\n./build/video_inference_export test\n```\n\n### BBox Overlay\n\nThis executable iterates over a directory of synchronized .mp4 videos and exported inference results (from `./build/video_inference_export`). It generates new .mp4 videos with detections and a tiled video similar to the .gif in this readme.\n\nThis example usage assumes \u003cBATCH_SIZE\u003e .mp4 videos and .json files in an arbitrary `./test` directory\n\n```bash\n./build/bbox_overlay test\n```\n\n---\n\n## 📷 Applications\n\nThis inference module is optimized for:\n\n* 3D multi-camera human pose estimation\n* Online tracking and interaction\n* Real-time robotics perception pipelines\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenriktrom%2Fpose_inference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenriktrom%2Fpose_inference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenriktrom%2Fpose_inference/lists"}