Code Monkey home page Code Monkey logo

brokeneye's Introduction

BrokenEye

Warning

This software is free and does not attempt to make a profit.

It is intended for NON-COMMERCIAL use only!
User is responsible for ensuring that the software is only used in compliance with any Tobii license restrictions (for example, any commercial use requires separate permission from Tobii).
If you want to use the data for commercial purposes, you MUST use Tobii Ocumen.

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

BrokenEye is an application that will allow you to obtain more detailed data from the Tobii Eye Tracker for the best social experience in VR, namely:

  • Gaze direction
  • Eye convergence
  • Pupil diameter
  • Blink / Eye openness (more details below)
  • Streaming images from cameras!

It also allows you to:

  • Save and load calibration data
  • Record and playback data from device (this is a regular zip).

Supported devices

  • Pimax Crystal
  • HP Reverb G2 Omnicept Edition

If your headset also supports Tobii tracking and you would like to add support for it to BrokenEye, please open an issue:

If the plugin works, then there is a high chance of working with BrokenEye.

BrokenEye features video:

Pimax Crystal with improved eye tracking using additional software

How to install

  1. Download the latest version of the application from releases.
  2. Just launch the application.

How to use

After launching the application you can choose:

image

  1. Which device will it connect to?
  2. Open data you have already recorded (or record if you are already connected to the device)
  3. Do not forget to enable or disable preview of data and images from cameras, whenever you need it, since previewing will create unnecessary load on your computer.
  4. Save or load Eye Tracker calibration data (be sure to calibrate the device before saving!).
  5. Server settings for streaming data and images from the camera.
  6. OSC server settings to receive eye openness data from another application.
  7. OSC server parameters.

All settings are saved automatically.

Note

You don't need to enable recording to use the application!
Recording is only necessary if you want to play back the data you received from the device in the future, for example, to configure an external application so as not to wear a headset.

Sending bug reports

If you find a bug, please report it in the issues. Please attach a logs and configuration file to the bug report, which can be found in the C:\Users\<USER>\AppData\Roaming\fyne\com.ghostiam.BrokenEye folder.

Use in VRChat

In order to use in VRChat, you should install VRCFaceTracking and a plugin for it PimaxCrystalAdvanced

First run BrokenEye and then VRCFaceTracking.

Using an external application to obtain eye openness data

Since we can only receive data on blinking from the tracker, to obtain data on eye openness, it is necessary use another application that will send data to BrokenEye via the OSC protocol, for example EyeTrackVR

How to configure EyeTrackVR

How to get data from BrokenEye

There are 2 APIs for receiving data:

  • HTTP (only for camera images)
  • RAW - data is transmitted over a TCP connection, in JSON format for processed data, and images in raw format.

HTTP API

Images from cameras are transmitted as MJPEG stream, which are available via address:

For the left eye:

http://127.0.0.1:5555/eye/left

For the right eye:

http://127.0.0.1:5555/eye/right

You can also preview images in your browser by going to:

http://127.0.0.1:5555/

The default port is 5555, but it can be changed in the application.

RAW API

To receive data in RAW format, you need to connect via TCP to the application on port 5555.

The request for data looks like this:

ID description
0x00 Request for eye tracking data in JSON format
0x01 Request for raw image of left eye
0x02 Request for raw image of right eye

we send:

ID
byte

we get in the loop:

ID Size Data
byte 4 bytes (little endian) Array of bytes

An example in C# for obtaining eye tracking data can be viewed in this file.

Eye tracking data format:

JSON example
{
  "left": {
    "gaze_direction_is_valid": false,
    "gaze_direction": [
      // X
      0,
      // Y
      0,
      // Z
      0
    ],
    "pupil_diameter_is_valid": false,
    "pupil_diameter_mm": -1,
    "pupil_position_on_image_is_valid": false,
    "pupil_position_on_image": [
      // X
      -1,
      // Y
      -1
    ],
    "openness_is_valid": true,
    "openness": 1
  },
  "right": {
    "gaze_direction_is_valid": false,
    "gaze_direction": [
      // X
      0,
      // Y
      0,
      // Z
      0
    ],
    "pupil_diameter_is_valid": false,
    "pupil_diameter_mm": -1,
    "pupil_position_on_image_is_valid": false,
    "pupil_position_on_image": [
      // X
      -1,
      // Y
      -1
    ],
    "openness_is_valid": true,
    "openness": 1
  }
}

Raw image format:

Width Height Bit per pixel Raw data
4 bytes 4 bytes 4 bytes N bytes

Where N is the size of the image in bytes:

N = Width * Height * (Bit per pixel / 8)

brokeneye's People

Contributors

ghostiam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

brokeneye's Issues

Support for other Tobii tracked Headsets

Hello,

I would like to ask whenever it's possible to support other Headsets than Pimax, unfortunately the source code is not available, there are plenty headsets that rely on Tobii integrated outside Pimax and these devices are left as "suboptimal" due to Tobii having some rather interesting licensing implemented in their SDK.

So would it be possible to integrate this product into other Headsets, such as the HP Reverb G2 Omnicept?

application recognized as malware by ESET security

I realize there's not much to do about it, but the latest release was just flagged by ESET security for the following

a variant of Win64/GenKryptik_AGen.QI trojan

I presume it's a false alert, but be aware since ESET is a pretty common security software

Passthough eye openness data when not using EyeTrackVR

Without using BrokenEye and just VRCFaceTracking, the eye openness goes from 0 - 0.5 - 1. Aka, half closed.
When adding BrokenEye to the mix, eye openness is just 0 an 1. Open and closed.

EyeTrackVR does not like my eyes and the current beta crashes often, so I can't really use it.
Anyway to pass on the "half closed" 0.5 value?

No "Connect to device" Option

I installed the app and the opening screen shows up but there is no "Connect to device" menu item. I have attached the screen I see and the screen from you install instructions file.

My startup sequence is to start up my Crystal and have it ready. I then launch the BrokenEye app but no Connect to device option.

Thanks for your help,

Cheers,
Steve

How To Use Screen.pdf
Broken Eye Config Screen.pdf

What version of eyetrackVR was tested?

Hello,
So i have this setup and im using branch.16 of the prerelease of eyetrackVR.

What is happening is eyetrackVR will just stop updating from the camera feed. sometimes it happens in 30 seconds sometimes 2 minutes. This causes the openness to get stuck. simply going to settings and back to both eyes fixes it.

I know its not a bug with "brokeneye" but i just wanted to know what version you are using/tried so i can rollback to that and try it.
I know it states latest prerelease but i think its bugged.

thanks.

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.