# Face recognition in ASP.net



## Flash (Apr 28, 2012)

Hi guys,

I'm trying to implement the following open source face recognition: http://www.codeproject.com/Articles/239849/Multiple-face-detection-and-recognition-in-real-ti as a ASP.net web application.
It's for a school projects. First I would like to know if it's possible to do so, and if yes, if I could come with some additional questions to help me get it implemented.


----------



## Kreij (Apr 28, 2012)

Yes, it's possible (although it may not be very easy).
Yes, you can ask all the questions you want (We just won't do the work for you).


----------



## FordGT90Concept (Apr 28, 2012)

ASP.NET?  I don't think that is something that should be done server side.  There's not only the performance concern, but privacy as well.  If I were in your shoes, I'll look at Silverlight.


----------



## Flash (Apr 29, 2012)

Kreij said:


> Yes, it's possible (although it may not be very easy).
> Yes, you can ask all the questions you want (We just won't do the work for you).



Using that open source, what aspect would make it difficult? I'd like to mention I am at a beginner stage in .net and ASP.net, and standard knowledge in creating "basic" programs (a calculator, etc), basically what you would expect in 2 years in computer science.

Right now I am looking into "translating" the windows form application into a web application. Should I expect it to work very similar to the windows application? 

The application stores the "trained" faces together with a .txt file which matches the name. I'm thinking I could have a box where the user would put his "name" and if that name is associated with the picture, it would grant access?



FordGT90Concept said:


> ASP.NET?  I don't think that is something that should be done server side.  There's not only the performance concern, but privacy as well.  If I were in your shoes, I'll look at Silverlight.



I found this website: http://startrinity.com/VideoRecognition/FaceRecognition/FaceRecognitionSourceCode.aspx
Is this something you would be suggesting? I tired running the sample program, but silverlight would crash on me


----------



## Aquinus (Apr 29, 2012)

Don't make it a web application. That really is your best option, you should probably use Java since you can run it on just about any platform or implement it as an applet on a website. This said applet could have a web service that a web application could call in order to check if authentication succeeded or failed.


----------



## FordGT90Concept (Apr 29, 2012)

Flash said:


> I found this website: http://startrinity.com/VideoRecognition/FaceRecognition/FaceRecognitionSourceCode.aspx
> Is this something you would be suggesting? I tired running the sample program, but silverlight would crash on me


Yeah, but the code you found before could be ported to work as well.  Just need to change the GUI code, me thinks.

Do you have Silverlight installed?


----------



## Flash (Apr 30, 2012)

Aquinus said:


> Don't make it a web application. That really is your best option, you should probably use Java since you can run it on just about any platform or implement it as an applet on a website. This said applet could have a web service that a web application could call in order to check if authentication succeeded or failed.



My school project requirement is to implement it as an ASP.net application. I also have almost no usable knowledge in regards to java applets, or how I could use java with the open source code.



FordGT90Concept said:


> Yeah, but the code you found before could be ported to work as well.  Just need to change the GUI code, me thinks.
> 
> Do you have Silverlight installed?



I do have silverlight, but unfortunately it keeps crashing. Even their online face recognition demo is crashing the plugin. I will try re-installing silverlight and see if that helps. That's why I didn't bothered that much with that website, and tried to just translate the open source code from windows app to web app


----------



## Flash (May 2, 2012)

Hey so quick update. I tried porting the code from the windows application to web application but unfortunately I cannot have the tools required added to the web application.

Going by this tutorial: http://fewtutorials.bravesites.com/entries/emgu-cv-c/level-1---lets-make-a-camera-application, I would need a ImageBox taken from EMGU .dll, but that is not available in asp.net (unless I somehow miss it). (direct link: http://www.emgu.com/wiki/index.php/Add_ImageBox_Control)

FordGT90, I still tinkered with silverlight, unfortunately it's not realiable (crashes most often), and I also cannot open their sample code without receiving the following 2 errors:

```
D:\Dropbox\BCIT\T4.5\COMP_4904\Project\startrinity.com_face_recognition_v1.1\StarTrinity.FaceRecognition.SL.Sample\StarTrinity.FaceRecognition.SL.Sample.csproj : error  : Unable to read the project file 'StarTrinity.FaceRecognition.SL.Sample.csproj'. 
D:\Dropbox\BCIT\T4.5\COMP_4904\Project\startrinity.com_face_recognition_v1.1\StarTrinity.FaceRecognition.SL.Sample\StarTrinity.FaceRecognition.SL.Sample.csproj(104,3): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
```


----------



## FordGT90Concept (May 2, 2012)

StarTrinity.FaceRecognition.SL.Sample.csproj  is the project file and it doesn't exist.  You could create a new Silverlight project then add all the source to to and it should take care of that.

As for the second one:
http://stackoverflow.com/questions/...soft-silverlight-csharp-targets-was-not-found

Apparently you need Silverlight 4 Tools for Visual Studio 2010 installed.


----------



## Flash (May 2, 2012)

I installed the Silverlight 4 and now I can open the sample code without a problem. However, this looks way over my head, and I do not think I can actually implement it since i don't actually understand the implementation (and there is no tutorial).

Right now I am trying to use activex to open the windows form from the asp.net webpage. I'm still reading over google to see if I can figure out how I can implement that


----------



## FordGT90Concept (May 2, 2012)

Silverlight applets are implemented the same as Flash would be.  ASPX basically opens them as an HTML object.


----------



## Aquinus (May 3, 2012)

You said this is for a class, do you have any instructions for the project that the teacher/instructor/professor has given you? My concern is that using silverlight might be outside the scope of the project requirements.


----------

