thawro / yolov8-digits-detection

Digits detection with YOLOv8 detection model and ONNX pre/post processing
https://thawro.github.io/web-object-detector/
11 stars 3 forks source link

this model confidence very low on network photo #3

Closed einsitang closed 3 months ago

einsitang commented 3 months ago

is this model only detect on handwriting ? because I try picture from network with print font ,the digits detect confidence is very low.

image

kaggle : https://www.kaggle.com/code/jianbintangelement/number-detect

thawro commented 3 months ago

Hello @einsitang The model used in the demo was trained with the HandWritten Digits (HWD+) dataset (actually with the strongly augmented version, described here), which contains only digits written by hand, thus it may work poor on digital digits ("print font"). If you need the model to work on the digitcal digits too, I would suggest to extend the dataset with that type of data and retrain the network.

The training is done with the ultralytics package, so you would only need to add images of the digits to specific directories (datasets/yolo_HWD+/images/train and datasets/yolo_HWD+/images/test paths, as defined in config) and run the train script.

To prepare the HWD+ data (needed for the training):

  1. Download HWD+ dataset and place it in datasets/HWD+ directory
  2. Run
    python src/data/split_HWD+.py
    python src/data/generate_yolo_dataset.py

NOTE: Please change the line to all_images_filepaths = np.array(glob.glob(str(old_ds_path / "images/*/*"))) (in order to iterate over randomly selected train and val HWD+ splits)

einsitang commented 3 months ago

Thank you very much.I originally hoped that I could quickly find a model to process the recognition of these two items at the same time. Although I did not find it directly, the appropriate data set and the effect of the pre-model can already meet the requirements of my self-training model

thawro commented 3 months ago

Glad I could help :)

If you have any more questions or run into any other issues, just give me a shout. Also, if everything's good now, you can go ahead and close this issue.

Thanks!