CCTView Demo App

Demystifying Clearview AI Blog Series (Part 7)

Samuel Brice
3 min readDec 15, 2020
cctview.herokuapp.com

LEAN Stack Template

CCTView’s demo app is based on the LEAN Stack template deployed on free-dyno Heroku. It has been implemented to work offline with preprocessed NYCDOT CCTV footage from Tuesday, May 5th, 2020, between the hours of 1 PM and 2 PM.

The gist of LEAN Stack is using the same language and pattern (i.e., TypeScript and Dependency Injection) on both the client and the server. Using TypeScript (i.e., NodeJS) on the server-side was made possible thanks to the features being pre-extracted into a language-agnostic format.

Client

The client was generated with Angular CLI version 10.2.0 and contains a handful of self-explanatory components.

To start, simply click on the FDR @ E 53 St (733–681-N) camera, then hover/click on a target vehicle.

Server

The server is based on the Nest TypeScript starter template and contains a single service for computing various stats and metrics. To calculate Euclidean distance within NodeJS, I used the scijs NPM packages ndarray and ndarray-distance.

Less Than 20 MB with 10 GB Data Store

The application deployment (15 MB for the client, 4 MB for the server) only contains business logic for the UI and the backend service for computing Minimum Euclidean Distance for determining vehicle matches.

Object detections and feature extractions (approximately 10 GB) are stored off-site within the following repositories:

Room for Improvement

This app demonstrates what’s possible with default off-the-shelf options. There’s certainly a lot of room for improvement.

In most cases, you’d want to tune both your object detection and ReID models using training data from the production system. If you play around with the demo, you’ll notice MED is calculated for all matches within a frame. A simple optimization would be using lane segmentation to only match on vehicles going the appropriate direction.

--

--