Ask Your Question
1

How to use opencv VideoCapture with django frameworks

asked 2018-04-27 13:13:38 -0600

Vineet gravatar image

I have created a script in python using opencv library which capture the faces, create the training data and then detect the faces. Everything is working well.

But now I want to integrate it in my web application, I got a python framework called django which help to create web application using python. But I am not able to integrate this face capture / detection script in this framework. Is any one here who can help me to integrate face detection in the web application using django framework or separately.

edit retag flag offensive close merge delete

Comments

right thing done, thank you ;)

berak gravatar imageberak ( 2018-04-27 13:19:07 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-04-27 13:58:27 -0600

berak gravatar image

updated 2018-04-27 14:34:10 -0600

this is not a real answer, more a collection of hints, but it' ll be quite long, so no fit for a comment.

i somehow think, you're underestimating the number of "moving parts", such an application will need, so here's some "food for thought":

  • believe it or not, you need a webserver, and hosting. whatever framework you use for routing (django, flask, bottle, plain wsgi, even) is the least relevant part of your pipeline (imho. yea, webdevs will cry out loud, but i'm not one.)
  • you probably want your users to access their local webcam (and that from a webbrowser), to take images, any camera attached to your box is useless (did you think of it ?)
  • so that will require javascript (served from your server) to access it, do a face-detection (again inside the webbrowser), and send a (cropped) image home for classification (something like this might do a good job here)
  • then, you want to process the images on your server, do face classification and such,
  • and send back results to the browser


here's some (fictional) routing layout (you'll have to implement a function to handle each of those):

/               -- (get) the main, index page
/js/js1.js
/js/js2.js      -- (get) javascript needed to access the webcam, detect & crop a face, 
                         send back img
/upload         -- (post) receive the image
/results        -- (get) the face classification result (html)
/results/img    -- (get) if you sent a thumbnail back or such
edit flag offensive delete link more

Comments

good luck ;)

berak gravatar imageberak ( 2018-04-27 14:38:46 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-04-27 13:13:38 -0600

Seen: 3,264 times

Last updated: Apr 27 '18