tfaehse / DashcamCleaner

Censor identifiable information in videos, in particular dashcam recordings in Germany.
GNU Affero General Public License v3.0
130 stars 27 forks source link

self-trained detection for UK licence plates in my own fork, but not working perfectly #84

Open Chukun-Leo-Gao opened 8 months ago

Chukun-Leo-Gao commented 8 months ago

It seems that the training data is mainly German licence plates, so the program can't really identify the rear plate of British cars, which is yellow instead of white. I've trained my own model and uploaded the UK_licence_plate.pt weight file in my own fork. However, it seems like my weight is not working perfectly, as I need to manually assign the weights_name and training_inference_size variable in main.py for it to work.

Is it possible to: guide me on how to make my UK_licence_plate.pt work better, i.e., without needing me to manually assign variables? maybe add my trained weights to the main program for British users who wants to clean licence plates from videos?

Thank you very much!

tfaehse commented 6 months ago

Hi! Thank your for your interest, and especially the work you've done!

The code uses a fairly ugly regex (r"(?P\d*)p_") to search for the training image size. Basically, your filename "needs to" follow this as well in order for it to work directly. The regex searches for a number (the inference size) followed by "p_", so you could for example name yours "UK_720p_license_plates.pt".