{"id":30162923,"url":"https://github.com/rooshikeshbhatt/item-inspector-ai","last_synced_at":"2026-05-09T19:03:22.831Z","repository":{"id":297869614,"uuid":"998119922","full_name":"rooshikeshbhatt/Item-Inspector-AI","owner":"rooshikeshbhatt","description":"AI-based product condition detection using BLIP-2 + FastAPI + Phi-4 (Ollama)","archived":false,"fork":false,"pushed_at":"2025-06-08T01:52:14.000Z","size":1451,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-11T17:52:09.988Z","etag":null,"topics":["ai","blip2","computer-vision","condition-scoring","ecommerce-ai","fastapi","hugging","image-analysis","image-tagging","multimodal-ai","natural-language-generation","ollama","open-source","phi4","product-inspection","prompt-engineering","pyotrch","python","visual-language-models","zero-shot-learning"],"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/rooshikeshbhatt.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,"zenodo":null}},"created_at":"2025-06-07T22:46:32.000Z","updated_at":"2025-06-08T01:52:17.000Z","dependencies_parsed_at":"2025-06-08T02:39:39.728Z","dependency_job_id":"bc78d385-cb4a-4ef5-8054-d8e5258657c9","html_url":"https://github.com/rooshikeshbhatt/Item-Inspector-AI","commit_stats":null,"previous_names":["rooshikesh/item-inspector-ai","rooshikeshbhatt/item-inspector-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rooshikeshbhatt/Item-Inspector-AI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooshikeshbhatt%2FItem-Inspector-AI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooshikeshbhatt%2FItem-Inspector-AI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooshikeshbhatt%2FItem-Inspector-AI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooshikeshbhatt%2FItem-Inspector-AI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rooshikeshbhatt","download_url":"https://codeload.github.com/rooshikeshbhatt/Item-Inspector-AI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooshikeshbhatt%2FItem-Inspector-AI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32831504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["ai","blip2","computer-vision","condition-scoring","ecommerce-ai","fastapi","hugging","image-analysis","image-tagging","multimodal-ai","natural-language-generation","ollama","open-source","phi4","product-inspection","prompt-engineering","pyotrch","python","visual-language-models","zero-shot-learning"],"created_at":"2025-08-11T17:35:48.283Z","updated_at":"2026-05-09T19:03:22.824Z","avatar_url":"https://github.com/rooshikeshbhatt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🕵️‍♂️ Item-Inspector AI\n\n![Python](https://img.shields.io/badge/Python-3.10+-blue?logo=python)\n![FastAPI](https://img.shields.io/badge/FastAPI-🚀-brightgreen?logo=fastapi)\n![PyTorch](https://img.shields.io/badge/PyTorch-Used-red?logo=pytorch)\n![Transformers](https://img.shields.io/badge/HuggingFace-Transformers-yellow?logo=huggingface)\n![BLIP2](https://img.shields.io/badge/BLIP--2-Salesforce-purple)\n![Ollama](https://img.shields.io/badge/Ollama-LLM%20Runtime-lightgrey?logo=ollama)\n![License](https://img.shields.io/badge/License-MIT-green)\n![AI Game Included](https://img.shields.io/badge/Easter_Egg%3A-AI_Tic_Tac_Toe-ff69b4)\n\n**Visual AI for Product Condition Assessment \u0026 Human-like Reporting**\n\n\u003e Upload product images, let BLIP-2 understand the item, generate human-like condition reports with Phi-4, and enjoy the magic of zero-shot image-to-text reasoning. Also… there's a secret mini-game.\n\n## 📚 Table of Contents\n- [Features](#-features)\n- [Banner](#-banner)\n- [Project Structure](#-project-structure)\n- [Installation Guide](#-installation-guide)\n- [Hardware \u0026 GPU Setup](#-hardware--gpu-setup)\n- [Bonus: Tic-Tac-Toe AI](#-bonus-tic-tac-toe-ai)\n- [Technology Stack](#-technology-stack)\n- [GitHub Topics](#-github-topics)\n- [License](#-license)\n- [Contact](#-contact)\n\n---\n\n## ✨ Features\n\n- **AI Product Recognition** – Detects object type: Watch, Shoe, Phone, etc.\n- **Material Identification** – Metal, Leather, Glass, Suede? We got it.\n- **Visual Condition Tags** – Custom per-item labels (like “scratched glass” or “torn strap”).\n- **Score Calculation** – Evaluates product damage level and assigns a 4–10 score.\n- **Natural Language Report** – Uses Phi-4 LLM to describe condition in ~50 human-like words.\n- **Frontend Upload UI** – Drag, drop, analyze.\n\n---\n\n## 📸 Banner\n\n![Banner](docs/banner.PNG)\n\n---\n\n## 🗂 Project Structure\n\n```text\nItem-Inspector AI/\n├── backend/\n│   ├── app.py               # This FastAPI file\n│   ├── requirements.txt\n│   ├── python_gpu_test.py   # Check if TensorFlow, pytorch \u0026 numpy runs on GPU\n├── frontend/\n│   └── index.html           # Web UI for uploading images\n├── sample_images/\n│   └── example_watch.jpg    # Example test image\n├── just_for_fun/\n│   └── tic_tac_toe.py       # Tic-Tac-Toe AI game\n├── README.md\n```\n---\n\n## 🛠 Installation Guide\n\n### 🔗 Prerequisites\n\n- Python 3.10+ (recommended Python 3.10.11 for GPU usage on windows)\n- GitHub Desktop or Git CLI\n- Ollama installed \u0026 phi4(phi4:14b-q4_K_M) model downloaded\n\n---\n\n### 📥 1. Clone the Repo\n\ngit clone https://github.com/Rooshikesh/Item-Inspector-AI.git\n```text\ncd Item-Inspector-AI/backend\n```\n---\n\n### 📦 2. Create Virtual Environment\n```text\npython -m venv venv\nsource venv/bin/activate  # Windows: venv\\Scripts\\activate\n```\n---\n\n### 📦 3. Install Dependencies\n\npip install -r requirements.txt\n\n---\n\n### 🧠 4. Start Ollama with Phi-4\n```text\nollama run phi4:14b-q4_K_M\n```\n---\n\n### 🚀 5. Launch FastAPI\n```text\nuvicorn app:app --reload\n```\nGo to: `http://127.0.0.1:8000/docs`\n\n---\n\n### 🌐 6. Use Web Interface (Optional)\n\nOpen frontend/index.html in your browser. Drag and drop product images.\n\n---\n\n## ⚡ Hardware \u0026 GPU Setup\n\nIf you're planning to run BLIP-2 on GPU for maximum performance, keep the following in mind:\n\n### ✅ Hardware Requirements\n- **NVIDIA GPU** with at least **8–12GB VRAM**\n  - Recommended: **RTX 3060 or higher**\n- **CUDA-compatible drivers** installed\n  - Check GPU visibility with: `nvidia-smi`\n- **Python**: Version **3.10+**\n\n### ✅ Python Environment for GPU\n- Install PyTorch with CUDA support:\n  ```text\n  pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121\n  ```\n- Our code already includes:\n  ```text\n  device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n  torch_dtype=torch.float16\n  ```\n  This ensures your models run on GPU if available.\n\n### ✅ BLIP-2 Optimization Settings\n- Make sure BLIP-2 loads with:\n  ```text\n  device_map=\"auto\", torch_dtype=torch.float16\n  ```\n- Images are correctly converted to RGB before inference:\n  ```text\n  img = Image.open(file.file).convert(\"RGB\")\n  ```\n### 🧪 Verify GPU with Our Utility Script\nRun the included [`python_gpu_test.py`](backend/python_gpu_test.py) file to confirm if TensorFlow, PyTorch, and NumPy are GPU-ready:\n```text\ncd backend\npython python_gpu_test.py\n```\nThis script will print the detected GPUs, framework versions, and whether each is using the GPU or CPU.\n\n---\n\n## 🤖 Bonus: Tic-Tac-Toe AI\n\nWhen you need a break from debugging and BLIP-2 hallucinations:\n```text\ncd just_for_fun\npython tic_tac_toe.py\n```\n* Supports easy, medium, and hard mode\n* Uses Minimax algorithm in Hard mode to destroy your confidence 🔥\n\n---\n\n## 💡 Technology Stack\n\n* BLIP-2 (Salesforce) - Vision Language\n* Phi-4 (Ollama) - Language Generation\n* FastAPI - Backend Framework\n* HTML/JS - Minimal Frontend\n* Hugging Face Transformers\n* PyTorch\n\n---\n\n## 🏷️ GitHub Topics\n\nai, blip2, phi4, fastapi, transformers, computer-vision, image-classification,\nproduct-inspection, natural-language-generation, multimodal-ai, semantic-analysis,\necommerce-ai, repairtech, humanlike-ai, condition-scoring, pytorch, webapi,\nbackend, frontend, python\n\n---\n\n## 📄 License\n\nMIT — use it, share it, modify it. Just don’t forget to smile when it works.\n\n---\n\n## ✉️ Contact\n\n**Rooshikesh Bhatt**\nrooshikeshbhatt@gmail.com\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frooshikeshbhatt%2Fitem-inspector-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frooshikeshbhatt%2Fitem-inspector-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frooshikeshbhatt%2Fitem-inspector-ai/lists"}