I would like some advice to validate my approach for building a computer vision system.

Design brief:

Using existing CCTV cameras in a retail store, detect the footfall in the shop (count individual visitors) and determine their apparent age and gender.

  • System will run on a computer with an Nvidia Jetson Xavier AGX with 32GB RAM.

  • Collects data real time.

  • The system should ideally be adaptable to other stores with different cameras etc. - it isn't a one-off solution.

  • accuracy only needs to be sufficient for aggregate analytics over days/weeks.


  • I don't have access to test footage from the shop yet - have to build a first attempt without this info.

  • The CCTV cameras in the shop aren't too high resolution, and are placed at a high angle on the ceiling. Any detected faces would be small and low resolution and a side-on view.

  • The system should be able to deal with people wearing masks.

  • The store will have display racks etc. so people might be partially occluded and the system should deal w that.

  • Data privacy issues need to be considered.

First attempt

I've built a first attempt that processes the footage frame by frame. It uses a person detector and a face detector to get bounding boxes. It uses a centroid tracker assign IDs to each person using the person bounding boxes. It sends the face detections to age and gender caffe models trained on IMDB faces. The gender and age detection is not accurate at all. Probably because the faces are small in the sample video - like 50x50 pixels. The gender detection is highly biased towards male classifications.

New attempt

  • I'm figuring that using full-body person attribute detection is more appropriate than face-only age/gender detection for this application? Should I abandon face-based approaches?

  • An approach like DeepSORT rather than centroid tracking will probably work better.

  • Using YOLOv4 for person detection.

  • I need to include some person re-identification since I need to determine the overall time spent in the store. How would you approach this?

I'm experimenting with this library KaiyangZhou/deep-person-reid for both the person attribute detection (trained with PA-100K) and person re-id (trained with Market-1501).

How would you approach building this project?

This is my first computer vision project so open to seemingly obvious advice.

  • $\begingroup$ This is a very deep question. Look into the Visual Genome for training data. But this is a 10 people 2 years project. $\endgroup$
    – Vorac
    Commented Dec 23, 2021 at 10:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.