mnist
Version, currently main branch1 version
- main branchlatestApr 4, 2025
github.com/kojix2/mnist.cr
MNIST Digit Recognition Web Application using Crystal, ONNXRuntime, and Kemal
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
mnist:
github: kojix2/mnist.cr
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.15.1- License
- MIT
- Author
- kojix2
- Target
mnistfrom src/mnist.cr
Dependencies
Runtime Dependencies
- kemal*github: kemalcr/kemal
- onnxruntime*github: kojix2/onnxruntime.cr
README
Features
- Beautiful modern UI design (using Tailwind CSS)
- Dark mode support
- Responsive design (mobile-friendly)
- Pen size adjustment
- Touch screen support
- Visual feedback with animations
- Probability distribution bar chart
Installation
Prerequisites
- Crystal 1.15.1 or higher
- ONNXRuntime 1.21.0
Usage
Using Docker Compose
docker compose up
Or to run in detached mode:
docker compose up -d
Access the application in your browser at http://localhost:3000.
Development
Setting Up Local Development Environment
# For Linux (x64)
wget https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-1.21.0.tgz
tar -xzf onnxruntime-linux-x64-1.21.0.tgz
export ONNXRUNTIMEDIR=$(pwd)/onnxruntime-linux-x64-1.21.0
# Download model
mkdir -p spec/fixtures
curl -L -o spec/fixtures/mnist.onnx https://github.com/microsoft/onnxruntime/raw/main/onnxruntime/test/testdata/mnist.onnx
git clone https://github.com/kojix2/mnist.cr.git
cd mnist.cr
shards install
crystal run src/mnist.cr
Contributing
- Fork it (https://github.com/kojix2/mnist.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Credits
- MNIST Dataset - Handwritten digit dataset
- ONNXRuntime - Machine learning model inference engine
- Kemal - Web framework for Crystal
- Tailwind CSS - Utility-first CSS framework
License
The code was generated entirely by VSCode+CLINE+claude-3.7-sonnet. MIT
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Apr 4, 2025
- Crystal
>= 1.15.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/kojix2/mnist.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 15, 2026
- Versions
- 1
