Home Surveillance With Facial Recognition Using Openface

2,610 views
Skip to first unread message

Brandon Joffe

unread,
Aug 4, 2016, 8:54:24 AM8/4/16
to CMU-OpenFace
Hi there,

firstly I'd like to thank the openface team for developing this awesome project!

I am currently doing my thesis on home surveillance with facial recognition, and have decided to use openface as it produces the best results. My development thus far has been using the openface docker image with additional flask dependencies (Used for a web application) on a Mac. 

The system has to perform facial recognition on several cameras simultaneously. So far I have implemented a system that recognizes faces in IP camera frames and streams these frames to a web client (using the flask framework). However, when I try to recognize faces from multiple cameras, the openface TorchNeuralNet object which generates a subprocess of openface_server.lua has IO synchronization issues (shown in error.txt attached).

I then decided to create openface TorchNeuralNet objects for each camera, this solved the problem until I tried to view the web client from multiple hosts in which I received the same error.

I was wondering if anyone has tried to recognize faces in multiple videos or streams simultaneously and had the same issue, or has any suggestions?

Any help would be greatly appreciated!

Thanks in advance.

Regards 
Brandon


error.txt

Jovani Warguez

unread,
Aug 12, 2016, 11:05:21 AM8/12/16
to CMU-OpenFace
hello can you please tell how you connect the open-face program to your IP camera and how do you do your project using flask framework.

thanks in advance :)

Brandon Joffe

unread,
Aug 12, 2016, 11:41:28 AM8/12/16
to CMU-OpenFace
Hi Jovani,

I am using opencv to capture frames off the IP cameras, and detecting and recognizing faces using dlib and openface. The processed frames are then converted to jpeg format and "pulled" by the web socket (flask socketIO) to be streamed to the web client. I have attached a high level system overview, which should give you a better idea of the system flow and its main components.

I hope that answered your question :)

Brandon
SystemOverview-7.pdf

Jovani Warguez

unread,
Aug 13, 2016, 2:43:25 PM8/13/16
to CMU-OpenFace
Thank You Brandon, now I understand the flow.

Just a follow-up question, What database did you use for storing the images? is it MySQL, SQLite or other?

Thanks in advance.

 

Brandon Joffe

unread,
Aug 13, 2016, 2:54:00 PM8/13/16
to CMU-OpenFace
no problem :)

I haven't implemented the database yet, currently just storing images in folders. That being said, I plan on implementing an SQLite database once I am happy with the performance of the main components of the system.

Martin John Lopez

unread,
Aug 14, 2016, 11:19:23 AM8/14/16
to CMU-OpenFace
 Hello Brandon, we're using OpenFace for our project and it's similar to ours. We built OpenFace locally on Docker. We're using Raspberry Pi and Pi Camera. The laptop is using its camera instead of the Pi cam. How can we change the port so it will use the Pi camera?
Message has been deleted

Martin John Lopez

unread,
Aug 15, 2016, 2:07:43 AM8/15/16
to CMU-OpenFace
I tried running this on my Mac but it can't seem to import cv2 from pip install or from package interpreter in PyCharm. What's your fix on this? Thanks.

Brandon Joffe

unread,
Aug 15, 2016, 2:09:52 AM8/15/16
to CMU-OpenFace
Hey Martin,

I am still quite new to docker and I haven't had to stream video from the PI. However, I am streaming from IP cameras (without explicitly opening ports - besides for Flasks default port 5000) by simply using their IP address and I'm sure you could do the same with the PI. Are you able to access your PI's camera stream from your web browser? If you can, you should be able to use opencv's videocapture function to capture frames from the camera without explicitly opening any ports. 

Also I have a return question, I haven't managed to access my webcam (on macbook pro) from within my docker container without using the web demo's approach, getUserMedia. I have followed a few tutorials but no luck. Could you possibly point me in the right direction? 

Brandon Joffe

unread,
Aug 15, 2016, 2:29:56 AM8/15/16
to CMU-OpenFace
Installing Opencv on mac isn't fun, I used the following tutorials to help me along the way:



There are many reasons why importing opencv may not work, in my experience if you have compiled and installed Opencv without any errors, there should be a cv2.so file somewhere on your mac. If this file is not in the correct folder importing cv2 will fail.

This was the fix on ubuntu:

Opencv should be installed in /usr/local/lib/python2.7/site-packages. There should be a file cv2.so, if this is not the case it could be that you made a mistake in a previous step, but before you restart the installation process check to see if the file cv2.so is in opencv/build/lib/. If it is you'll have to copy it to /usr/local/lib/python2.7/site-packages/.

I hope that helps!
Message has been deleted
Message has been deleted

Emmanuel Nipal

unread,
Aug 29, 2016, 10:42:41 AM8/29/16
to CMU-OpenFace

Greetings Brandon,

i was able to try your work but I'm having a problem with regards to the camera. 
In SurveillanceSystem.py, I changed the videocamera with my camera's ip and port but as i start the program I'm getting this error.
Could you please help me? 

Thank you!

Brandon Joffe

unread,
Aug 29, 2016, 1:24:17 PM8/29/16
to cmu-op...@googlegroups.com
Hi Emmanuel,

the IP camera you are using may require a username or password, or even an extra parameter to select the video stream. You should be able to find the correct format of the URL on the product’s website or forum.

I hope that points you in the right direction.


--
You received this message because you are subscribed to a topic in the Google Groups "CMU-OpenFace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cmu-openface/x2aAsatRGD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cmu-openface...@googlegroups.com.
To post to this group, send email to cmu-op...@googlegroups.com.
Visit this group at https://groups.google.com/group/cmu-openface.
To view this discussion on the web visit https://groups.google.com/d/msgid/cmu-openface/5e4680dc-c0d9-48a5-9050-7a78af3afba9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thuc Vu

unread,
Aug 30, 2016, 12:30:24 AM8/30/16
to CMU-OpenFace
IOError: close() called during concurrent operation on the same file object.

Might be trying to call close() while other process is opening file object, and close() call interfere other thread/process.
You should use barrier to wait for all processes finished, or just don't use close()

Brandon Joffe

unread,
Aug 30, 2016, 3:20:17 AM8/30/16
to CMU-OpenFace
Hi Thuc,

I managed to fix the problem, but I believe using a barrier to block threads is a better approach.

Thanks.
Message has been deleted
Message has been deleted

Brandon Joffe

unread,
Sep 9, 2016, 8:57:19 AM9/9/16
to cmu-op...@googlegroups.com
Hi Mark,

if the docker build is working fine all you need to do is start capturing frames using opencv’s video capture method. You welcome to have a look at my home_surveillance repository, within the system folder there is a camera.py script used to read frames from an ip camera.

I hope that helps.

Brandon
On Sep 7, 2016, at 6:43 PM, Mark Bissell <mark.b...@gmail.com> wrote:

Hi, Brandon,

I have recently come across this software and would like to know how to set it up to connect it to an ip camera.

I have followed the automated docker build and it looks to be installed ok. Is there a config file or a command needed to feed in the cameras ip address ?

any pointers in the right direction would be appreciated

thanks

Brandon Joffe

unread,
Sep 9, 2016, 8:57:19 AM9/9/16
to cmu-op...@googlegroups.com
Hi Emmanuel,

my current master branch has a few bugs, I have made quite a few changes which can be found in the frontend_faces branch (not the best branch name for mainly backend work :) ). 

The main reasons why the stream is lagging are partly due to threads holding resources for too long and the dlib's face detector computation time. The front_end faces branch cuts out the face detection from the stream completely and there is less lag. As a result you cannot see the bounding boxes around the faces, however the detected faces are dynamically added to the web application and can be added to the database with the option of retraining the classifier. 

Please note the code is a little messy and I have commented out a few of the main components that I am yet to change. Also I will be swapping out dilb’s face detector with the opencv haar cascade detection method as a few basic tests showed performs a lot better in low resolution images in almost half the time.

Let me know how it goes :)

Regards,
Brandon

   
On Sep 8, 2016, at 7:14 PM, Emmanuel Nipal <wall...@gmail.com> wrote:

Hi Brandon,

Thank you for your help. I was able to make it work through your suggestion. I'm just wondering if there's any way to make streaming faster as it seems lag when tried on your home surveillance project. I tried to lower the quality of images  through compression  sending by my camera to the server but to no avail, it is still lagging.  

Once again thank you. 

Mark Bissell

unread,
Sep 9, 2016, 2:56:49 PM9/9/16
to CMU-OpenFace
That's great I shall take a look, thanks again.

Mark Bissell

unread,
Sep 10, 2016, 2:37:26 PM9/10/16
to CMU-OpenFace
Hi Brandon,

I have had a look at your home_surveillance repository but when I'm following the instructions to install 

1) Pull openface_flask Docker Image

docker pull bjoffe/openface_flask
I am getting the below error

Pulling repository bjoffe/openface_flask
FATA[0001] Error: image bjoffe/openface_flask:latest not found

is there an extra step required ?

Thanks

Emmanuel Nipal

unread,
Sep 10, 2016, 2:55:26 PM9/10/16
to CMU-OpenFace
Hi Brandon,

Good job, your frontend_faces branch did well on reducing the lag and it is hardly noticed if you pay attention to it. I didn't even applied compression and it still performs well. It's okay if the boxes cant be seen as it pays off for the performance although we cant determine who's face is being analyze if multiple faces are present. I'll wait for your next update to try it out again. Good luck on your thesis.

Thank you. 

On Friday, September 9, 2016 at 8:57:19 PM UTC+8, Brandon Joffe wrote:
Hi Emmanuel,

my current master branch has a few bugs, I have made quite a few changes which can be found in the frontend_faces branch (not the best branch name for mainly backend work :) ). 

The main reasons why the stream is lagging are partly due to threads holding resources for too long and the dlib's face detector computation time. The front_end faces branch cuts out the face detection from the stream completely and there is less lag. As a result you cannot see the bounding boxes around the faces, however the detected faces are dynamically added to the web application and can be added to the database with the option of retraining the classifier. 

Please note the code is a little messy and I have commented out a few of the main components that I am yet to change. Also I will be swapping out dilb’s face detector with the opencv haar cascade detection method as a few basic tests showed performs a lot better in low resolution images in almost half the time.

Let me know how it goes :)

Regards,
Brandon
-- 

Brandon Joffe

unread,
Sep 10, 2016, 7:44:24 PM9/10/16
to cmu-op...@googlegroups.com
Hi Mark,

my apologies, I forgot to make the repository public.

Please try again and let me know if it works ok. Just a side note, there is a package that I use to send push notifications that is not installed on the image. If you do receive an error for a missing package called instapush, simply download and install with pip install instapush.

Brandon
--
You received this message because you are subscribed to a topic in the Google Groups "CMU-OpenFace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cmu-openface/x2aAsatRGD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cmu-openface...@googlegroups.com.
To post to this group, send email to cmu-op...@googlegroups.com.
Visit this group at https://groups.google.com/group/cmu-openface.

Brandon Joffe

unread,
Sep 10, 2016, 7:51:45 PM9/10/16
to cmu-op...@googlegroups.com
Hi Emmanuel,

thanks for the feedback!

I have made some further improvements, which have reduced the lagging even more :). Will definitely give you an update once the system is more stable and I have implemented the rest of the functionality.

Regards,
Brandon

Mark Bissell

unread,
Sep 12, 2016, 1:07:12 PM9/12/16
to CMU-OpenFace
Hi Brandon,

Yes thank, that is now working , I have managed to login and connect a ip camera. However I think I need to look at the paths for the pages as the links once logged in cant find the html pages.

Thanks
Message has been deleted

Brandon Joffe

unread,
Sep 15, 2016, 8:55:24 AM9/15/16
to cmu-op...@googlegroups.com
Hi Ashish,

the project itself is not on the Docker image. You’ll have to clone my git repo from here: https://github.com/BrandonJoffe/home_surveillance

Follow the Readme instructions and you should be on your way :)

Regards,
Brandon 
On Sep 14, 2016, at 8:34 AM, ashish nagar <nagar...@gmail.com> wrote:

Hi Brandon,

I am trying to use live stream from IP camera with openface for surveillance application.   I have pulled bjoffe/openface_flask image but can't find  home_surveillance folder.

Am I looking at wrong place? 

Regards,

Ashish Nagar

ashish nagar

unread,
Sep 15, 2016, 12:40:56 PM9/15/16
to CMU-OpenFace
Thanks for the git repo.  I followed the Readme instructions and was able to setup docker container and the application.

Seems like some css files are missing.  Have I missed any setup steps?  

Thanks a lot for helping.


Regards,


Ashish

Emmanuel Nipal

unread,
Sep 15, 2016, 2:10:23 PM9/15/16
to cmu-op...@googlegroups.com
Hi Brandon,

I tried your recent repository and video feed is better than before. Good work on that. I'm wondering on your thoughts about the unknown as they are not fully implemented on the open face. That part is tricky since you use someone's face as unknown, but what if someone not on your trained database is in the video? The results sometimes regarding on that scenario are a random(or closer base on confidence) name of your database with low confidence and not unknown. 

Regards,
Emmanuel

Brandon

To unsubscribe from this group and all its topics, send an email to cmu-openface+unsubscribe@googlegroups.com.
To post to this group, send email to cmu-openface@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "CMU-OpenFace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cmu-openface/x2aAsatRGD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cmu-openface+unsubscribe@googlegroups.com.

To post to this group, send email to cmu-op...@googlegroups.com.
Visit this group at https://groups.google.com/group/cmu-openface.

Brandon Joffe

unread,
Sep 15, 2016, 2:23:03 PM9/15/16
to CMU-OpenFace
Hi Ashish,

my apologies, I just realized my .gitignore file included /dist which contains all those files. I have removed /dist from the .gitignore and I am going to upload the missing files shortly.

Let me know if you have any further problems.

Brandon

Brandon Joffe

unread,
Sep 15, 2016, 3:03:23 PM9/15/16
to cmu-op...@googlegroups.com
Hi Emmanuel,

its actually something I am currently working on. Recognizing unknown people is turning out to be extremely difficult especially in a home surveillance environment. You can have large variations in lighting and pose with unclear low resolution images of a face. 

As a result the generated representation is not sufficient and faces can’t be accurately classified. My thinking is leading towards implementing tracking, where each person in frame will be tracked. If the person’s face is not identified above a certain percentage, or has been predicted as several people in the database while being tracked that person will be classified as unknown.

However, tracking will not directly solve the problem and will put further processing stress on the system. For that reason, I have to come up with a better solution. 

Thanks for the interest :)

Regards,

Brandon


ashish nagar

unread,
Sep 16, 2016, 7:49:08 AM9/16/16
to CMU-OpenFace



Hi Brandon,


Thanks for updated code. Now Dashboard is properly visible.  I can see lots of messages in console but no faces that are detected are shown in the faces detected panel on the Home Surveillance Dashboard.  I have installed missing package pip install instapush.

Left side menu i.e Home, Database, Settings do not work - getting "Not Found" error.

I have extracted home_surveillance directory in the mapped folder.  Do I need to extract this folder to some specific directory in the docker?



Brandon Joffe

unread,
Sep 16, 2016, 8:17:16 AM9/16/16
to cmu-op...@googlegroups.com
Hi Ashish,

it sounds like you have done pretty much everything right. 

With regards to the left side menu, I have not implemented any functionality to make use of that menu. So that was expected, however I am not sure why the faces detected are not visible in the left panel as I just ran the master branch and it seemed to be working perfectly.

The only thing I can notice is that you are running the application on port 5001 as a pose to port 5000 which could be effecting the web socket connection. 

Have you changed the port mapping at all?

Regards,
Brandon 

ashish nagar

unread,
Sep 16, 2016, 10:07:12 AM9/16/16
to CMU-OpenFace
Hi Brendon,

When starting docker container, I had mapped host port 5001 to docker container port 5000.  No other changes in container python files.  

I have restarted container with mapping of host port 5000 to docker container port 5000.

Still not getting any events on UI.  Also Arm/Disarm and Panic buttons not working.  

Still trying to make it work.

Regards,

Ashish

ashish nagar

unread,
Sep 16, 2016, 10:10:15 AM9/16/16
to CMU-OpenFace
Hi Brandon,

When starting python WebSocket.py, I am getting following error:

(MainThread) WebSocket transport not available. Install eventlet or gevent and gevent-websocket for improved performance.

Brandon Joffe

unread,
Sep 16, 2016, 10:41:13 AM9/16/16
to cmu-op...@googlegroups.com
Hi Ashish,

to answer both your questions, the arm/disarm and panic buttons send post requests to a raspberry pi connected to an "alarm interface”  so unless you have a raspberry pi setup with a web server and GPIO connectivity they won’t work. I will upload the code for this at some stage.

With regards to the below error it does not have any effect as of yet, this is not a production ready implementation and only makes use of the stand allown flask web server.

Regards,
Brandon

ashish nagar

unread,
Sep 16, 2016, 12:46:13 PM9/16/16
to CMU-OpenFace
Hi Brendon,

Thanks for an update.  I am not sure why I can't see any detected faces on the dashboard.. will keep debugging and let you know if I find any fix. 

Thanks
Brandon
<span style="font-family: Helvetica; font-s

ashish nagar

unread,
Sep 18, 2016, 6:12:59 AM9/18/16
to CMU-OpenFace
Hi Brandon,

I believe opencv installed in docker is not able to capture RTSP stream from IP camera.  Your sample videos are working fine.  Need to figure out missing packages in opencv or rebuild with ffmpeg/gstreamer support.  Also trying to figure out how to make openface use GPU instead of CPU.

Regards,

Ashish
Brandon

Dave Torrente

unread,
Sep 18, 2016, 11:38:39 AM9/18/16
to CMU-OpenFace
Interesting project you got there Brandon! Is it possible to manipulate the GPIO pins of a raspberry pi in your condition for alarm triggered? It seems that it has different python interpreter and cannot import the raspberry pi GPIO pin in python file where your notification located unless you remote the raspberry pi python interpreter where you will install all the dependencies needed in your project and deploy there :( Maybe you got idea that can help me. Thanks! 

Brandon Joffe

unread,
Sep 19, 2016, 2:58:40 AM9/19/16
to cmu-op...@googlegroups.com
Hi Dave,

Yes it is most certainly possible. I am currently running a flask web server on the PI and I used this tutorial to help me get started: http://mattrichardson.com/Raspberry-Pi-Flask/ 

There are plenty ways to do this, and initially I used node.js with a javascript interface to control the GPIO. 

I hope that points you in the right direction :)

Brandon



--
You received this message because you are subscribed to a topic in the Google Groups "CMU-OpenFace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cmu-openface/x2aAsatRGD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cmu-openface...@googlegroups.com.
To post to this group, send email to cmu-op...@googlegroups.com.
Visit this group at https://groups.google.com/group/cmu-openface.

Brandon Joffe

unread,
Sep 19, 2016, 3:06:17 AM9/19/16
to cmu-op...@googlegroups.com
Hi Ashish,

RTSP shouldn’t be a problem, in fact it was the first streaming protocol I used. You may have to fiddle with the video format, try sticking to mjpeg if I remember correctly I did have some problems with other formats.

Let me know how much speedup you get once you have the GPU working :)

Regards,
Brandon

Dave Torrente

unread,
Sep 19, 2016, 5:09:28 AM9/19/16
to CMU-OpenFace
Thank you this will help. Also i got an idea if it is possible to auto run the python script in raspberry pi that will detect whenever there's a push notification in instapush the GPIO pin will triggered. 

Brandon Joffe

unread,
Oct 8, 2016, 2:11:36 PM10/8/16
to CMU-OpenFace
Hey everyone,

my first concept prototype can be found on my repo:  https://github.com/BrandonJoffe/home_surveillance

The system is still in the development phase but I believe it is a good start to a new open source project for home surveillance with facial recognition using openface.

If you happen to give it a go, any feedback would be great!

Brandon

Robert Sterbal

unread,
Oct 8, 2016, 6:10:25 PM10/8/16
to cmu-op...@googlegroups.com
Please make the project easier to use.

Consider making a Bitnami type of installers.

Robert Sterbal 
--
You received this message because you are subscribed to the Google Groups "CMU-OpenFace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cmu-openface...@googlegroups.com.

To post to this group, send email to cmu-op...@googlegroups.com.
Visit this group at https://groups.google.com/group/cmu-openface.

Brandon Joffe

unread,
Oct 8, 2016, 6:21:29 PM10/8/16
to cmu-op...@googlegroups.com
Hey Robert,

all the libraries used in the project are installed on a docker image. There are only two dependencies currently not installed which I will add shortly.

All that is required is to run the docker container and run the WebSocket.py script in the systems directory. I will certainly be adding more notes and eventually a setup guide to help deploy the system on a home network.

Brandon
You received this message because you are subscribed to a topic in the Google Groups "CMU-OpenFace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cmu-openface/x2aAsatRGD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cmu-openface...@googlegroups.com.

To post to this group, send email to cmu-op...@googlegroups.com.
Visit this group at https://groups.google.com/group/cmu-openface.

Robert Sterbal

unread,
Oct 8, 2016, 6:31:37 PM10/8/16
to cmu-op...@googlegroups.com
I've installed mediawiki in a vm and on windows with a one click installer from Bitnami. Your project could be a good fit for their service.

Brandon Joffe

unread,
Oct 8, 2016, 6:37:18 PM10/8/16
to cmu-op...@googlegroups.com
Ok thanks,

I will definitely take a look.



Dave Torrente

unread,
Oct 9, 2016, 1:30:45 PM10/9/16
to CMU-OpenFace
Great project you've got there Brandon. I give it a try to explore your project. Btw, are you using HOG for person detection before you detect the face by a classifier or by means of HOG also? Thanks :)) 

Brandon Joffe

unread,
Oct 9, 2016, 1:54:45 PM10/9/16
to cmu-op...@googlegroups.com
Hi Dave,

much appreciated :)

In the early stages of development I found HOG descriptors quite computationally expensive. In an attempt to reduce the resources required I use background subtraction to segment a region where a person is likely to be. I then crop this region and search for a face using either Dlibs face detector (based on HOG) or Opencv’s haar cascade approach. This can be selected when adding a camera on the web dashboard. 

I use the ratio of the width, height and area of a region to determine whether it is possible that a person is present in the field of view.  The only issue with this approach is that it is highly dependent upon a good background model. I have set up a few functions in the ImageProccesor.py script to test the HOG pedestrian detector from opencv as well as full body and upper body cascades. Feel free to have a fiddle with them - if you do decide to fiddle with them and you would like to see the result of the detection on the web dashboard you can do the following:

Set self.drawing = True in the Surveillance_System constructor 
In the WebSocket.py script within the gen() function change  frame = camera.read_jpg()  to  frame = camera.read_processed() 

For now, I have left them out but may throw them back in at a later date.

Thanks for the interest :)
-- 
You received this message because you are subscribed to a topic in the Google Groups "CMU-OpenFace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cmu-openface/x2aAsatRGD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cmu-openface...@googlegroups.com.
To post to this group, send email to cmu-op...@googlegroups.com.
Visit this group at https://groups.google.com/group/cmu-openface.

Dave Torrente

unread,
Oct 9, 2016, 2:36:13 PM10/9/16
to CMU-OpenFace
Thanks you're a great man! I also researched about that HOG pedestrian detector and it seems performed well in human detection and easy to implement with opencv built in HOG descriptor. Maybe it's a good combination for fast detection using that HOG and cascades you setup. Also, may I know if you convert the images into a numpy array when using opencv cascade before you convert the opencv rect to dlib rectangle function. Thank you again, man!

Brandon Joffe

unread,
Oct 9, 2016, 2:52:33 PM10/9/16
to cmu-op...@googlegroups.com
No prob,

when I read a frame from an IP camera it is in Opencv’s BGR color format stored in a numpy array. I then use frame = cv2.flip(frame, 1) to convert to DLib’s RGB format.

I hope that answers your question.

Dave Torrente

unread,
Oct 9, 2016, 2:59:46 PM10/9/16
to CMU-OpenFace
You helping me a lot, thanks man!

Brandon Joffe

unread,
Nov 3, 2016, 7:48:36 AM11/3/16
to CMU-OpenFace
Hey guys,

my final prototype can be found on my repo: https://github.com/BrandonJoffe/home_surveillance

The code is fully commented and a detailed description of how the system works and how to set it up can be found in the Readme. I will be posting a link to a video demo in the next week or so. 
Message has been deleted

arnaud dallies

unread,
Feb 21, 2017, 4:59:03 AM2/21/17
to CMU-OpenFace
Hi Brandon,

I implemented some Facial recognition under OpenCV.
It works but i wanted to use OpenFace to test.

I saw your project and it 's exactly what i looked for :p

I followed your tutorial based on docker image.

But if i want to add camera i get that error :

(Thread-331) Exception on /add_camera [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "WebApp.py", line 148, in add_camera
    HomeSurveillance.add_camera(SurveillanceSystem.Camera.IPCamera(camURL,application,detectionMethod))
  File "/host/gano/homesurveillance/home_surveillance/system/Camera.py", line 85, in __init__
    self.video.open()
TypeError: Required argument 'device' (pos 1) not found
(Thread-331) 192.168.10.8 - - [21/Feb/2017 09:39:04] "POST /add_camera HTTP/1.1" 500 -
(Thread-338) 192.168.10.8 - - [21/Feb/2017 09:39:04] "GET /socket.io/?EIO=3&transport=polling&t=1487669944258-142&sid=c941f6c2ebe34e50a5c082864fc0c39a HTTP/1.1" 200 -


My camera works on motion  (USB plugged on RPI2).
The URL to get video is http://IP:9000

Your solution is compatible with that ?

Thanks for your feedback, interface looks great :p

Vahid D

unread,
Mar 6, 2017, 1:21:29 PM3/6/17
to CMU-OpenFace
Hi Arnaud;

Have you got any answer to your problem? I've been able to add some kinds of streaming; But for others, it may throw an error exactly like the one you have posted.

Thanks,
Vahid

EL HADJI ABDOULAYE THIAM

unread,
Mar 15, 2019, 9:37:15 AM3/15/19
to CMU-OpenFace
Hello Joffe,
Thx for sharing your work. It's very helpful.
By i get an error by trying your.
I explain i uncommet the line 150 in SurveillanceSystem to test the examples camera. I can't the stream on the dashborad.


error1.png


error2.png

Reply all
Reply to author
Forward
0 new messages