Giter Club home page Giter Club logo

interactive_web_cnn_trainer's Introduction

Interactive_web_CNN_using_MNIST

This is the CCI_AI_For_Media_23_24 mini-project "Interactive_web_CNN_using_MNIST". The idea of this project is to build an interactive system on the web that visualizes the process of building, training, and evaluating a convolutional neural network (CNN) model.

How to run and view

This project has been deployed on UAL Git. Here is the link to experience this project online directly: https://git.arts.ac.uk/pages/23009641/Interactive_web_CNN_using_MNIST/ (Since it requires GPU, I highly recommend you experience it on a desktop device with Chrome.)

You can also view the demo video on YouTube: https://youtu.be/YgYHFQpmkv4

To run this project locally, clone or download the code of the branch "main". Before running the code, make sure you have installed Node and npm. Then open Terminal and follow the instructions below.

  1. Get into the project directory by command: cd {your-path-to-project-directory}

  2. For the first time to run, relevant node modules are required to be installed. Use command: npm install

  3. After successfully installing node modules, run the app by command: npm start

    Then you can open your browser and view it at localhost. Here is a screenshot:

Screenshot 2024-03-14 at 04.38.25

Code structure

This is a project built mainly based on react.js, TensorFlow.js and d3.js. As a result, it was bootstrapped with create-react-app. Here is the major code structure:

  • package-lock.json
  • package.json
  • public
  • src
    • custom_style
    • machine_learning
    • user_interface
    • visualization
    • App.js
    • other files

Some of the files are automatically generated by create-react-app and are files that support the project running, including package-lock.json, package.json and public directory. My major coding work is concentrated in the directory "src". Inside the directory "src", my work can be separated into five parts, referring to one file and five directories shown above. I left comments on all my original coding work, clarifying which part was written by myself and which part was modified by me based on some other sources.

Part 1: Machine Learning Methods

The first part defines all the functions used in the machine learning process, including importing dataset, creating model, training model and some other operations. This part is located in the directory "machine_learning":

  • machine_learning
    • create_model.js
    • data.js (This is the code for retrieving the MNIST dataset shared by Google, which is not written by me)
    • load_model_data.js
    • show_image_data.js
    • train_model.js

Part 2: Visualization

The visualization part includes two d3.js visualization components. The first one draws the structure of the CNN model. The second part shows the prediction of the CNN model. This part is located in the directory "visualization":

  • visualization
    • cnn_vis.js
    • prediction.js

Part 3: User Interface

The UI part includes react.js components that allow users to control the entire process of building, training, and evaluating a CNN model. This part is located in the directory "user_interface":

  • user_interface
    • change_image.js
    • control_bar.js

Part 4: Major Body of Interactive System

The major body combines all the components and methods into one web app, which helps pass data between different components and update visualization based on user input in real time. This part is located in the file "App.js".

Part 5: Visual Design

This part defines the appearance of this project using CSS. This part is located in the directory "custom_style":

  • custom_style
    • user_interface.css
    • visualization.css

interactive_web_cnn_trainer's People

Contributors

lionorlix avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.