Skip to content

Use a webcam as a mirror to view your NYC/FB data identities

Notifications You must be signed in to change notification settings

dingaaling/webcam-mirror

Repository files navigation

webcam-mirror

Project Description:

  • Use a webcam as a mirror to view your data identities
  • Flask app that accepts basic user information to display your Facebook and New York City data over a live OpenCV facial detection visualization
  • An exploration tool that allows you to explore your own data, as well as aggregated data of other New York residents and crowdsourced FB ads dataset from Propublica (https://www.propublica.org/datastore/dataset/facebook-ad-categories)
  • Developed for the 2020 Data x Design Exhibit

Demos

Facebook Mirror interface demo - uploading my own Facebook Data

Facebook Mirror interface demo - using Propublica FB Ads Dataset (Not my data!)

New York City Mirror interface demo

Project Organization

├── README.md
├── main_fb.py              < - flask app to run fb web interface  >
├── main_gov.py             < - flask app to run gov web interface  >
├── ageGenderDetect.py      < - helper functions to detect face/age/gender  >
├── facebookStyling.py      < - helper functions for styling facebook video stream  >
├── govStyling.py           < - helper functions for styling gov video stream  >
├── models                  <- ML prototxt and caffe models for face/age/gender detection >
├── static                  <- CSS files >
│   ├── styles                  
│        ├── main.css                
├── templates               <- HTML files >
│   ├── index_fb.html       < - display gov form UI >
│   ├── index_gov.html      < - display facebook form UI >
│   ├── video.html          < - display video stream UI >
├── portraits               <- Placeholder for data portraits >
├── data                    <- datasets used for app >
│   ├── fb_data             <- Folder that contains ProPublica FB Ads data or uploaded personal fb ads data >
│   ├──   ├── facebook      <- Placeholder for personal dataset>
│   ├── 311.json            <- Dataset of 311 complaint data, by zipcode >
│   ├── income.json         <- Dataset of average income data, by zipcode, county >
│   ├── zipmap.json         <- Dataset that maps zipcode to county >
│   ├── fb_propublica.json  <- Propublica FB ads dataset >

*Note: in the repo models, portraits, and data folders are in root.zip file

Getting this running on your computer

Requirements:

  • Python3
  • Computer with Webcam
pip install requirements.txt

To get started (while the flask app is in development), run:

python main_fb.py --ip 0.0.0.0 --port 8080

or

python main_gov.py --ip 0.0.0.0 --port 8080

webcam-mirror in the wild: 2020 Data x Design Exhibit