{"id":24989811,"url":"https://github.com/clementsan/object_detection_yolos_api","last_synced_at":"2026-04-29T20:04:26.322Z","repository":{"id":271318624,"uuid":"898674312","full_name":"clementsan/object_detection_yolos_api","owner":"clementsan","description":"AI-driven object detection via FastAPI","archived":false,"fork":false,"pushed_at":"2025-01-17T00:05:49.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T20:46:19.516Z","etag":null,"topics":["ai","api","deep-learning","fastapi","object-detection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clementsan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-12-04T20:26:10.000Z","updated_at":"2025-01-17T00:05:50.000Z","dependencies_parsed_at":"2025-01-07T01:28:39.790Z","dependency_job_id":"37e12e05-474d-445b-876c-0dc75980c452","html_url":"https://github.com/clementsan/object_detection_yolos_api","commit_stats":null,"previous_names":["clementsan/object_detection_yolos_api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clementsan/object_detection_yolos_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementsan%2Fobject_detection_yolos_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementsan%2Fobject_detection_yolos_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementsan%2Fobject_detection_yolos_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementsan%2Fobject_detection_yolos_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clementsan","download_url":"https://codeload.github.com/clementsan/object_detection_yolos_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementsan%2Fobject_detection_yolos_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["ai","api","deep-learning","fastapi","object-detection"],"created_at":"2025-02-04T13:03:34.762Z","updated_at":"2026-04-29T20:04:26.264Z","avatar_url":"https://github.com/clementsan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Object detection via FastAPI\n\n[![](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/cvachet/object-detection-yolos-api)](https://hub.docker.com/repository/docker/cvachet/object-detection-yolos-api)\n\n![example workflow](https://github.com/clementsan/object_detection_yolos_api/actions/workflows/ci_python.yml/badge.svg)\n![example workflow](https://github.com/clementsan/object_detection_yolos_api/actions/workflows/publish_docker_image.yml/badge.svg)\n\n**Aim:** AI-driven object detection via FastAPI (on COCO image dataset)\n\n**Machine learning models:**\n - hustvl/yolos-tiny\n - hustvl/yolos-small\n\n-----\n### Table of contents:\n - [Direct execution](#1-direct-execution)\n   - [Run FastAPI interface](#11-run-fastapi-interface)\n   - [Run API query via curl command](#12-run-api-query-via-curl-command)\n   - [Run API query via python script](#13-run-api-query-via-python-script)\n   - [Tests via pytest library](#14-tests-via-pytest-library)\n - [Execution via docker container](#2-execution-via-docker-container)\n   - [Build image and run docker container](#21-build-image-and-run-docker-container)\n   - [Run query via API](#22-run-query-via-api)\n - [Deployment on Docker hub](#3-deployment-on-docker-hub)\n - [MLOps pipeline via GitHub actions](#4-mlops-pipeline-via-github-actions)\n----\n\n## 1. Direct execution\n\n### 1.1. Run FastAPI interface\n\nCommand line in development mode:\n\u003e fastapi dev app/main.py\n\nManual command line in production:\n\u003e fastapi run app/main.py\n\n\u003cb\u003eNotes:\u003c/b\u003e\n - Serving at: http://127.0.0.1:8000 \n - API docs: http://127.0.0.1:8000/docs\n\n\n\n### 1.2. Run API query via curl command\n\nCommand lines:\n - Endpoint \"/\":\n\u003e curl -X 'GET' -H 'accept: application/json' 'http://127.0.0.1:8000/'\n\n- Endpoint \"/info\":\n\u003e curl -X 'GET' -H 'accept: application/json' 'http://127.0.0.1:8000/info'\n  \n\n - Endpoint \"/api/v1/detect\":\n\u003e  curl -X POST -F \"image=@./tests/data/savanna.jpg\" http://127.0.0.1:8000/api/v1/detect\n\n - Endpoint \"/api/v1/detect\" with optional model type (e.g. yolos-tiny or yolos-small):\n\u003e  curl -X POST -F \"image=@./tests/data/savanna.jpg\" http://127.0.0.1:8000/api/v1/detect?model=yolos-small\n\n\n### 1.3. Run API query via python script\n\nCommand line:\n\u003e python app/inference_api.py -u \"http://127.0.0.1:8000/api/v1/detect\" -f tests/data/savanna.jpg\n\n### 1.4. Tests via pytest library\n\nCommand lines:\n\u003e pytest tests/ -v\n\n\u003e pytest tests/ -s -o log_cli=true -o log_level=DEBUG\n\n\n## 2. Execution via docker container\n\n### 2.1. Build image and run docker container\n\nCommand lines:\n\u003e sudo docker build -t object-detection-yolos-api .\n\n\u003e sudo docker run --name object-detection-yolos-api-cont -p 8000:8000 object-detection-yolos-api\n\n### 2.2. Run query via API\n\nCommand lines:\n - Endpoint \"/\":\n\u003e curl -X 'GET' 'http://0.0.0.0:8000/' -H 'accept: application/json'\n\n - Endpoint \"/info\":\n\u003e curl -X 'GET' -H 'accept: application/json' 'http://0.0.0.0:8000/info'\n\n - Endpoint \"/api/v1/detect\":\n\u003e  curl -X 'POST' -F \"image=@./tests/data/savanna.jpg\" http://0.0.0.0:8000/api/v1/detect \n\n - Endpoint \"/api/v1/detect\" with optional model type (e.g. yolos-tiny or yolos-small):\n\u003e  curl -X POST -F \"image=@./tests/data/savanna.jpg\" http://0.0.0.0:8000/api/v1/detect?model=yolos-small\n\n\n## 3. Deployment on Docker hub\n\nThis FastAPI application is available as a Docker container on Docker hub\n\nURL: https://hub.docker.com/r/cvachet/object-detection-yolos-api\n\n\n## 4. MLOps pipeline via GitHub actions\n\nGithub actions were created to enable Continuous Integration (CI) and Continuous Deployment (CD) for this FastAPI app. \n\nYAML files:\n - Python testing suite: [ci_python.yml](.github/workflows/ci_python.yml)\n - Pushing to docker: [publish_docker_image.yml](.github/workflows/publish_docker_image.yml)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclementsan%2Fobject_detection_yolos_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclementsan%2Fobject_detection_yolos_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclementsan%2Fobject_detection_yolos_api/lists"}