Skip to content

tansen87/handwrittenSymbolRecognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

基于ResNet的手写数字识别

Notice: 请使用python3.11来运行此项目

图片识别

image

手写识别

image

直接运行

  1. 安装poetry

    pip install poetry==1.8.5
  2. 使用poetry安装依赖

    poetry install
  3. 启动项目

    poetry run python main.py

自己训练

  1. 安装poetry

    pip install poetry==1.8.5
  2. 使用poetry安装依赖

    poetry install
  3. Kaggle下载数据集 (数据集很大,可以把每个分类降至100张图片再来训练)

  4. 如果只训练数字 0-9 ,修改 train.py 第17行代码

    self.BackBone.fc = nn.Linear(self.BackBone.fc.in_features, 10)
  5. 将数据集放在 train/train_images ,然后开始训练

    python train.py
  6. 训练完成后,修改 require/network.py 第10行代码

    self.BackBone.fc = nn.Linear(self.BackBone.fc.in_features, 10)
  7. 将训练好的模型拷贝至 require/ 文件夹内,并重命名为 model.pth (训练好的模型在**train/checkpoints/**文件夹)

  8. 修改 require/dictionary.txt

    0 0
    1 1
    2 2
    3 3
    4 4
    5 5
    6 6
    7 7
    8 8
    9 9
  9. 启动项目

    poetry run python main.py

About

Handwritten digit recognition | 手写数字识别

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages