Git Product home page Git Product logo

spliteasy's Introduction

SplitEasy

This repository contains the code for our paper SplitEasy: A Practical Approach for Training ML models on Mobile Devices in a split second.

The entire code is written using React Native. To follow the general guideline for React Native apps follow this link.

There are three parts to this code: loading the dataset on the mobile device, running the models on the mobile device and running the models on the server.

Loading the dataset on the mobile device

The data files will be available in this link. Move them to your assets folder. The json files are split into 4 parts each with 25 images, so that we can load the image into the phone.

Once the data is in the assets folder, go to App.js and ensure that you load the LoadImageNet component. The code will take some time to load on your device during the first time, once it's done click the load data button. The index of the data being loaded will be logged in your terminal. Then, change the i value in line 58 of imagenet_load.js to i+25 and change the name of the file to the next file. Repeat this process for 5 times and the data is loaded in your phone.

Loading the dataset on the mobile device

The component to load in your App.js now is the SplitNet component. The main changes to make in this component is to add the server url in the App.js file and final_implementation.js file. Based on the model, load the appropriate file for ModelA and ModelC, the files are availabe in this link. The component will have the button for training the model and once you click it the values are logged in your terminal.

Running the Server Code

The server code should preferably be run on a server with GPU support. The code requires the argument --model_name in which you mention the name of the architecture. Once you run the code, you can use the IP address of your server to run the javascript code.

spliteasy's People

Contributors

kamalesh0406 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.