Crowd Estimates at the Capitol Riot Using PyTorch and Streamlit

Theo
Analytics Vidhya
Published in
5 min readJan 14, 2021

--

Image from C-SPAN, layered with a crowd estimate heatmap.

Although experts have said that without any aerial photos of the riot, it is difficult to estimate the size of the crowd, the one estimate that everyone can agree on is that there were a few police when compared to the number of rioters.

Using Streamlit and CSRNet, developed by Yuhong Li, Xiaofan Z, and Deming Chen, let’s put together a tool to evaluate the number of protesters in any given photo. This tool can be useful to help create descriptive analyses comparing the ratio of cops to the crowd for this event as well as past gatherings (e.g. the Black Lives Matter protests from the summer of 2020).

Project Goals

The first step to any project — whether it’s a yearlong one or just an afternoon like this project — is to lay out the puzzle pieces and clarify to your partners as well as yourself what the goal is: what is this project meant to accomplish?

Image by author

This means you need to take stock of the tools at your disposal, the amount of hours you want to prioritize on each phase of your project, and if they align with your goal(s). While it’s good to think about these three aspects of a…

--

--