Training Qwen - MadMouse/FuelBeacon-ML GitHub Wiki
Training qwen only used one image in the training Testing quen on sample size - 6 images of the billboard price Worked on 2/5 so far including duplications due to the name Regular Unleaded
- producing a line with regular with the price and one with unleaded and giving the same price
- Prices correct, the one failed so far had a formatting issue where it is returning the price in the form XX.XX even through format XXX.X has been set - two times now
- Final image was taking an extremely long time to process so cancelled and working on retraining to remove previous errors
Retraining Qwen to consolidate fuel names (e.g previously giving regular and unleaded as separate when the full name is regular unleaded) and to try and make fuel prices in the form XXX.X - Same sample size and sample images but training on 4 different images this time
- training prompt = "Extract all fuel names and their prices from this image. Keep full multi-word fuel names together on a single line (e.g., 'Regular Unleaded'). Format all prices strictly in xxx.x form (e.g., 003.5, 045.2, 120.0). Output strictly valid JSON."
- takes forever to train
- has correctly identified fuel names and prices of 3/3 images given to it so far
- fourth image has seperated the regular and unleaded/diesel again
Changed prompt to add the two bits of the name together - is working a lot better but will struggle to read the names if image quality is too poor [pixelated/blurry] so working on method of looking at image and giving advice on how to improve quality
New prompt = "text": """Extract all fuel items from the provided image into a JSON object.
RULES:
- Combine multi-line text labels into a single string (e.g., if 'regular' is on top of 'unleaded', output 'regular unleaded'). Ignore words like 'Litre'.
- Prices MUST be formatted as a floating-point number in standard xxx.x format with 1 decimal place (e.g., 169.9, 179.9, 191.9).
- Do NOT omit digits. 7-segment LED displays often have thin digits (like '1').
EXPECTED OUTPUT FORMAT:
{ "fuels": [ {"name": "Fuel Name Here", "price": 123.4} ] }"""
Does not really like to work on jpegs - would need to export all images as png for usage
Performing further training this time with a sample size of 20 using a mix of regular unleaded/diesel and just unleaded/diesel and one including autogas, not sure if because this is only in form XX.X if it will cause issues but will report back when training is finished
- Apparently its going to take multiple hours to train so will report back tomorrow if it is completed
- Still running over 10 hours later, will need to find a faster way or put on a more powerful machine
Training took like 20 hours but is working - tested on an image not in the training sample