{"id":43580977,"url":"https://github.com/jgfranco17/torchcam","last_synced_at":"2026-02-03T23:36:49.925Z","repository":{"id":122571803,"uuid":"582052622","full_name":"jgfranco17/torchcam","owner":"jgfranco17","description":"Applying PyTorch MiDaS model on live CV capture","archived":false,"fork":false,"pushed_at":"2024-12-13T11:42:12.000Z","size":144,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-13T12:34:01.199Z","etag":null,"topics":["computer-vision","monocular-depth-estimation","opencv-python","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgfranco17.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-25T13:24:47.000Z","updated_at":"2024-12-13T11:42:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"1678876b-3b37-44bd-be0d-e00969e11ac5","html_url":"https://github.com/jgfranco17/torchcam","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jgfranco17/torchcam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgfranco17%2Ftorchcam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgfranco17%2Ftorchcam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgfranco17%2Ftorchcam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgfranco17%2Ftorchcam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgfranco17","download_url":"https://codeload.github.com/jgfranco17/torchcam/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgfranco17%2Ftorchcam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29061828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T23:14:54.203Z","status":"ssl_error","status_checked_at":"2026-02-03T23:14:50.873Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["computer-vision","monocular-depth-estimation","opencv-python","pytorch"],"created_at":"2026-02-03T23:36:49.289Z","updated_at":"2026-02-03T23:36:49.920Z","avatar_url":"https://github.com/jgfranco17.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eTorchcam: A Monocular Depth Camera\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![STATUS](https://img.shields.io/badge/status-active-brightgreen?style=for-the-badge) ![LICENSE](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)\n\n\u003c/div\u003e\n\n---\n\n## 📝 Table of Contents\n\n- [About](#about)\n- [Getting Started](#getting_started)\n- [Usage](#usage)\n- [Testing](#testing)\n- [Authors](#authors)\n\n## 🔎 About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nThis project uses PyTorch's [MiDaS](https://pytorch.org/hub/intelisl_midas_v2/) model to generate live depth estimation streams\nusing a webcam. By applying the MiDaS model to the video stream from the webcam, the software is able to generate a real-time\ncolored depth map of the scene being captured. Runs better if [GPU is available](https://pytorch.org/docs/stable/notes/cuda.html),\nas the video stream can render depth maps faster.\n\n## 🏁 Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn order to use this project, you will need to have the following software and libraries installed:\n\n- PyTorch\n- OpenCV\n- NumPy\n\n### Installing\n\nTo get started with this project for development purposes, clone the repository to your local machine and install the required\ndependencies.\n\n```bash\ngit clone https://github.com/jgfranco17/torchcam.git\ncd torchcam\n\npip install poetry pre-commit\npre-commit install\npoetry install\n\n# Use Poetry-based virtual environment\npoetry shell\n```\n\nPre-commit is required for commits to this repo. It is recommended to run it locally, as the CI also runs on pull request so\nbest to catch it early to save time.\n\n## 🔧 Testing \u003ca name = \"testing\"\u003e\u003c/a\u003e\n\nTo run the full test suite, run the Makefile command as follows:\n\n```bash\n# Plain Pytest\npoetry run pytest\n\n# Run justfile script for testing\njust coverage\n```\n\nThis will run the test module and generates a detailed result report.\n\n### Using PyTest CLI\n\nYou can run these tests using the [PyTest](https://docs.pytest.org/en/7.3.x/) CLI. To run all tests in the directory\ncontaining the test files, navigate to the directory and enter `pytest` in the command line; for added verbosity, add\nthe `-vv` flag after. To run a specific test file, enter `pytest \u003cfilename\u003e`.\n\n```bash\n# Run all tests in the testing module with full detail\ncd torchcam\npytest -vv\n\n# Run a specific test file\ncd torchcam/tests\npytest test_package.py\n```\n\n### Why these tests are important\n\nRunning these unittests is necessary to ensure that the code is functioning as expected and meeting the requirements\nof the design specification. The unittests are designed to test each function and method of the code and to identify\nany errors or unexpected behavior. By testing the code using these PyTest unittests, we can ensure that the code\nmeets the specified requirements and that any changes made to the code do not introduce new bugs or errors.\n\nIn addition, these tests can be automated to run on every code change, allowing us to quickly identify any issues\nthat may arise and enabling us to maintain a high level of code quality.\n\nIn essence, running these PyTest unittests is a critical part of the software QA process and helps to ensure that\nour code is robust, reliable, and meets the needs of our end-users before the product hits deployment.\n\n## 🚀 Usage \u003ca name = \"usage\"\u003e\u003c/a\u003e\n\n### CLI usage\n\nTo run the depth estimation stream, simply execute the following command:\n\n```shell\n# Use Poetry to run the CLI locally\n$ poetry run torchcam\n\nUsage: torchcam [OPTIONS] COMMAND [ARGS]...\n\n  Torchcam: a monocular depth estimation tool using PyTorch.\n\nOptions:\n  --version      Show the version and exit.\n  -v, --verbose  Increase verbosity. Use multiple times for more detail (e.g. -vv for debug).\n  --help         Show this message and exit.\n\nCommands:\n  run  Run the camera.\n\nAuthor: Chino Franco\nGithub: https://github.com/jgfranco17\n```\n\nA PyPi implementation is in the works, and instructions to install via official channels will be posted here\nwhen available.\n\n## ⛏️ Built Using \u003ca name = \"built_using\"\u003e\u003c/a\u003e\n\n![OpenCV](https://img.shields.io/badge/PyTorch-2.4.1-orange?style=for-the-badge\u0026logo=pytorch\u0026logoColor=orange)\n![OpenCV](https://img.shields.io/badge/OpenCV-4.10.0.84-orange?style=for-the-badge\u0026logo=opencv\u0026logoColor=orange)\n![NumPy](https://img.shields.io/badge/numpy-2.1.1-orange?style=for-the-badge\u0026logo=numpy\u0026logoColor=orange)\n\n## ✍️ Authors \u003ca name = \"authors\"\u003e\u003c/a\u003e\n\n### Primary\n\n- [Chino Franco](https://github.com/jgfranco17)\n\n### Contributors\n\n- _Pending_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgfranco17%2Ftorchcam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgfranco17%2Ftorchcam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgfranco17%2Ftorchcam/lists"}