Giter VIP home page Giter VIP logo

openmined's Introduction

OpenMined Unity Application

Build Status License

Table of Contents:

Introduction

OpenMined Unity Application applies the PySyft library into a Unity Application. Please see the PySyft repository README.md for more details on the intent of OpenMined and to familiarize yourself more with the basic concepts of the project.

Also check out the Docs for more information! We are working toward consolidating all the documentation to make it easier for new contributors.

Why Unity?

Unity has a few advantages that we are leveraging for this project

  1. It's portable.
  2. It's free
  3. It has versitile GPU access.
  4. It can be used for high end graphics gaming consoles (Playstation, XBox, etc)

More about this in the corresponding file at tutorials folder

Marketplace Mechanics
TODO

Architecture

Open Mined Architecture

Quick Setup

  1. Install Unity:
    • Windows & Mac users: Download it from here.
    • Linux users: Download it from here

Note: If you do not already have one, you will have to create a Unity account when you open the Application for the first time. For new users, a Personal account should be ok.

  1. Open project in Unity [File -> Open Project -> Directory/To/OpenMined]

  2. Open Juptyer Notebooks in the notebooks directory.

Setup Troubleshooting

If you have an issue, refer to the following steps for a more detailed project setup. These steps were confirmed to work under a Windows/linux enviornment, though the steps should be applicable to alternative operating systems.

The steps come in two parts:
Part 1: Unity Setup
Part 2: Jupyter Setup

Unity Setup

  1. Download Unity from here or here(linux)
  2. Open project in Unity [Open(Top Right of Home Screen) -> Directory/To/OpenMined]
  3. In the Project Pane (usually below), double click OpenMinedMain. If you can't find the file for some reason, check the trouble shooting section.
  4. Hit Play on the Unity Editor

Jupyter Setup

  1. Run jupyter notebook from you openmined directory
  2. Open Syft Tensor Example Notebook.ipynb
  3. Run the notebook

For OSX (High Sierra)

Same steps as above. Download Unity from here. I chose the personal version. This will provide you a .dmg installer, which will download and install the necessary components (~800mb).

If on OSX turn on Metal Support

  • Within Unity editor select: Edit -> Project Settings -> Player
    • In the Inspector, scroll down until you find Metal Editor Support under Other Settings and click the checkbox to turn it on. (skip this if not on Mac OSX)
    • In the Inspector, expand Resolution and check the box for Run in Background

General Troubleshooting

  1. If OpenMinedMain is missing
  • On the right menu: Check Main Camera object has SyftServer.cs component attached to it
  • On the bottom dialog: Go to OpenMined/Network/Servers drag SyftServer.cs to Main Camera object
  • Add a Compute Shader to the Shader variable of SyftServer.cs script
  • Go to OpenMined/Syft/Math/Shaders drag FloatTensorShaders to SyftServer (Script) component recently attached to Main Camera
  1. If my applications do not seem to be communicating between eachother...

Check if the Server is running...


It should run on port 5555 and this can be checked by running the following command on CMD with administrator permissions.

netstat -a -b | findstr :5555  

If just the Server is running, the output should be:

TCP    0.0.0.0:5555           YOUR_PC_NAME:0      LISTENING

If both Server and Jupyter Notebook are running and communicating, the output should be:

TCP    0.0.0.0:5555           YOUR_PC_NAME:0      LISTENING
TCP    127.0.0.1:5555         YOUR_PC_NAME:63956  ESTABLISHED
TCP    127.0.0.1:63956        YOUR_PC_NAME:5555   ESTABLISHED

Another way:
Osx/Linux

lsof -i :5555

Result should be:

Unity   1709 user   38u  IPv4 0x59e297c6d0d734e31      0t0  TCP *:personal-agent (LISTEN)

  1. My application randomly stops working.

Jupyter Notebook only works if Unity has focus
By default, the "Run in background" options is disabled. So if the Unity Editor loses focus then the Jupyter Notebook won't work. Go to Edit -> Project Settings -> Player. The inspector pane will now change to show the player settings. Look for the option that says "Run In Background" and check it [1]

Links and How Tos

How Tos:

How to add a Function to Float Tensor

Video Links:

Introduction
Architecture Proposal

References

[1] stop unity pausing when it loses focus

openmined's People

Contributors

iamtrask avatar diegoalejogm avatar floev avatar gavinuhma avatar bharathgs avatar bendecoste avatar keithfz avatar alberduris avatar andorsk avatar abe732 avatar anishpdalal avatar tusharsoni08 avatar

Watchers

 avatar James Cloos 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.