{"id":20655458,"url":"https://github.com/bhimrazy/image-recognition-app-using-fastapi-and-pytorch","last_synced_at":"2025-08-23T13:15:05.600Z","repository":{"id":50471109,"uuid":"420994729","full_name":"bhimrazy/Image-Recognition-App-using-FastAPI-and-PyTorch","owner":"bhimrazy","description":"This is an image recognition application based on the FastAPI framework and PyTorch which uses pretrained DenseNet 121 model to detect the image.","archived":false,"fork":false,"pushed_at":"2023-10-15T13:12:35.000Z","size":6855,"stargazers_count":28,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T16:30:34.635Z","etag":null,"topics":["densenet-pytorch","fastapi","jinja2","python","pytorch","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/bhimrazy.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":"2021-10-25T11:26:09.000Z","updated_at":"2025-04-18T05:42:35.000Z","dependencies_parsed_at":"2024-11-16T18:11:29.059Z","dependency_job_id":"22bf9304-bbd0-47b5-bd4a-d6b60b436008","html_url":"https://github.com/bhimrazy/Image-Recognition-App-using-FastAPI-and-PyTorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bhimrazy/Image-Recognition-App-using-FastAPI-and-PyTorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2FImage-Recognition-App-using-FastAPI-and-PyTorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2FImage-Recognition-App-using-FastAPI-and-PyTorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2FImage-Recognition-App-using-FastAPI-and-PyTorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2FImage-Recognition-App-using-FastAPI-and-PyTorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhimrazy","download_url":"https://codeload.github.com/bhimrazy/Image-Recognition-App-using-FastAPI-and-PyTorch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2FImage-Recognition-App-using-FastAPI-and-PyTorch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271749008,"owners_count":24814104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"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":["densenet-pytorch","fastapi","jinja2","python","pytorch","tailwindcss"],"created_at":"2024-11-16T18:11:19.324Z","updated_at":"2025-08-23T13:15:05.572Z","avatar_url":"https://github.com/bhimrazy.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/46085301/139594375-790141df-482f-4a21-9b19-c0e47f2033f2.png\" height=\"150\"/\u003e\n  \u003cbr/\u003e\n  \u003cb\u003eImage Recognition App using FastAPI and PyTorch\u003c/b\u003e\u003cbr/\u003e\nIn this project, I have tried to build and deploy an Image Recognition App using FastAPI and\nPyTorch.\n\u003c/P\u003e\n\n## Tutorial \u003cimg src=\"https://user-images.githubusercontent.com/46085301/143214249-d6244995-1fdb-4c3f-b721-e65403a89607.gif\" alt=\"Youtube gif\" height=\"30\"/\u003e\n\n[![fastapi pytorch image recognition](https://user-images.githubusercontent.com/46085301/143211855-fe73e3b0-fc8c-4aa4-8428-e93cc16d6dfd.png)](https://youtu.be/7Rm5mGhYWVI)\n\n## Installation\nRun my Project\n\n```bash\n  git clone https://github.com/bhimrazy/Image-Recognition-App-using-FastAPI-and-PyTorch\n  cd Image-Recognition-App-using-FastAPI-and-PyTorch\n  python -m venv venv\n  source venv/bin/activate\n  pip install -r requirements.txt\n  uvicorn main:app --reload\n```\n## Image Recognition App using FastAPI and PyTorch: TODO\n- [x] Create a virtual environment\n- [x] Create FastAPI App\n    - Install fast API\n    - Install Uvicorn\n    - Install Pytest\n    - Install Jinja2\n    - Install python-multipart\n    - Install requests\n    - Create a main file with some routes\n    - Create a main test file to test the home page route\n\n- [x] Pytorch Setup\n    - Install torch \u0026 torchvision (use cpu version for small size)\n\n- [x] Prediction \n    - Create a predict post route\n    - Create a file utils.py\n    - Test predict route\n    - Create some helper function\n    - Put some test images inside static folder\n    - Create a test to upload an image in predict route\n    - Predict\n\n- [x] Create a home page for prediction\n    - Create an index.html file inside the templates directory\n    - Setup template and static directory in the main app\n    - Initial HTML for home page\n    - Use Tailwind CSS cdn link for css\n    - Google Fonts\n    - Create a form to predict\n    - update homepage route for prediction\n    - Update UI of the page\n    - Add Some javascript to autoload the image\n    - Add logo and favicon\n    - Add meta tags\n    - Add response image for preview as base64 data\n\n## 📚 RESOURCES:\n◆ PyTorch: https://pytorch.org/tutorials/intermediate/flask_rest_api_tutorial.html \u003cbr/\u003e\n◆ FastAPI: https://fastapi.tiangolo.com\n\n## Author\n- [@bhimrazy](https://www.github.com/bhimrazy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhimrazy%2Fimage-recognition-app-using-fastapi-and-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhimrazy%2Fimage-recognition-app-using-fastapi-and-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhimrazy%2Fimage-recognition-app-using-fastapi-and-pytorch/lists"}