Skip to content

Machine learning from the browser; served from the Internet Computer Blockchain.

License

Notifications You must be signed in to change notification settings

GoldToothRichards/digit_guesser

 
 

Repository files navigation

Digit Guesser

Machine learning from the browser; served from the Internet Computer Blockchain.

📚 Description

Digit Guesser is a web application that demonstrates machine learning inference taking place directly in the browser. It uses a Support Vector Machine (SVM) classifier to predict hand-drawn digits. The application is built with Vue.js and leverages Pyodide to run Python code, including scikit-learn, in the browser using WebAssembly. The application is served directly from the Internet Computer Blockchain.

✅ Features

  • Draw digits using an interactive canvas
  • Real-time prediction of drawn digits using a pre-trained SVM model
  • Client-side machine learning powered by Pyodide
  • Served directly from the Internet Computer Blockchain

🛠️ Tech Stack

  • Frontend: Vue.js, JavaScript
  • Machine Learning: Python, scikit-learn, scikit-image
  • In-Browser Python: Pyodide

🌟 Live Demo

Experience Digit Guesser in action:

https://avtg3-4iaaa-aaaal-ajqhq-cai.icp0.io/

🏗️ Local Development

To set up the project locally:

  1. Clone the repository

  2. Install dependencies:

    pnpm install
  3. Compile and hot-reload for development:

    pnpm run serve
  4. Compile and minify for production:

    pnpm run build

🧠 Machine Learning Model

The SVM classifier used in this project is trained on the MNIST dataset. For details on how the model was trained and exported, see the train_model.ipynb notebook.

📄 License

This project is open source and available under the MIT License.

🔗 Links and Resources

  • Pyodide: A Python distribution for the browser and Node.js based on WebAssembly. This project uses Pyodide to run Python code, including scikit-learn, directly in the browser.

  • Juno: The Web3 development platform used for hosting and deploying this application. Juno provides blockchain-based storage and hosting solutions on the Internet Computer.

  • Internet Computer: The underlying blockchain infrastructure powering this application. It provides a decentralized cloud platform for building and hosting applications like Digit Guesser.

  • scikit-learn: A machine learning library for Python. In this project, it's used to train and deploy the SVM classifier for digit recognition.

  • MNIST Dataset: The dataset used to train the SVM classifier in this project. It's a large database of handwritten digits commonly used for training various image processing systems.

About

Machine learning from the browser; served from the Internet Computer Blockchain.

Resources

License

Stars

Watchers

Forks

Languages

  • Jupyter Notebook 74.5%
  • Vue 18.7%
  • JavaScript 3.0%
  • HTML 2.9%
  • Other 0.9%