This project involves the creation of a water meter reading system using YOLOv8 for training, a Raspberry Pi for image capture, and a data processing pipeline that saves readings in a JSON file, which are then converted to a CSV file.
- Project Overview
- Hardware Requirements
- Software Requirements
- Installation
- Usage
- Data Processing
- Results
- License
The water meter reading system is designed to automate the process of collecting and storing water meter readings. The system utilizes a Raspberry Pi to capture images of the water meter, which are then processed using a YOLOv8 model to detect and read the meter values. The readings are saved in a JSON file and later converted to a CSV file for further analysis.
- Raspberry Pi (any version with a camera module)
- Water meter with a visible dial or digital display
- Power supply for Raspberry Pi
- MicroSD card for Raspberry Pi (minimum 16GB)
- Raspberry Pi OS (Raspbian)
- Python 3.x
- TensorFlow 2.x
- OpenCV
- YOLOv8
- Install Raspberry Pi OS on your Raspberry Pi.
- Install Python 3.x and the required packages:
pip install ultralytics pathlib json csv
- Clone this repository and navigate to the project directory:
https://github.com/gauravdesale8/water_meter_reading.git
cd water_meter_reading
- Follow the instructions in the YOLOv8 repository to download the pre-trained weights and configure the model for water meter detection.
- Connect the Raspberry Pi camera module to your Raspberry Pi.
- Position the camera to capture clear images of the water meter.
- Run the
main.py
script to begin the detections:
python main.py
- The script will automatically detect and preprocess the images using the YOLOv8 model.
- The detected readings will be saved in a JSON file.
-
After capturing and processing the images, the
main.py
to convert the JSON file to a CSV file: -
The CSV file can be opened and analyzed using any spreadsheet software, such as Microsoft Excel or Google Sheets.
The water meter reading system provides accurate and reliable readings, making it an ideal solution for automating the process of collecting and storing water meter data. The system can be further customized and optimized to suit specific requirements and use cases.
This project is licensed under the MIT License.