Multi-camera application for determining the orientation of boxes
We have 3 usb webcams (logitech brios) plugged into a USB hub, which is then connected to a MacBook Pro 14. The cameras are placed such that they provide a view of the box from the top, the front, and the side.
- Clone the repository
- Install the uv package manager. Link to instructions here.
- Install the dependencies with
uv:uv sync - Put your Groundlight API token in the
.envfile. You can get a key by signing up at Groundlight, and then creating an API token.
- Verify that the cameras are working:
uv run python src/box_orientation/cameras.py. This will open a window with the three camera views. If the views are not properly labeled, you might need to adjust the order of the camera views in thesrc/box_orientation/cameras.pyfile on the linecameras = Cameras(view_names=["top", "side", "front"]). Once you determine the correct order, update the order on the lineself.view_names = ["top", "front", "side"]in thesrc/box_orientation/orientation.pyfile to match.
- Run the demo:
uv run python src/box_orientation/orientation.py. It will first ask you to onboard your box. This will involve taking an image of each side of the box using the camera positioned to capture the box from the top. Then it will start a while loop, predicting the orientation of the box every few seconds. Groundlight's cloud labelers will automatically start labeling images as they are captured, and Groundlight will build and continuously update the models necessary for the demo. You can review the performance of the models or add your own labels on the Groundlight dashboard.

