Open CarbonCollins opened 4 months ago
@CarbonCollins: In principle, this is already supported by the firmware, but you have to train your own tflite model.
I have something similar in place (garden water pressure). This is working for over a year now.
Do you by chance have an example of the configuration options you have set for this analog ROI processing?
also any pointers and/or the data set you used for your model so that I can figure out how to do mine? Ive not trained a model before. I'm going to start collecting images over the next few days at least. they are not as clear and crisp as the one you posted but are generally in this quiality:
and
@CarbonCollins: In terms of configuration of analog ROI there is nothing special.
In first instance you could test if my trained model is also working for you. I doubt because your pointer and scale looks different, but at least you can try. (Be aware: I only trained from 0.0 - 4.5bar).
Here you can find some infos how to train analog pointer: https://github.com/jomjol/neural-network-analog-needle-readout
I collected images, labeled them correctly (be very precise, e.g. 0.7_anyimagename.jpg for a pressure of 0.7 bar) and processed one of the jupyter scripts of github repo. For more detailed info, I have to check my archives (Performed this the last time over a year ago ;-))
BTW: Before you start collecting images I would recommend to improve your image quality.
0-4.5 is still a larger range than what my gauge is used for, pretty much max out a 3 bar :) ill give it a try at least.
as for the image quality im not sure how much more I can improve it, its all running on an ESP32-CAM and I cant seem to get the image any clearer...
in either case Ive given your model a whirl and its a lot closer than what the default model was reporting: the default model was reporting 6 all the time :P
Looks not so bad, result is at least quite close :-)
As long the result is acceptable the image quality is also acceptable ;-) But it could be an improvement in terms of evalutation stability...
For me image looks a little blurry (focus adjustment? -> https://jomjol.github.io/AI-on-the-edge-device-docs/Reference-Image/#focus) and you maybe could get a bit closer, physically or using the new digital zoom functionality which in place since 15.7.0. (Be careful: There are still some quirks in v15.7.0, https://github.com/jomjol/AI-on-the-edge-device/discussions/2926#discussioncomment-8631527 -> produces system crashes and potential timing issues while taking new reference image, just repeat until you're happy with the result)
I managed to get a proper printed casing which allowed me to get it a bit closer and time to re-adjust the focus a bit so hopefully a bit less blurry now: Only thing I have to do now is empty my pressure tank to get images for the guage that is lower than 1.5 bar T.T
Just as a thing going forward, is it worth adding these images to a training repo so a more general 0-6 bar guage can be trained? there is at least two of us doing this now :P
@CarbonCollins: Image looks better than before.
Training image set should at least cover same range than I use 0.0 - 4.5. Send the images (upload here as zipped file) and I'll give it a try to add to the model.
Finally had a chance to flush the tank so I have a collection of images
@CarbonCollins: Please find attached the trained model including your images. ana-pressure-0-6_0004_s2.zip
I wasn't able to fully test on my pressure gauge because garden water is not yet switched on ;-)
Im not sure that model is spitting out the right values currently, it seems much closer than before but also not quite right
@CarbonCollins: I figured out, that there were some wrong labeled images in this region. I removed them and retrained again. Please verify...
No problem,
we are off to a good start at least :) this is with model 1. Ill try it out for a few pressure cycles and then Ill also try out model 2 :)
Hi, is it possible to train the model on number with two decimals? I am trying to read a gauge from a scale. So for this to properly make sense, I would need a second decimal digit as well:
Is this theoretically possible with this model? or is it limited at 1 decimal? I cant find any information on it. Thanks so much :)
Or to put differently, can I go beyond 100 digits (0-0.99) to 1000 digits? 0-0.999 ?
@Slider0007 Ive tried both models now, the one with just my images in seems to work quite well, the combined one not so much it seems to get a bit confused with the gradation marks. I am assuming that its because my gauge has half the amount of gradation marks as your gauge but that's just a pure guess.
In general though with the combined model I was getting 2.1 when it should have been 2.2 and was also getting 2.2 when it should have been 2.4
@CarbonCollins
Recently I also figured out that the combined model is not working as good as my old dedicated model. It seems that our gauges are too different to combine in one model, at least with my knowledge of model generation.
Hi, i have a similar problem. I have this pressure gauge. I tried both of your generated models, gut i think they are too different, cause it didnt worked. Soo i decided to train my own model. i got the pictures and i have labeld them. Now i am struggeling with the howto from https://github.com/haverland/Tenth-of-step-of-a-meter-digit/issues/12. Would one of you be so kind as to help me through the installation anf training as you have already trained your own models?
The Feature
I have my own water well at home so do not have a water meter installed. However I do have a pressure vessel which water is pumped into where I do have an analogue pressure gauge installed measuring the pressure in bar. A crappy example of the gauge below:
Would it be possible to add support to reading one of these gauges so that i can interpret the current pressure value?