# Connecting a Camera to an AI Detector

## Introduction

This tutorial walks through the process of connecting a USB camera to a NEPI-enabled device.

By the end of this tutorial, you will be able to:

- Access the NEPI web interface from a host computer
  - Enable a USB camera, configure its settings, and view a live camera feed
  - Enable an installed AI detection model and connect it to the camera feed

### What you will need

**1)** **1x** NEPI-enabled device and power supply.

**2)** **1x** PC with Chrome (or Chromium) browser installed, and an Ethernet network adapter.

**3)** **1x** Ethernet cable.

**4)** **1x** USB camera or webcam.

## Device and PC - IP Address Configuration

Configure the IP address of your NEPI Device and PC with the following static IP configurations, which will allow them to find and communicate with each other over a network connection.

If you need step-by-step, OS-specific instructions, follow the full tutorial here: [https://www.nepi.com/tutorials/nepi-engine-connecting-and-setup/](https://www.nepi.com/tutorials/connecting-setup/)

### NEPI Device IP Address

**NOTE**: This step is only required if your NEPI Device is running a NEPI Lite Container installation. NEPI Full installations manage all network settings on the NEPI Device.

Set the PC computer to a static IPv4 address with the following values:

**Address**: 192.168.179.103  
**Netmask**: 255.255.255.0

### PC IP Address

Configure the IP address of the computer you will use to access the NEPI device so it is on the same network.

Set the PC computer to a static IPv4 address with the following values:

**Address**: 192.168.179.5  
**Netmask**: 255.255.255.0

## Hardware Setup

Connect your NEPI device to your PC's Ethernet adapter using an Ethernet cable, connect a USB camera to your NEPI device, then power your NEPI device.

## Configuring Camera and Running AI

**1)** Open a web-browser on your PC and enter the NEPI device's IP address in the URL:

#### 192.168.179.103:5003

You should see the NEPI RUI dashboard page appear and a blinking Green heartbeat indicator at the top of the _SYSTEM STATUS_ section that lets you know that the RUI is communicating with the NEPI backend software processes.

**NOTE**: You can come back to this page _(DASHBOARD_) at any time to monitor system messages

**2)** Enable the USB Camera driver by navigating:

- Navigate to the _SYSTEM_ page from the top menu
- Under Select System App, choose _Driver Manager_
- Under Select Driver, choose _USB Camera_

_
- Enable Driver_ toggle

**3)** Enable one of the AI models that was installed during installation setup by navigating:

- Under Select System App, choose _AI Model Manager_
- Under Select AI Framework, choose _yolo8_

_
- Enable AI Framework_ toggle

- Under Select AI Model, choose `common_objects_yolov8_640_tiny`

_
- Enable_ toggle to the right

**4)** To access the camera controls navigate to _DEVICES_ in the top menu then:

- Under Select Device App, choose _Imaging_
- Under Selection, choose your connected camera (_Device_) and the output type _(Data Product)_

****

**5)** To change the resolution, in the _DEVICE SETTINGS_ section toggle _Show Settings_ then:

- Under Select Setting, choose _Resolution_
- Select the new resolution from the dropdown menu

**6)** Scroll down to explore other control settings such as Save Controls, Set Configurations, Snapshots, and more.

**7)** To connect the AI Model to the camera Feed, navigate to _PROCESS_ in the top menu then:

- Under Select Processor App, choose _AI Detector_
- Under AI Detection Manager, choose the AI Model and camera feed
