Iniciar sesión

Redondela en Foto

Another great Google Summer of Code

::

That's all folks! Another GSoC is reaching it's end. This was my 3rd Summer of Code, and following the same idea of the first one: Provide face detection features to GNOME.

I've started my first year implementing a new tool for Shotwell that would allow the users to tag people faces in photos. The concept is very simple, and it is widely used in very well known social networks. I've implemented it in Shotwell and it works pretty well, but it was considered incomplete and so it isn't included in any stable release —even with the inclusion of face detection during my second GSoC. There are some instructions I wrote that may still work to compile Shotwell with Faces Tool.

Well, my first idea to this GSoC was to complete Shotwell's Faces Tool by adding face recognition and fixing bugs, but Yorba didn't get into this GSoC, so it has not been possible. And I've received that bad news really close to the student proposals deadline, with my proposal sent and all. But I've received an e-mail from GNOME people encouraging me to try to develop the same idea into another GNOME program, and so I've contacted Stephen Shaw, F-Spot's maintainer and my mentor in this GSoC. We spoke about the project and he showed interest, so I applied for both GNOME and Mono with the same idea: Implement Faces Tool in F-Spot, with face detection using OpenCV.

Most of the project was about porting Shotwell's Faces Tool, written in Vala, to F-Spot, which is written in C# —a language I've learned just a week before starting with F-Spot. The most challenging aspect of this project was getting enough knowledge about the F-Spot internals and way of doing things —i.e. it's architecture and design— to be able to adapt the mentioned port to be able to do things in F-Spot —I mean event handling, drawing, persistency, etc.

Now you can see F-Spot with Faces tool, and you have face detection using OpenCV —very improvable, by the way. There are still bugs and leak of functionality —e.g. you can't search all images of the same person—, but I think that is a good start. Having to work and study will have a negative impact on my ability to keep contributing, but well, I'll try.

With no more delay, here you have a screencast of F-Spot with Faces Tool:

Current status of F-Spot's Faces Tool

You can get the code at https://github.com/mono-soc-2013/f-spot/tree/faces-tool.

I really want to thank Google, Mono, Stephen Shaw and GNOME for allowing me and helping me with this :)

And Google, really: thanks.

For most of us —speaking only in my name, of course, but I'm sure I'm not alone—, this is the best way —and maybe the only— of learn, improve our curriculum vitae and contribute to Open Source at the same time and in a real-world environment.

Tags: Google Summer of Code, F-Spot, face detection, Mono

Comentarios (0)

My 2nd GUADEC

::

Sponsored by GNOME Foundation

From July 31th to August 5th I've been at Brno, Czech Republic, attending GUADEC 2013. This was a great experience where I've met some great FOSS-related people —from developers to translators, designers, etc.

So let me summarize the trip.

GNOME banner at Faculty of Information Technologies

The conferences

The main purpose of the GUADEC, of course. I've attended lots of conferences covering a broad variety of areas including news in the GNOME stack technologies, Wayland, Clang and Webkit. If I should choose two of those conferences they would be:

  • Rich custom user interfaces with Glade and CSS: With web development as my main area of knowledge, the support for CSS in GTK+ is something really interesting to me. More over, the Glade-created presentation that Juan Pablo Ugarte made for us was awesome —real feeling of awesomeness when he told us that the presentation we were looking at was in fact an stand-alone GTK+ program created with Glade running fullscreen. Great.
  • Sandboxed applications for GNOME: Lots of things that would achieve an incredible step forward in the GNOME desktop, applying some concepts that we can already see in the mobile desktop —for example the one about having applications that acts as service providers, like when you need to upload some photo to Instagram and the phone offers you to choose your photo browser application, your camera, or another application that offers the service photo provider.

Dinner sponsored by Red Hat and Igalia

The people

Even spending most of the time between Spanish speakers, GUADEC was a multicultural experience to enjoy. I had some beers with a couple of nice Netherlander translators and Marcos Chavarría, speaking mainly about trappist beer ;)

We attended social events like the awesome dinner at Klub Flèda sponsored by Igalia and RedHat, the one at Starobrno Brewery sponsored by Mozilla, another dinner mainly with Spanish people... yes, we like to have dinner (:

Views from Líšeň Castle, Brno

The city

Brno is a beautiful city. I have not been in Czech Republic before, and although the first feeling about Brno was that it is a boring place, it took little time to change my mind about it. There are cool places there, and it is bigger than it may seem in the first place —I realized that when Marcos, Carlos Soriano and I went to Líšeň Castle, from where you can see how big the city is.

Great food while at a street concert in Brno

We even went to a concert in some nice park by chance when visiting the city center.

The Foundation

Attending GUADEC has been possible to me thanks to being sponsored by The GNOME Foundation, so I want to openly thank them. Thanks people!! I'll love to attend GUADEC again next year to listen all the GNOME-related new stuff and see again the lovely people I met.

Tags: [en], GNOME, GUADEC, Google Summer of Code, Brno

Comentarios (0)

Compiling Shotwell with Faces support in Ubuntu 12.10

::

Since my last contribution to Shotwell in September, I've been seeing some interest about compiling Shotwell with Face Recognition and some variants of that same goal.

Well, first of all, let me say that I'm really sorry about the fact that I've stopped contributing to the project in a regular basis —having to work and study makes it difficult, I'm sure most of you know the feeling.

Anyway, I've got a little free time and I've decided to try to compile Shotwell in a freshly installed Ubuntu 12.10 system with Faces tool. But, first of all, let me say that this tool is in a development status, so it is incomplete —e.g. there is no face recognition feature yet, only face detection— and could be not so stable. You can and should make a copy of your Shotwell database just in case running this version of Shotwell hurts it. You have the instructions to do so at [1].

To compile Shotwell:

  1. Install Git: $ sudo apt-get install git
  2. Install Shotwell dependencies:
    1. Available in Ubuntu 12.10: $ sudo apt-get install libgconf2-dev libgee-dev libgexiv2-dev libglib2.0-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgtk-3-dev libgudev-1.0-dev libexif-dev libgphoto2-2-dev libraw-dev librest-dev libsoup2.4-dev libxml2-dev libsqlite3-dev m4 libunique-3.0-dev libwebkitgtk-3.0-dev valac-0.18 libjson-glib-dev libopencv-dev
    2. GStreamer 1.0:
      1. Add the GStreamer developers' PPA to your system: $ sudo add-apt-repository ppa:gstreamer-developers/ppa
      2. Update your packages database: $ sudo apt-get update
      3. Install needed GStreamer packages: $ sudo apt-get install libgstreamer1.0-dev gir1.2-gstreamer-1.0 libgstreamer1.0-0 libgstreamer-plugins-base1.0-dev
  3. Clone Shotwell repository —this will create a «shotwell» folder in your current working directory: $ git clone git://yorba.org/shotwell/ ./shotwell
  4. Go to that folder: $ cd ./shotwell
  5. Switch to «faces» branch: $ git checkout faces
  6. Configure enabling faces tool: $ ./configure --enable-faces
  7. Make: $ make
  8. And now you can run it:
    • To use a new, separate database: $ ./shotwell -d ./shotwell-data
    • To use your installed Shotwell's database —not recommended if you doesn't want to install the Git non-stable version: $ ./shotwell
  9. And install it into your system —optional, not recommended since it's a development version: $ sudo make install

[1] http://redmine.yorba.org/ projects/shotwell/wiki/ ShotwellFAQ#How-can-I-back-up- my-Shotwell-library

Tags: [en], Google Summer of Code, Shotwell, Planet GNOME

Comentarios (0)

Shotwell Faces Tool: Informe Semanal 12 y 13 (Informe final)

::

Hola a todos!

Este Google Summer of Code ha sido increíble. No solo por trabajar en Shotwell, si no por trabajar en Shotwell de nuevo, aprender sobre OpenCV, programar en C++ y Vala, mejorar mi nivel de inglés, y por supuesto conocer gente de GNOME —y, más aún, de Yorba— y ver cierta expectación de la comunidad acerca de mi trabajo.

Estas últimas dos semanas he estado trabajando en la integración de la detección facial y ya lo tengo realmente funcionando —pero, y me disculpo de nuevo por ello, aún tendréis que esperar un poco más para poder verlo en vuestras propias máquinas. Y esto es porque aún sigo trabajando en reincorporar la herramienta Caras al repositorio principal de Shotwell corrigiendo errores que hacen que mi código no cumpla con los altos niveles de calidad de Yorba —nada de lo que quejarse, al contrario, es lo que hace que uno crezca como desarrollador, y los motivantes well done que mi mentor a veces escribe son algo impagable.

Y ya que aún no he terminado mi trabajo —como el año pasado, estoy empezando a pensar que siempre trato de hacer más de lo que puedo—, e incluso considerando que es algo que no contará para Google, seguiré colaborando con Shotwell más o menos tres semanas —me encantaría contribuir más, y podría darse el caso, pero no puedo prometerlo ya que debo trabajar y estudiar.

Para terminar, dejadme recordaros que existe una página del proyecto [1] donde podéis encontrar mi propuesta original con su fallida planificación, así como enlaces a todos mis informes y a los repositorios relevantes en GitHub.

Gracias a Google, GNOME y Yorba por permitirme hacer esto de nuevo (:

[1] http://redmine.yorba.org/projects/shotwell/wiki/FacesTool

NOTA: Esto es una traducción del original en inglés, aquí → http://sanva.net/blog/116/

Tags: Google Summer of Code, Shotwell

Comentarios (3)

Shotwell Faces Tool: Weekly Report 12 & 13 (Final GSoC report)

::

[ NOTE: Spanish translation in http://sanva.net/blog/117/ ]

Hi all!

This Google Summer of Code has been incredible. Not only for the coding in Shotwell, but also for being coding in Shotwell again, learning OpenCV stuff, coding in C++ and Vala, improving my English level, and of course meeting GNOME —and even more, Yorba— people and seeing some community expectation about my work.

These last two weeks I've been working in face detection integration and now I have it actually working —but, and sorry again for that, you have to wait a little while more to see it in your own machine. And that is because I'm still working to reincorporate Faces Tool to Shotwell main repository by fixing bugs that are dissatisfying Yorba high quality standards —nothing to complain about, on the contrary, it is something that makes someone to grow up as a developer, and the motivational well done that my mentor sometimes writes is something invaluable.

And since I haven't finished my work —like last year, I'm starting thinking that I always try to do more that I can—, and even considering the fact that it won't count to Google, I'm going to keep contributing to Shotwell by more or less three weeks —I wish to contribute more, and it may be, but I can't promise that due to having to work and study.

To finish, let me remind you that there is a project page [1] where you can find my original proposal with its failed schedule, links to all my reports, and to my GitHub relevant repositories.

Thanks to Google, GNOME and Yorba to let me doing this again (:

[1] http://redmine.yorba.org/projects/shotwell/wiki/FacesTool

Tags: [en], Planet GNOME, Google Summer of Code, Shotwell

Comentarios (0)

Shotwell Faces Tool: Informe Semanal 09, 10 y 11

::

Estas últimas tres semanas han sido memorables, y por supuesto es por haber ido a la GUADEC [1] —sí, nada nuevo bajo el sol, todo el mundo que ha ido está diciendo lo mismo.

La GUADEC ha sido realmente una buena experiencia, y no solo por las charlas sino también por la gente que hemos[a] conocido —Y realmente hemos sociabilizado menos que otros, por estar en casa[b] y por mi timidez hablando inglés. Pero desde luego esto no lo escribo en plan triste, hemos conocido a gente muy agradable —quizá la mejor parte haya sido conocer a mi mentor, Lucas Beeler [2], in the main hacking space in the lobby[*] de la facultad para hablar acerca de los hitos de las semanas siguientes para hacer de este proyecto una realidad, y acabar hablando de San Francisco, las universidades de Estados Unidos, etc.

También he participado en las charlas relámpago con los demás participantes del GNOME outreach program hablando de mi proyecto, la cual ha sido una muy buena forma de hacer mi primera charla en público[c] —vale, solo 2-3 minutos, pero it's something. Gracias de nuevo[d] a Marina Zhurakhinskaya por convencerme. Además, después de la charla, un par de tíos de Igalia [3] se me acercaron para darme algo de información sobre una posible tercera parte de mi proyecto que mencioné al final de la misma —una gente muy agradable, gracias por compartir (:

Y bueno, volviendo al tema principal de estos informes: También he estado trabajando en la siguiente fase del proyecto, corregir varios errores que ya habían sido notificados el año pasado. En las semanas siguientes empezaré la integración de los programas de detección y reconocimiento facial en Shotwell —la parte más complicada pero también la parte verdaderamente tangible de todo el proyecto.

[a] Utilizo la primera persona del plural porque he ido a la GUADEC acompañado de mi verdaderamente motivado amigo Santi.

[b] Este año la GUADEC se ha celebrado en la facultad de informática de A Coruña, donde he estado estudiando durante tres años antes de cambiarme a Santiago de Compostela.

[*] La expresión es la que utilizó originalmente Lucas para referirse al sitio donde quedamos, y a Santi y a mí nos pareció muy graciosa por lo de main hacking space xDDD

[c] Nunca había hecho nada parecido ni siquiera en español —estoy esperando a que salga el vídeo para ver si realmente lo he hecho de una forma más o menos decente xDDD

[d] La conocí brevemente en persona (:

[1] http://guadec.org/

[2] http://yorba.org/about.html

[3] http://www.igalia.com/

NOTA: Esto es una traducción del original en inglés, aquí → http://sanva.net/blog/114/

Tags: Google Summer of Code, Shotwell, GUADEC

Comentarios (0)

Shotwell Faces Tool: Weekly Report 09, 10 & 11

::

[ NOTE: Spanish translation in http://sanva.net/blog/115/ ]

This last three weeks have been memorable, of course because having gone to GUADEC [1] —yes, nothing surprising at this time, everyone who have been at GUADEC are saying the same ;)

GUADEC has been a really good experience, not only for the talks but also for the interesting people we[a] have met —and we have actually met less people than others, and that's because staying at home[b] and being not really confidence about my spoken English. But I'm not writing this in a sad tone, of course, we've met nice people —maybe the best part was meeting my mentor, Lucas Beeler [2], in the main hacking space in the lobby of the faculty to talk about next weeks milestones to became this GSoC project a success, and ending talking about San Francisto, USA universities, etc.

I've also participated in the lightning talks with the other GNOME outreach program students talking about my project, and that was a really good way of having my first talk[c] —OK, only 2-3 minutes, but it's something. Thanks again[d] to Marina Zhurakhinskaya for convincing me. Also, after the talk, a couple of Igalia [3] guys have come to me to give me some tips about a potential third part of my project that I had mentioned in that talk —really nice guys, thanks for sharing (:

And well, going back to this series of reports main subject: I also have been working in the next stage of the project, fixing some bugs that had been reported last year. In the next weeks I'm going to start the integration of face detection and recognition programs into Shotwell —the harder stages but actually the tangible goal of the whole project.

[a] The we instead of I is because I went to GUADEC with my really motivated friend Santi.

[b] This year's GUADEC has been in the faculty of computer science at A Coruña, where I've been studying three years before moving to Santiago de Compostela.

[c] I haven't done anything similar even in Spanish —I'm waiting for the video to really see if I did it in a decent way ;)

[d] I've briefly met her in person (:

[1] http://guadec.org/

[2] http://yorba.org/about.html

[3] http://www.igalia.com/

Tags: [en], Planet GNOME, Google Summer of Code, Shotwell, GUADEC

Comentarios (0)

Shotwell Faces Tool: Informe Semanal 07 y 08

::

Estas últimas dos semanas he continuado el trabajo en la suite de pruebas, añadiendo reconocimiento facial utilizando para ello la clase FaceRecognizer de Philipp Wagner y unos scripts para ayudar en el proceso de testing. También he escrito las instrucciones para utilizar estos pequeños programas en [1] —pueden estar incompletas, pregunta lo que necesites ;)

Esto del reconocimiento facial parece que se trata sobretodo de recolectar caras para hacer una base de datos decente y realista con la que entrenar el modelo y luego tratar de reconocer a esa misma gente en otras fotos. Realmente hay muy poco código que enseñar: Desde que he descubierto, leído y entendido la nueva clase FaceRecognizer de OpenCV, el código escrito es realmente muy simple [2] —de hecho, mi tarea principal estas últimas dos semanas ha sido la de hacer pruebas, tratando de crear una base de datos decente con las caras de mis amigos para mejorar los resultados que estoy obteniendo en dichas pruebas: Sobre un 30% de precisión reconociendo gente —en algunos artículos que he leído se habla de una mayor precisión, pero tal precisión no parece ser muy real, ya que ellos están utilizando bases de datos de caras como la que puedes encontrar en [3], y no podemos esperar que los usuarios de Shotwell hagan ese tipo de fotos.

Así que dichas pruebas son reales. Quiero decir con esto que no hubo una preselección de las fotos que he utilizado. Simplemente he elegido 4 eventos —el mismo concepto que en Shotwell, i.e. fotos de la misma fecha—, y entrené un modelo con las caras autodetectadas —descartando algunas realmente malas, pero manteniendo algunas de una calidad digamos media las cuales se veía que empeorarían el modelo. Lo hice de esta forma porque creo que un usuario normal de Shotwell etiquetaría caras de estas características.

Luego he elegido otros eventos, he recolectado las caras presentes en cada uno de ellos utilizando facedetect, y he descartado los falsos positivos y la gente que no estaba presente en las muestras con las que entrené el modelo. Con esta aproximación estoy obteniendo más o menos un 30% de precisión en reconocimiento facial —pero es posible aumentar esta marca a algo así como un 50-70% descartando las caras de las personas con menos de 40 muestras en la base de datos con la que se entrenó el modelo. Así que podríamos esperar unos mejores resultados simplemente incrementando el tamaño de la base de datos de pruebas —pero he tratado de hacerlo de una forma que emulase un uso normal del programa...

Pero de todas formas creo que esto no debería ser muy molesto para los usuarios de Shotwell... Incluso teniendo una tasa de errores de un 70%, podemos tratar de minimizar la molestia de dichos errores. Dejadme que me explique: Al presionar Detectar Caras podríamos esperar que el programa trate de reconocer a las personas en la foto y pregunte algo del tipo ¿Es este Valentín Barros?... Si la persona de la foto no soy yo, tenemos un error, y el usuario debería presionar No, y luego escribir el nombre correcto —pero podríamos hacerlo de otra forma: No preguntaríamos al usuario si la cara pertenece a este o el otro, simplemente escribiríamos el nombre de la persona reconocida en el campo de texto al efecto, pero totalmente seleccionado. Si es un error, el usuario simplemente deberá escribir el nombre correcto, como si no hubiese reconocimiento facial de ningún tipo —y ya que el texto está completamente seleccionado el usuario ni siquiera tiene que presionar el botón de borrar. Y si el programa ha acertado, el usuario simplemente presionaría la tecla Intro o el botón Aceptar y el foco pasaría a la siguiente cara detectada —y, si ni siquiera es una cara, el usuario podría presionar Esc o Cancelar para descartarla.

¿Que os parece?

Por cierto, estaré en la GUADEC ;)

I am attending GUADEC at A Coruña, Spain

[a] Mi código es el que es realmente simple, pero es porque todo el trabajo duro al respecto lo ha hecho otra gente y ha sido incluido en OpenCV ;)

[1] https://github.com/Sanva/facedetect#simple-face-detection--recognition-test-suite-using-opencv

[2] http://docs.opencv.org/trunk/modules/contrib/doc/facerec/index.html

[3] http://www.cl.cam.ac.uk/research/dtg/attarchive/pub/data/att_faces.zip

NOTA: Esto es una traducción del original en inglés, aquí → http://sanva.net/blog/112/

Tags: Google Summer of Code, Shotwell

Comentarios (0)

Shotwell Faces Tool: Weekly Report 07 & 08

::

[ NOTE: Spanish translation in http://sanva.net/blog/113/ ]

This last two weeks I've continued the work on the test suite, adding face recognition using Philipp Wagner's FaceRecognizer class and some scripts to help doing the testing. I've also wrote the instructions to use all those tiny programs at [1] —it could be incomplete, please ask whatever you need ;)

This face recognition thing seems to be more about collect people faces to make a decent and realistic database to train the face recognition model and then try to recognize this same people in other photos. There is really few code to show: Since I discover, read and understand the new OpenCV FaceRecognizer class [2], the written code is really simple [a] —in fact, the main task of this last two weeks has been mainly to do tests, trying to make a decent faces-database of my friends to improve the results I'm getting from my tests: About 30% of accuracy recognizing people —in the articles I've read there are people talking about more accuracy, but such accuracy seems to be not so real, because they use face-databases like the one at [3], and we can't expect Shotwell users making that kind of photos.

So, those are real tests: I mean, there was no preselection of which photos I used. I've simply chosen 4 events —the same concept as in Shotwell, i.e. photos from the same date—, and I trained a model with the detected faces —discarding some really bad face-photos, but keeping some medium ones that I knew they would make a less good model. I've done it this way because I think that a normal Shotwell user would tag faces of this characteristics.

Then, I've chosen some other events, I've taken the face-photos from each of them using facedetect, and discard false positives and the people who aren't in the trained model. With this approach I'm getting about 30% of accuracy in face recognition —but I could increase it to about 50-70% if I discard all the face-photos from people with less than 40 face-samples in the training face-photos database. So, the point is that only increasing the size of the training face-photos database we could expect better results —but I tried to do it in a way that emulates a normal use of the program...

But I think that this could be not so annoying to Shotwell users... Even having 70% of errors, we can minimize the annoyance of having such error. Let me explain: When pressing detect faces, we can expect that the program will try to recognize the person in the photo and ask you Is this Valentín Barros?... If the person isn't me, that's an error, and the user has to press No, and then write the correct name —but we can make it differently: We wouldn't ask the user if the face belongs to someone, we can simply write his/her name in the text input, where the user would write it, but all selected. If it is an error, the user can simply write the correct name —since all text is selected he doesn't even need to select it and press backspace. If it is correct, the user press Enter key or OK button and the focus goes to the next autodetected face —and, if it isn't a face, the user can press Esc/Cancel to discard it.

What do you think about this?

By the way, I'll be attending GUADEC ;)

I am attending GUADEC at A Coruña, Spain

[a] My written code is really simple, but that's because all the hard work has been done by other people and collected in OpenCV ;)

[1] https://github.com/Sanva/facedetect#simple-face-detection--recognition-test-suite-using-opencv

[2] http://docs.opencv.org/trunk/modules/contrib/doc/facerec/index.html

[3] http://www.cl.cam.ac.uk/research/dtg/attarchive/pub/data/att_faces.zip

Tags: [en], Planet GNOME, Google Summer of Code, Shotwell

Comentarios (0)

Shotwell Faces Tool: Informe Semanal 05 y 06

::

Estas últimas dos semanas he estado trabajando en mejorar el conjunto de programas para probar la detección facial que puedes encontrar en [1].

He añadido un nuevo programa [2] escrito en Vala y llamado facedetect-test en la carpeta /test/. Con este programa puedes realizar una prueba de detección facial utilizando múltiples archivos de cascada con múltiples valores de escala, y el programa escribirá las imágenes procesadas que ha encontrado en /test/sources/ con las caras detectadas marcadas con rectángulos rojos. La utilidad de esta herramienta es la de tener una forma fácil de ver qué nivel de precisión podemos esperarnos al utilizar esta funcionalidad en Shotwell.

También estoy leyendo sobre reconocimiento facial, la siguiente fase de este proyecto, y probablemente la más difícil —y necesito seguir mejorando estos programas de prueba para ver realmente los resultados, ya que sería una pena integrar esto en Shotwell y luego encontrarnos con que es inútil. Pero en fin, la parte buena es que estoy mejorando mis habilidades utilizando OpenCV desde su nueva interfaz en C++ y eso luego me permitirá realizar una mejor integración en Shotwell —si todo va bien.

Ahora mismo estoy jugando con la nueva clase FaceRecognizer [3] de OpenCV para intentar implementar la funcionalidad de reconocimiento facial en estos programas de prueba, un objetivo que, si lo consigo, haría que el reconocimiento facial en Shotwell sea una posibilidad real.

[1] https://github.com/Sanva/facedetect

[2] https://github.com/Sanva/facedetect#test-program

[3] http://docs.opencv.org/trunk/modules/contrib/doc/facerec/facerec_api.html#FaceRecognizer

NOTA: Esto es una traducción del original en inglés, aquí → http://sanva.net/blog/110/

Tags: Google Summer of Code, Shotwell

Comentarios (0)

Redondela en Foto 8.6.9 - XHTML 1.0 Strict - CSS - Política de Privacidad