This repository provides a comprehensive demonstration of deep learning capabilities in pure C# using the Torchsharp library, along with an interactive inference demo utilizing Winforms UI.
The MNISTsharp project showcases the power of deep learning in C# by implementing a neural network from scratch, leveraging the Torchsharp library for efficient and accurate computations. The repository includes:
- MNIST Classification Model: A deep convolutional neural network that classifies handwritten digits (0-9) using the MNIST dataset achieving over 98.78% accuracy.
- Winforms UI Inference Demo: An interactive demo allowing users to input handwritten digits, which are then classified by the trained model and displayed in real-time.
- Pure C# Implementation: No reliance on external dependencies or languages; all code is written in C#.
- Torchsharp Integration: Utilizes Torchsharp for efficient neural network operations.
- Winforms UI Demo: Interactive demonstration of the trained model's inference capabilities.
- MNIST Dataset Included: Includes preprocessed MNIST dataset for training and testing.
- Clone this repository:
git clone https://github.com/username/MNISTsharp.git
- Open the solution in Visual Studio (2019 or later):
MNISTSharp.sln
- Build the project: Right-click on the solution ->
Build
->Rebuild Solution
- Run the demo: Right-click on the
KNET_Inference
project ->Debug
->Start Debugging
- Visual Studio 2019 or later
- .NET 8 SDK
- Torchsharp library
This repository is open to contributions! If you'd like to contribute, please create a pull request with your changes and provide a brief description of the updates.
The MNIST dataset was obtained from the Yann LeCun's website (http://yann.lecun.com/exdb/mnist/). Torchsharp is an open-source library developed by Microsoft Research.
This project is licensed under the MIT License. See LICENSE
for details.