View live inference in the browser

After the deployment completes and the Edge Impulse Linux Runner starts, it hosts a local web interface on port 4912. This page shows the live video input from a camera or a file, alongside real-time inference results and timing information.

Open a browser and navigate to the following URL:

    

        
        
http://<your-edge-device-ip>:4912

    

Replace <your-edge-device-ip> with the public IP address (for EC2) or local IP address of your edge device. For example, if your device’s IP address is 1.1.1.1, the URL is:

    

        
        
http://1.1.1.1:4912

    

Edge devices with cameras

If your device has a camera attached, you’ll see live video in the browser. Point the camera at this test image to verify that the model is detecting objects:

Image Alt Text:Test image showing a dog and a cat side by side for model verificationTest image with a dog and a cat

The model, running on your edge device, identifies both the dog and the cat. The browser output is similar to:

Image Alt Text:Browser view showing live camera feed with bounding boxes identifying a dog and a cat along with inference timingExpected inference results with camera

Edge devices without cameras

If your device doesn’t have a camera, the component plays a pre-installed 90-second video of a cat. The browser output is similar to:

Image Alt Text:Browser view showing inference results from a video file with a cat detectedExpected inference results without camera

If the image appears frozen, the Edge Impulse Linux Runner has finished playing the video and is waiting for a restart command. To replay the video, see Send commands through AWS IoT Core .

View inference output in AWS IoT Core

The Edge Impulse Linux Runner publishes inference results and model metrics to AWS IoT Core MQTT topics. You can view these messages in the AWS Console.

To view the message:

  1. Open the AWS Console and navigate to AWS IoT Core.

  2. Select MQTT test client.

  3. In the Subscribe to a topic section, enter the following topic filter and select Subscribe:

        
    
            
            
    /edgeimpulse/device/#
    
        
    

For devices with cameras, inference results appear whenever the model identifies an object. The output is similar to:

Image Alt Text:MQTT test client showing JSON inference output with bounding box coordinates, labels, and confidence scoresInference output in MQTT test client

Model metrics are published periodically, controlled by the metrics_sleeptime_ms configuration field:

Image Alt Text:MQTT test client showing model metrics including inference time and resource usageModel metrics in MQTT test client

Send commands through AWS IoT Core

The Edge Impulse Greengrass component supports commands sent through MQTT topics. The restart command restarts the Edge Impulse Linux Runner service. This is especially useful for devices without cameras, where it pauses after the video ends.

Find your device name

To send a command, you need the device name that the Edge Impulse Linux Runner registered in IoT Core. Look at the inference output in the MQTT test client. Each message is published to a topic with the following structure:

    

        
        
/edgeimpulse/device/<device-name>/inference/output

    

Copy the <device-name> portion from the topic to use in the next step.

The Edge Impulse Linux Runner uses four MQTT topics per device:

    

        
        
/edgeimpulse/device/<device-name>/inference/output
/edgeimpulse/device/<device-name>/model/metrics
/edgeimpulse/device/<device-name>/command/input
/edgeimpulse/device/<device-name>/command/output

    

Send the restart command

To send a restart command:

  1. In the MQTT test client, select the Publish to a topic tab.

  2. Enter the following topic, replacing <device-name> with the name of your device:

        
    
            
            
    /edgeimpulse/device/<device-name>/command/input
    
        
    
  3. Clear the message body and enter the following JSON:

        
    
            
            
    {
       "cmd": "restart"
    }
    
        
    
  4. Select Additional configuration and enable the Retain message on this topic checkbox.

  5. Select Publish.

After publishing, you should see a response on the command output topic similar to:

    

        
        
/edgeimpulse/device/<device-name>/command/output

    

The response confirms that the Edge Impulse Linux Runner has restarted. Navigate back to http://<your-edge-device-ip>:4912 in your browser to confirm that inference has resumed. You should also see new inference results appearing in the MQTT test client.

Note

For devices without cameras, the Edge Impulse Linux Runner reads the sample video file and reports inferences until the video ends. The runner then waits for a restart command to replay the video from the beginning.

Troubleshoot deployment issues

If the Edge Impulse Linux Runner doesn’t start or the browser page doesn’t load, consider the following:

  • First deployment takes time: On the first deployment, the component installs all prerequisites (Node.js, libvips, Edge Impulse CLI). This can take 5–10 minutes. Monitor progress by tailing the component log on your device:

        
    
            
            
    sudo tail -f /greengrass/v2/logs/EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent.log
    
        
    
  • Trace runtime logs: While the component is running, the Edge Impulse Linux Runner writes a separate log file in /tmp. The filename follows the pattern ei_lockfile_runner_<device-name>.log. Tail this file to watch live inference activity:

        
    
            
            
    sudo tail -f /tmp/ei_lockfile_runner_*.log
    
        
    
  • Jetson GPU model loading delay: On Jetson devices where the model is compiled for GPU acceleration, expect a 2–3 minute delay the first time the model loads into GPU memory. Subsequent starts are much faster.

Clean up AWS resources

To clean up AWS resources and minimize costs, see Cleaning up AWS resources .

What you’ve accomplished

You’ve verified that the Edge Impulse Linux Runner is running inference on your edge device. You viewed results in the browser and AWS IoT Core MQTT topics, and sent a restart command through IoT Core.

You can now use MQTT commands through AWS IoT Core to control the Edge Impulse Linux Runner in real time and interpret its model metrics. For more information about the available command set and metrics features of the Edge Impulse Linux Runner AWS IoT Greengrass integration, see the MQTT command and metrics reference .

Back
Next