Undergraduate Projects

Keep Your Distance

The aim of this project was to detect objects through everyday use cameras and to be able to measure distances between them, collect data and generate some graphs for reporting.

The scope of our project was to detect humans only, with the understanding that this system will be extended later to incorporate identification of other objects and distance measuring between different objects. The key point to be highlighted here is that the cameras used will be regular cameras, examples include cctv cameras or in our instance laptop webcams, that do not have any special capabilities such as depth measuring.

Solution Description

1) Object Detection:

For the detection of objects, we have used state of the art object detection AI models.

At the research phase of the project, we were using YOLOv4 for detecting objects which was later changed to cocoSSD. These models detect the humans in the video capture and provides us with bounding boxes of the detections in the video frame.

2) Depth Estimation:

After the objects have been detected, we estimate the depth i.e the distance of the objects from the camera using the pinhole camera equation.

This process is repeated for all the detected objects.

3) Distance measuring:

Now that we have the object’s location and the distance away from the camera, we place the objects in an abstract 3D grid. The camera location is considered as the 0,0,0 x,y,z of the grid. Objects are placed on the grid using their bounding box coordinates as x and y and depth as z. After all objects are place in the 3D grid, we can simply calculate the distance between them using the Euclidean distance formula.

4) Graph Generation:

Using these mentioned steps, distance between each object is measured for every frame of the video capture. This data is being captured and stored in a comma separated value file more commonly known as csv file. We then generate some simple charts to show to the captured data in graphical from for interpretation.

 5) Bringing It together:

After we have achieved the project’s technical objective, we have put together a interface around it to also tackle some of the business aspects. We have chosen to deliver the system as a web app where users can visit and test the system. Users can also register and login to save video and rewatch and inspects reports later.

Developed By:
Zarif Jawadul Karim
Aakash Rayamajh
Thi Ngoc Kieu Luong