Skip to content

Latest commit

 

History

History

meter_reader

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Apache License Version 2.0

Smart Meter Scanning is an AI-based application that enables cameras to automatically read results from analog meters, transforming those results into digital data with accurate, near-real-time meter results. It uses computer vision, object detection, and object segmentation.

This kit uses the following technology stack:

Check out our AI Reference Kits repository for other kits.

smart-meter-scanning

What's New

New updates will be added here.

Table of Contents

Getting Started

Now, let's dive into the steps, starting with installing Python.

Installing Prerequisites

This project requires Python 3.9 or higher. If you don't have Python installed on your machine, go to https://www.python.org/downloads/ and download the latest version for your operating system. Follow the prompts to install Python, making sure to check the option to add Python to your PATH environment variable.

Setting up your Environment

Cloning the Repository

To clone the repository, run the following command:

git clone https://github.com/openvinotoolkit/openvino_build_deploy.git

This will clone the repository into a directory named "openvino_build_deploy" in the current directory. Then, navigate into the directory using the following command:

cd openvino_build_deploy/ai_ref_kits/meter_reader

Then pull the models:

git lfs -X= -I=model/ pull

Creating a Virtual Environment

To create a virtual environment, open your terminal or command prompt and navigate to the directory where you want to create the environment. Then, run the following command:

python3 -m venv venv

This will create a new virtual environment named "venv" in the current directory.

Activating the Environment

Activate the virtual environment using the following command:

source venv/bin/activate   # For Unix-based operating systems such as Linux or macOS

NOTE: If you are using Windows, use venv\Scripts\activate command instead.

This will activate the virtual environment and change your shell's prompt to indicate that you are now working within that environment.

Installing the Packages

To install the required packages, run the following commands:

python -m pip install --upgrade pip 
pip install -r requirements.txt

Preparing your Models

Prepare your detection and segmentation models with this command:

cd model
sudo sh ./download_pdmodel.sh

Running the Application

To run the application, use the following command:

python main.py -i data/test.jpg -c config/config.json  -t "analog"

This will run the application with the specified arguments. Replace "data/test.jpg" with the path to your input image. The result images will be exported to the same test image folder. You can also run the meter-reader.ipynb to learn more about the inference process.

In case you have trouble downloading the detection and segmentation models from PaddlePaddle, we have also provided YOLOV8 and deeplabv3 as the detection and segmentation models in the "model" folder. You could then run the application using these two models by swtiching the configuration file to "config/yolov8.json" with the following command:

python main.py -i data/test.jpg -c config/yolov8.json  -t "analog"

Congratulations! You have successfully set up and run the Automatic Industrial Meter Reading application with OpenVINO™.

Additional Resources

Back to top ⬆️