A Linux edge application that uses a camera, OpenCV motion detection, and Gemini vision to monitor labeled inventory bins.
- Create a project and shelf, then run Setup Analyze.
- Gemini reads the visible bin labels and identifies the product assigned to each bin.
- OpenCV monitors the camera for motion and waits until the scene becomes stable.
- The stable image is sent to Gemini using the initialized bin codes.
- Gemini estimates visible quantities and identifies the product in each bin.
- The backend validates the response, updates SQLite, reports changes from the previous scan, and warns about possible product mismatches.
- USB camera integration
- OpenCV motion and stability detection
- Structured Gemini vision responses
- FastAPI backend and browser interface
- SQLite inventory storage
- Scan-to-scan quantity tracking
- Wrong-bin product warnings
- Motion cooldown and scan-lock controls
Requirements:
- Python 3.11+
- Linux device with a compatible camera
- Gemini API key
git clone https://github.com/celikender/ai_inventory.git
cd ai_inventory
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Add your GEMINI_API_KEY to .env
./run.shOpen:
- Operator interface: http://localhost:8000/ui
- Inventory dashboard: http://localhost:8000/ui/dash
- API documentation: http://localhost:8000/docs
For API development without a camera, set CAMERA_ENABLED=false in .env.
python -m unittest discover -s testsDeveloped by Ender Celik as part of an industrial automation, SCADA/MES, and IIoT engineering portfolio.
The custom labeled bins used in this prototype were designed and 3D-printed by Ender Celik.
- vLock Digital LOTO - an Inductive Automation Ignition Perspective project demonstrating digital LOTO tracking
- vMaint - a manufacturing operations and maintenance platform