Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

基于 PyTorch 的手写数字识别:自制数据集 & mps/cuda 优化

License

Notifications You must be signed in to change notification settings

wmh1024/HandwrittenNumeralRecognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

基于Pytorch的手写数字识别系统

Contributors Forks Stargazers MIT License


Logo

基于Pytorch的手写数字识别

实现了基于MNIST训练数据集版本和自制数据集版本的手写数字识别。
对CUDA和MPS做了对应优化,提高了识别准确度和速度。

上手指南

克隆此项目

git clone https://github.com/wmh1024/HandwrittenNumeralRecognition.git

基于MNIST训练数据集版本

python DataByMNIST.py

基于自制数据集版本

python DataByMyData.py

使用到的框架

  • pytorch
  • matplotlib
  • numpy

训练结果

测试设备:MacBook Air 2020 M1 8G内存 使用MPS优化

对于MNIST训练数据集

版本 准确率 训练时间 epoch
MNIST数据集 99.170% 155.95s 10

对于自制数据集

版本 准确率 训练时间 epoch
自制数据集 60.00% 26.50s 20

对于MPS优化(基于MNIST数据集)

版本 准确率 训练时间 epoch
CPU 99.180% 313.33s 10
MPS 99.170% 155.95s 10

测试结果仅供参考,具体结果请根据自己的数据集进行测试。

如何参与开源项目

贡献使开源社区成为一个学习、激励和创造的绝佳场所。你所作的任何贡献都是非常感谢的。

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

版本控制

该项目使用 Git 进行版本管理。您可以在repository参看当前可用版本。

开发者

您也可以在贡献者名单中参看其他参与该项目的开发者。

版权说明

该项目签署了MIT授权许可,详情请参阅 LICENSE.txt

About

基于 PyTorch 的手写数字识别:自制数据集 & mps/cuda 优化

Topics

Resources

License

Stars

Watchers

Forks

Languages