https://github.com/dynle/raspi-inventory-management-system
Inventory management system using Raspberry Pi camera module with YOLOv8 for product detection, face recognition for person identification, Django for server, and SQLite for DB
https://github.com/dynle/raspi-inventory-management-system
inventory-management-system raspberry-pi sqlite yolo
Last synced: 3 months ago
JSON representation
Inventory management system using Raspberry Pi camera module with YOLOv8 for product detection, face recognition for person identification, Django for server, and SQLite for DB
- Host: GitHub
- URL: https://github.com/dynle/raspi-inventory-management-system
- Owner: dynle
- License: mit
- Created: 2024-07-24T04:13:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-13T02:15:25.000Z (almost 2 years ago)
- Last Synced: 2025-02-06T16:05:53.464Z (over 1 year ago)
- Topics: inventory-management-system, raspberry-pi, sqlite, yolo
- Language: Jupyter Notebook
- Homepage:
- Size: 48.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Raspberry Pi Inventory Management System
A system to automate accounting in the IIC purchasing department using Raspberry Pi and image recognition.
Explore the docs »
## About The Project
[![Product Name Screen Shot][product-screenshot1]](https://github.com/dynle/raspi-inventory-management-system)
[![Product Name Screen Shot][product-screenshot2]](https://github.com/dynle/raspi-inventory-management-system)
The Raspbeery Pi Inventory Management System project was initiated to improve the current purchasing system in our lab's IIC department. The traditional method required individuals to leave money for the items they took, which made it difficult to track who bought what and whether payments were accurately made. Our project aimed to solve this problem by developing a system that automatically records purchases using Raspberry Pi and image recognition technology.
### Key Features:
- **Automated Purchase Recording**: The system uses Raspberry Pi to take photos of the item and the person buying it.
- **Image Recognition**: The captured images are processed using a Django server, which employs a face recognition model and a YOLOv8 object detection model to identify the buyer and the product.
- **Slack Integration**: The system includes a Slack chatbot that summarizes the monthly purchases for each user and notifies them of the total amount due.
- **Database Management**: All transaction data is stored in a SQLite3 database on the Raspberry Pi, making it easy to manage and retrieve records.
### Project Challenges:
- **Raspberry Pi Limitations**: The team faced difficulties due to the lower-than-expected performance of the Raspberry Pi, particularly in image processing tasks.
- **System Stability**: Ensuring the operating system on the Raspberry Pi remained stable was a significant challenge.
- **Learning Experience**: The project provided valuable experience in building IoT systems and highlighted the need for considering the computational limits of IoT devices in model design.
### Built With
* [Raspberry Pi](https://www.raspberrypi.org/)
* [Django](https://www.djangoproject.com/)
* [Slack API](https://api.slack.com/)
* [SQLite3](https://www.sqlite.org/index.html)
* [YOLOv8](https://github.com/ultralytics/yolov5)
* [Face Recognition](https://github.com/ageitgey/face_recognition)
## Getting Started
To get a local copy up and running follow these steps.
### Prerequisites
* Python 3.7 or 3.8
* Raspberry Pi 3 * 3
* Raspberry Pi Camera Module
* 7" Raspberry Pi Touch Display
* Laptop
### Installation
1. Get a free API key at [Slack](https://slack.com)
2. Clone the Repo
```sh
git clone https://github.com/dynle/raspi-inventory-management-system
```
3. Create `.env ` file and enter your API and slack channel ID
```js
SLACK_BOT_TOEKN = 'ENTER YOUR API'
CHANNEL_ID = 'ENTER YOUR CHANNEL ID'
```
4. Install necessary packages with pip
5. Train a product detection model with dataset/proudcts (`train.ipynb`)
```sh
yolo task=detect mode=train model=./weights/yolov8s.pt data=./dataset-new-3cls/data.yaml epochs={100} imgsz=640 device=mps patience=100
```
6. Set IP address and run `raspberrypi_take_picture_and_send.py` file on a raspberry pi with a camera module
```sh
python raspberrypi_take_picture_and_send.py
```
7. Set IP address and run `database_Data_in.py` and `database_Output_data.py` files on another raspberry pi
```sh
python database_Data_in.py
python database_Output_data.py
```
8. Run django server with a laptop to run two detection models and open HMTL page
9. Connect three raspberry pi devices and the laptop on the same network
10. Open the HTML page using the django server ip address with the other raspberry pi with the touch display to see detection results
## Usage
To use the system, deploy the Django server, and ensure the Raspberry Pi cameras are connected and running. The Slack chatbot will automatically notify users at the end of the month about their purchase totals.
## License
Distributed under the MIT License. See `LICENSE.txt` for more information.
[product-screenshot1]: images/project1.png
[product-screenshot2]: images/project2.png