-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Training Model Struggling with Character Recognition in Custom Sports Fonts #1253
Comments
Hi, I want to ask you how long it took you to fine-tune the model with this number of iterations and dataset size, as I only used 3000 iterations and 20K images, and it is taking a very long time. |
200K images with 40,000 Iteratios about 1 hour. |
Thanks for the reply. Also can you please tell me the gpu specification where I have 3050 12G and it still going more than 4 hours. |
I use 4060Ti 16GB. How much learning rate & Batch size you choose ? |
I am using the following config:
|
I am working on an OCR project aimed at accurately reading player numbers and names from sports images. These images feature 10 different custom fonts, predominantly thick and bold, which cater to a sports aesthetic. The primary challenge is the model's ability to distinguish between similar characters, particularly under the constraints of these stylized fonts.
Fonts: 10 custom sports fonts (English A-Z, a-z, 0-9).
Training Data: Generated dataset of ~200K images, including mixed cases of 3-10 characters with stroke and non-stroke and numbers (00-99) for each font.
After I train with num_iter: 750000 , loss: 0.00126, Valid loss: 0.15052
Problems Encountered:
Request for Help:
I am seeking advice on improving my model’s performance in differentiating similar-looking characters,. Any suggestions on training strategies, network adjustments, or data preprocessing techniques would be greatly appreciated.
here are acutal image I want to predict
![Adihaus Bold_nostroke (7)](https://private-user-images.githubusercontent.com/32792068/329923018-2e4893b3-792b-47ea-a26e-47998098fdd8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMwMTgtMmU0ODkzYjMtNzkyYi00N2VhLWEyNmUtNDc5OTgwOThmZGQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThlMmY1NTA4ZTU3ZmU3NTM0MDYyMTA1OWRmOWM0ZWVkYjk0ZWM3ODAzMGQwZWM0NWIwMmZlMmY4YWJiMmJjMjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.SHEgsW55VTFnVR7rLNnN4A7fdJA8IWe1xm-bH22Veuc)
![Adihaus Bold_nostroke123 (12)](https://private-user-images.githubusercontent.com/32792068/329923025-598645cf-6358-4444-b699-906f85b47f29.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMwMjUtNTk4NjQ1Y2YtNjM1OC00NDQ0LWI2OTktOTA2Zjg1YjQ3ZjI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNkZWEyZjg1ZmU4YmFiNjc3YmYwNjZkYjkwZGQwYTcxOTFiOTliZTBmNDhkNmQzNWYzNzI5NjUwNDZmMjNlYTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0R1kfVVuXqzB2PqvLUmdlmClY5ML04TkG6WVTWvd2EM)
![Adihaus Bold_stroke123 (10)](https://private-user-images.githubusercontent.com/32792068/329923026-66d58e6b-c171-4bc6-a1c3-ef422b44b908.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMwMjYtNjZkNThlNmItYzE3MS00YmM2LWExYzMtZWY0MjJiNDRiOTA4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVkYWVjOWZiMjA5ZWY5MDlhM2IxMjhmYjMxYmRhM2E1ODE2MmQ5NjM1MWZiOTRkMzA3NzVjNGU5ZWVjOWZkZjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3TyBOaKQ9F4UkvR7c91YDPmVC-PMRu0hYV5S9PnN6Ag)
![Alexandria_nostroke123 (29)](https://private-user-images.githubusercontent.com/32792068/329923029-deb1ce36-d925-4b98-b6b2-ae6e1fb6fdf4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMwMjktZGViMWNlMzYtZDkyNS00Yjk4LWI2YjItYWU2ZTFmYjZmZGY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA4N2I2ZjEyYjA5YmZiMzdkYjMyZmM2NDE5NGYzNDc2ZWM5OTA1OWVkNTI1YjU4MGU3ZmNiMjBmM2Q1YjAzZjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._oC5aCrsbdv1TXxCVfKPz5Mw7LOsoeadrIgKablIGI4)
here are generated image I used as training set.
![nbv5231665978](https://private-user-images.githubusercontent.com/32792068/329923247-86fcf8fc-a90f-4921-9223-d13a68a9765b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMyNDctODZmY2Y4ZmMtYTkwZi00OTIxLTkyMjMtZDEzYTY4YTk3NjViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFhZDU3MDBmNmExNmU0Yzg2NjAzOGQ0MzNmNDcxNDUwYzczODVmMjFlNzJjODkwMTM0ODhhOGE3YWVlZDAyZTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.a9FhrDF3XdrNse5RuDgOxcor8uWFgwRqe0XF-PGIv74)
![oc210030322606](https://private-user-images.githubusercontent.com/32792068/329923274-27df75bc-3185-4a86-83b6-6648d9370aa7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMyNzQtMjdkZjc1YmMtMzE4NS00YTg2LTgzYjYtNjY0OGQ5MzcwYWE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwZTQyZDk1MDIyNmY2NzNjY2IwNWQ4NjIwMDM2ZjA2OWNhMTVkZjk5YTlmOTc3MWVhOWJiYjYwNmU0OWNiYzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FI91sKxUl8i6clZalx_P_QsVNfuzi28wdyvGKVsXXyk)
![oc220080106966](https://private-user-images.githubusercontent.com/32792068/329923326-eface0ff-a45a-4b59-8ec8-0fb3a6edddf0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMzMjYtZWZhY2UwZmYtYTQ1YS00YjU5LThlYzgtMGZiM2E2ZWRkZGYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxMzI5ODViYjNkODRhMzhjNTU1NjkyZDI4NTg2NzNlZWNmNmEzZGMwMTdiNTQ3NWQ4NTE2OWQ0Y2IwNTZlOTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hTF3Nzg-jZBFAcP4wT0X7KIaMgvPlLdujy1gy2OYU9c)
![oc220080146883](https://private-user-images.githubusercontent.com/32792068/329923332-e9c5af9a-1662-4740-a3ad-36750ab22ed0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMzMzItZTljNWFmOWEtMTY2Mi00NzQwLWEzYWQtMzY3NTBhYjIyZWQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJjMTBjMDA1MzYyZTIwNmNkY2EzMjA2ZGU2YzYwZTMzY2IxOWI0NDRhMDI1MDVmZDhiYjBjYTc0NDY1YWViY2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oOHgdEwIL_tb4AtRi58zgyjtXr7lsSjNStj-ududxIg)
![oc556143399804](https://private-user-images.githubusercontent.com/32792068/329923335-7f1f75f7-fd6d-4af1-9bd3-f639360f8c36.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMDQyMDQsIm5iZiI6MTcyNDEwMzkwNCwicGF0aCI6Ii8zMjc5MjA2OC8zMjk5MjMzMzUtN2YxZjc1ZjctZmQ2ZC00YWYxLTliZDMtZjYzOTM2MGY4YzM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDIxNDUwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM2N2Q5NWRiOGI4MWZhN2M0MGVkODRlMTk0NDYzZTRmYTQ5NThhYzJlNThhNGRjZGZkZWU5MzY0MzFlYWQ2MGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kF-k1f0SrWefS63lBR9dVioaG3DLdGiVh8vckFYjCvI)
here is the config I use
batch_size: 32
FT: False
optim: False
lr: 1
beta1: 0.9
total_data_usage_ratio: 1.0
batch_max_length: 34
imgH: 64
imgW: 600
rgb: False
contrast_adjust: 0.0
sensitive: True
PAD: True
data_filtering_off: False
Transformation: None
FeatureExtraction: VGG
SequenceModeling: BiLSTM
Prediction: CTC
num_fiducial: 20
input_channel: 1
output_channel: 256
hidden_size: 256
decode: greedy
THANK YOU IN ADVANCE !!
The text was updated successfully, but these errors were encountered: