QuiltView: a Crowd-Sourced Video Response System
What is QuiltView?
QuiltView is a crowd-sourced video response system based on smart glasses such as Google Glass. Specifically, it leverages the ability of capturing first-person view-point video with effortless one-touch in such Glass devices. The extreme simplicity of video capture can be used to create a new near-real-time social network. In this network, users can pose brief queries to other users in a specific geographic area and receive prompt video responses. The richness of video content provides much detail and context to the person posing the query, while consuming little attention from those who respond. The QuiltView architecture incorporates result caching, geolocation and query similarity detection to shield users from being overwhelmed by a flood of queries. More detailed information can be found in this paper
All source code, documentation, and related artifacts associated with the QuiltView open source project are licensed under the Apache License, Version 2.0.
System Components and Workflow
The system currently consists of three components. You can find the source code for each component accordingly:
/quiltview-service- This is the part you should run it on a global server. It comes with a web interface so you can post your queries there. The server will deliver queries to clients and receive video responses back. The server stores the videos (at least for some time) to serve as a cache to shortcuit future queries.
/client- This is the Android code you should run on a Google Glass. When the Glass receives a query, it will pop up and the user can simply reply with a short video with one touch. The video will be uploaded to Youtube and the Metadata about the video, including the Youtube link, will be stored in our QuiltView server. If the user does not reply within 10 seconds, the query will disappear.
proxy_server- This piece exists only because we cannot find a way to store a recorded video on Glass disk with customized application. So what we do now is to stream the frames from client to the proxy, store the video there, and upload it to Youtube from proxy.
Currently we have only tested the source code with Ubuntu 12.04 LTS 64-bit.
Setting Up Server
Go to the QuiltView root directory
Install system libraries
sudo apt-get update sudo apt-get upgrade sudo apt-get install python-pip mysql-server mysql-client libmysqlclient-dev python-dev python-gflags libblas-dev libatlas-dev liblapack-dev python-numpy python-scipy gfortran libevent-dev
Set up virtual environment
sudo pip install virtualenv virtualenv --system-site-packages ENV source ENV/bin/activate
Install python libraries
pip install -r PIP_LIB
Now you can go to the server directory
Set up database (now you should have mysql installed and running)
mysql -u root CREATE USER 'quiltview'@'localhost' IDENTIFIED BY 'quiltview2013'; CREATE DATABASE quiltview; GRANT ALL ON *.* TO quiltview@localhost; FLUSH PRIVILEGES;
To check if database is correctly created, do
mysql -u quiltview -p show databases;
Now sync database from Django to mysql
In the syncing process, you probably will be asked to create a superuser for Django's auth system, just follow the instructions.
Create folders for static files and media files
mkdir STATIC_DIRS STATIC_ROOT MEDIA
Download boostrap, unzip it, and put it under STATIC_DIRS.
We are using Bootstrap version 2. A link to download is at
So you can probably do
wget http://getbootstrap.com/2.3.2/assets/bootstrap.zip -P STATIC_DIRS/ sudo apt-get install unzip unzip STATIC_DIRS/bootstrap.zip -d STATIC_DIRS/ rm STATIC_DIRS/bootstrap.zip
Now collect static files for Django
Edit parameters in
quiltview/settings.pyto set your server address correctly, including
Get models for text similarity detection
cd quiltview_query/text_similarity/ wget https://storage.cmusatyalab.org/text_similarity_model/wiki_en_wordids.txt wget https://storage.cmusatyalab.org/text_similarity_model/model.lda cd -
sudo ../../ENV/bin/python manage.py runserver 0.0.0.0:80
Register the account you want to use to post a query.
You have to login with the superuser name and password for your Django project. You probably have done this when you first did
syncdb. If you haven't, you can create one through
./manage.py createsuperuser --username=<username> --email=<email>
Go to Users, then Add. The most important field is the Google Account, which you will use to login QuiltView and post queries.
Setting up client
Install Android SDK 4.4.2, including Glass Development Kit Preview.
Import the project under
QUILTVIEW_ROOT/client, change the quiltview server and proxy address in Const.java. Install it to the Glass.
The client application can be activated by "Ok, Glass" -> "Start QuiltView".
Setting up proxy
Go to the proxy directory
cd QUILTVIEW_ROOT source ENV/bin/activate cd proxy_server
Install system libraries
sudo apt-get install libopencv-dev python-opencv
Set the configuration parameters in Const.py.
If you want to use Youtube to store videos, you have to do the following steps. If your proxy and quiltview server are the same and you want to store the videos in this server (for demo purpose), then you don't need to do this.
Register a project at Google Developer console to use the Google APIs of uploading video to Youtube. What you need is a JSON file with your credentials. Follow the instructions here:
After creating the project, download the json file and put it under
proxy_serverdirectory. It has to be named as
If you are uploading to Youtube, an OAuth page will probably pop up the first time you run it. Click okay and you will not be bothered again.
Setting up virtual user
See the Readme file inside