Collect data using Graph UX

Graph UX provides the flexibility to capture the real-time data using a built-in PC microphone or an external development board. You can add additional data to your existing projects or build your own dataset from scratch. You can collect labeled as well as unlabeled data as per your project requirement.

⚠️

Before you use the development board to collect data, make sure to flash your board with Imagimob Streaming Firmware.

Let's start collecting data using Graph UX, first we will create the Graph UX Project and then we will capture real-time data using Serial Capture or Local Microphone.

Creating Graph UX Project

You can create an Empty Graph UX project or Live Data Collection Starter Graph UX project containing an example graph. Refer to How to get started with Graph UX? for instructions on creating the Graph UX project.

If you select Live Data Collection Starter Graph UX project to collect data, set up the input node and start collecting data but if you select Empty Graph UX project to collect data, you need to create the data collection graph. Follow the steps below to create the data collection graph.

Creating Data Collection Graph

To create a data collection graph, follow the steps:

Step 1: Select Input node to stream data

You can stream data using the following Input Nodes:

  • Serial Capture - stream using the an external development board
  • Local Microphone - stream data using the built-in PC microphone
Setting up Serial Capture

To set up Serial Capture, follow the steps:


  1. Connect the development board to laptop or PC using the serial port.
  2. Double-click the Main.imunit to open the canvas.
  3. Expand Devices and drag and drop the Serial Capture unit onto the canvas.

The tabs represents the default properties of the Serial Capture :


Unit Name : Displays the name of the unit
Unit Description : Displays the description of the unit
Setting up Local Microphone

To set up the Local Microphone, follow the steps:


  1. Connect the microphone or use the speaker of the laptop or PC.
  2. Double-click the Main.imunit file to open the canvas.
  3. Expand Devices and drag and drop the Local Microphone unit onto the canvas.

The tabs represents the default properties of the local microphone:


Unit Name : Displays the name of the unit
Unit Description : Displays the description of the unit
Step 2: Setting up Visualization node and connecting different nodes
  1. Expand Visualization and drag and drop the Data Track unit onto the canvas.
  2. Click on the red icon present in the Input Node and drag over to the gray icon in the Data Track node. This creates a connection between the two nodes.
  3. Click on the node to edit the properties in the Properties window, if required.

Real-time data collection using Serial Capture or Local Microphone

To capture real-time data using the Local Microphone or Serial Capture, follow the steps:


  1. Navigate to the toolbar and click the Start button to open the main.imsession file. An empty session file opens.

  2. Click the Record button to start the recording.

  3. Capture the real-time data for few seconds.

  4. Click the Record button to stop the recording.

  5. Select File>Save Main.session As, if you only want to the save the session file. However, select File>Save to save the session file as well the data track. The Save New Session window appears.

  6. In Location, click the three dot and select the desired location to save the file.

  7. In Session Name, enter the name of the session file.

  8. Under Track Options, you can set the followings:


    • In Wave Format Encoding, select the encoding format for the audio tracks.
    • In Track Name, double-click the column to edit the track name, if required.
    • In File Name, double-click the columns to edit the track name, if required.

    Select the save checkbox corresponding to the tracks you want to save.

  9. Click OK to save the files.

  10. Repeat the instructions from step 2 to collect and save data in multiple session files.

Collect labeled data using Graph UX

After you created a data collection graph to collect the data, you can utilize the same graph to label the real-time data, by adding a Pre-defined Labels node onto the canvas. Define the classes in the Predefined Labels node for one time and utilize the defined classes to label the data on a click of button.


Defining classes in the Predefined Labels node

To define classes in the Predefined Labels node, follow the steps:


  1. Double-click the Main.imunit where you created the graph for collecting data.
  2. Expand Projects and drag and drop the Predefined Labels unit onto the canvas.The Predefined Labels node displays the default classes.
  3. Define the classes in Predefined Labels node by entering every class in a new line.
  4. Navigate to the toolbar and click the Start button to open the session file (.imsession). An empty session file opens displaying the pre-defined classes in the Labels bar.

How to collect labeled data using Graph UX?

To label the real-time data using the Graph UX, follow the steps:


  1. Navigate to the toolbar and click the Start button to open the main.imsession file. An empty session file opens displaying the predefined classes in the Labels bar.

  2. Click the Record button to start capturing the real-time data for few seconds.

  3. In the Labels bar, select the class to start adding labels to the streaming data. As you select the class, the label with that class is added to the real-time data.

  4. Deselect the class to stop adding the labels to the streaming data.

ℹ️

• You can also enable or disable the class using the keyboard shortcuts displayed when hovering over the classes in the Labels bar.
• After collecting the data, you can fine-tune the labels accordingly.

  1. Click the Record button to stop the recording after you have labeled the data.

  2. Select File>Save Main.session As, if you only want to the save the session file. However, select File>Save to save the session file as well the data and the label track. The Save New Session window appears.

  3. In location, click the three dot and select the desired location to save the file.

  4. In Session Name, enter the name of the session file.

  5. Under Track Options, you can set the followings:


    • In Wave Format Encoding, select the encoding format for the audio tracks.
    • In Track Name, double-click the column to edit the track name, if required.
    • In File Name, double-click the columns to edit the track name, if required.

  6. Select the save checkbox corresponding to the tracks you want to save.

  7. Click OK to save the files.

  8. Repeat the instructions from step 2 to create multiple session files.