haverland / Tenth-of-step-of-a-meter-digit

Apache License 2.0
10 stars 5 forks source link

Project goal

The project tries to recognize all digits of gas, water and electric meters in percental pieces if the digit is moving to the next digit.

The idea comes from https://github.com/jomjol/AI-on-the-edge-device project.

Project structure

Folders:

Datasets

Images of gas, water and power meters

The folder images contains images of https://github.com/jomjol/neural-network-autotrain-digital-counter/tree/main/ziffer_raw and collected images from others. See https://github.com/haverland/collectmeterdigits.

An overview of the data can be found here.

Add my own data

The images can be collected with collectmeterdigits. Read the instructions of the project.

In images/collected can new images be added. The structure is

images
└───collected
    └───powermeter
    │    └ Manufacturer
    │      └ <yourshortcut>
    │         └ images.jpg
    └───watermeter
    │    └ Manufacturer
    │      └ <yourshortcut>
    │         └ images.jpg
    └───gasmeter
         └ Manufacturer
           └ <yourshortcut>
              └ images.jpg

Naming and Versioning

The naming of the notebooks is dig-class<output>_<size>.ipynb.

So dig-class100_s1 is bigger than dig-class100-s2

Learning on meter digits

The notebooks learning only on meter digit images as long as the model can be trained. The quality depends on the mount of images. (Currently 17.000)

Add your images like described above and run

dig-class100_s1.ipynb or dig-class100_s2.ipynb

dig-class100_s0 is to big for the esp32 device and only used for comparisations.

After run a csv file will created with list of false predicted image file names. The file can be used with

python3 -m collectmeterdigits --labelfile=output/tmp/dig-class100-s2_false_predicted.csv

to fix labels or check the labeling.

Comparing the different models

To get a better overview of the different models and their results, the notebook compare_all_tflite.ipynb can be used.

It can handle classification models with output of 100 classes and the hyprid models with 10 classes too.

Older models with 11 classes are not comparable.

It compares two times. First with delta +/- 0.1 as ok and the second without any delta. It is because the models not reaches >99% accuracy without delta, but in most times with delta=0.1

Versions

1.6.1 (2023-02-26)

1.6 (2022-12-27)

1.5 (2022-12-18)

1.3 (2022-08-25)

1.2 (2022-07-24)

1.1 (not releases)

1.0 (2022-07-16)