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

Apache License 2.0
10 stars 5 forks source link

enhancement : Add the "integra watermeter" font #6

Closed nliaudat closed 1 year ago

nliaudat commented 1 year ago

Hi, Integra water meter use "bahnschrift light condensed" font and actually the "6" & "4" are not recognized.

Can you add the "bahnschrift light condensed" and the "Din 1451" to your digit processing ? They are bot free and allowed for commercial use

You can download them here

Regards

haverland commented 1 year ago

We are not really able to add fonts to a model. I tried it with no real good results. The better way would be to give us examples of the digits.

You can use https://github.com/haverland/collectmeterdigits to easy collect you digits and for labeling.

nliaudat commented 1 year ago

Ok, It is not possible to generate custom font images from https://www.kaggle.com/code/frankhaverland/electric-meter-dataset-from-fonts ?

The errors are mainly with red digits.

I'll try to generate images.

Regards

haverland commented 1 year ago

Was my first intention to get a mostly full collection of images. But on real meters I've got only a accuracy of 60%. Not real very good. So I now completely removed the generated images and I'm using collected images with quite good results.

If you want, I could integrate them if the results on your devices are better.

nliaudat commented 1 year ago

I'll collect images in the next 10 days and try to make good predictions with collectmeterdigits. That's no so easy to set 3.5 or 3.6 :)

haverland commented 1 year ago

If you have .0 of all digits i could help to create the others

haverland commented 1 year ago

It do you mean, you dont know what kind of number it is? i relabel all incomming Images, of it is not correct labeled.

nliaudat commented 1 year ago

Here you'll find 353 images relabeled from 2 AI-on-the-edge-device with different focus : https://www.dropbox.com/s/5zofotklj3xcjhq/labeled.zip?dl=0

I use "dig-cont_0560_s3_q.tflite" but it gave me many "N".

I relabeled only the "N" with best efforts.

Regards

haverland commented 1 year ago

Now I know why it is not easy to label for you. Two suggestions: 1.) Play with your focus of the camera. Sharpe images have a better recognition. 2.) You should setup your ROIs like

and do not lock the aspect ratio on setup.

haverland commented 1 year ago

Could you upload a picture of you meter?

haverland commented 1 year ago

You can try https://github.com/haverland/Tenth-of-step-of-a-meter-digit/blob/dev/output/dig-class100-s2_20220905-193211_q.tflite

nliaudat commented 1 year ago

alg_roi

and

alg_roi_2

haverland commented 1 year ago

Thanks. Reduce the height of the ROIs. The wide is ok. At the last digit I would use the same height as the digit left.

nliaudat commented 1 year ago

Ok, I'll try. Many thanks

haverland commented 1 year ago

I've tested with font, but in comparing without font the results are better.

nliaudat commented 1 year ago

alg_roi

I've reduced ROI and aligned the ROI horizontally. Now everything works well. Many many thanks !