Just throwing this out there: Would it be possible to have a script that crawls through images on Commons, detects faces in the images, and embeds the x,y position of the face(s) into the File page of the image (or into the Exif data of the image) (and makes this information available via the API)?
For a little context -- in our mobile apps, we'll be featuring images related to the article that the user is browsing; however, the way that we're cropping the images sometimes has the side effect of cropping out the face of the subject (when the face is far from the center of the image). Even though we can do face detection locally on the user's device, it can be a bit slow and a bit intensive. It would be great if this task was offloaded, and the face position was returned right along with the image itself...
-Dmitry
Dmitry Brant, 10/11/2014 04:41:
Just throwing this out there: Would it be possible to have a script that crawls through images on Commons, detects faces in the images, and embeds the x,y position of the face(s) into the File page of the image (or into the Exif data of the image)
We have https://commons.wikimedia.org/wiki/Commons:Image_annotations . If you can do this programmatically and reliably, you should make a bot and ask authorisation to run it over all images: https://commons.wikimedia.org/wiki/Commons:Bots/Requests
(and makes this information available via the API)?
You could, say, make some parser function in the CommonsMetadata extension to expose in the API the data (format) we already have. Or just make the PageImages extension alter the thumbnail it exposes, and use that one.
For a little context -- in our mobile apps, we'll be featuring images related to the article that the user is browsing;
Why? Featuring as in showing outside normal places? Related as in not included in the article?
I don't yet understand what you're up to here, but the obvious and standard way to do something like this would be fixing https://bugzilla.wikimedia.org/show_bug.cgi?id=7757 and use cropped images only when considered appropriate by the article authors.
Nemo
however, the way that we're cropping the images sometimes has the side effect of cropping out the face of the subject (when the face is far from the center of the image). Even though we can do face detection locally on the user's device, it can be a bit slow and a bit intensive. It would be great if this task was offloaded, and the face position was returned right along with the image itself...
If you're interested in seeing what we're talking about, try downloading the latest alpha build on to your Android device at http://android-builds.wmflabs.org/ and take a look. :-)
Dan
On 9 November 2014 22:50, Federico Leva (Nemo) nemowiki@gmail.com wrote:
Dmitry Brant, 10/11/2014 04:41:
Just throwing this out there: Would it be possible to have a script that crawls through images on Commons, detects faces in the images, and embeds the x,y position of the face(s) into the File page of the image (or into the Exif data of the image)
We have https://commons.wikimedia.org/wiki/Commons:Image_annotations . If you can do this programmatically and reliably, you should make a bot and ask authorisation to run it over all images: https://commons.wikimedia.org/wiki/Commons:Bots/Requests
(and makes this information available via the API)?
You could, say, make some parser function in the CommonsMetadata extension to expose in the API the data (format) we already have. Or just make the PageImages extension alter the thumbnail it exposes, and use that one.
For a little context -- in our mobile apps, we'll be featuring images related to the article that the user is browsing;
Why? Featuring as in showing outside normal places? Related as in not included in the article?
I don't yet understand what you're up to here, but the obvious and standard way to do something like this would be fixing https://bugzilla.wikimedia.org/show_bug.cgi?id=7757 and use cropped images only when considered appropriate by the article authors.
Nemo
however, the way that
we're cropping the images sometimes has the side effect of cropping out the face of the subject (when the face is far from the center of the image). Even though we can do face detection locally on the user's device, it can be a bit slow and a bit intensive. It would be great if this task was offloaded, and the face position was returned right along with the image itself...
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l
Dan Garry, 10/11/2014 20:11:
If you're interested in seeing what we're talking about, try downloading the latest alpha build on to your Android device at http://android-builds.wmflabs.org/ and take a look. :-)
Thanks but I don't have one. Any docs?
Nemo
There are tons of cards in Trello about it. That said, it may be easier for me to just show you a screenshot of the latest alpha. Here it is: http://i.imgur.com/RKZJQHD.png
Dan
On 10 November 2014 12:04, Federico Leva (Nemo) nemowiki@gmail.com wrote:
Dan Garry, 10/11/2014 20:11:
If you're interested in seeing what we're talking about, try downloading the latest alpha build on to your Android device at http://android-builds.wmflabs.org/ and take a look. :-)
Thanks but I don't have one. Any docs?
Nemo
Where's the image's caption? On Nov 10, 2014 8:25 PM, "Dan Garry" dgarry@wikimedia.org wrote:
There are tons of cards in Trello about it. That said, it may be easier for me to just show you a screenshot of the latest alpha. Here it is: http://i.imgur.com/RKZJQHD.png
Dan
On 10 November 2014 12:04, Federico Leva (Nemo) nemowiki@gmail.com wrote:
Dan Garry, 10/11/2014 20:11:
If you're interested in seeing what we're talking about, try downloading the latest alpha build on to your Android device at http://android-builds.wmflabs.org/ and take a look. :-)
Thanks but I don't have one. Any docs?
Nemo
-- Dan Garry Associate Product Manager, Mobile Apps Wikimedia Foundation
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l
Dan Garry, 10/11/2014 21:25:
There are tons of cards in Trello about it.
If only there was a search function or dependency graph... I found some (un)related cards but not much; most related URL right now seems https://trello.com/dmitrybrant/cards
That said, it may be easier for me to just show you a screenshot of the latest alpha. Here it is: http://i.imgur.com/RKZJQHD.png
Thanks! The images are being loaded only when the user has plenty of screen estate and bandwidth, I suppose?
There doesn't seem to be a need for a specific form of the thumbnail, is there? My personal idea is still that it's best to just reuse whatever the editors selected. The main issue I see is that the white letters would have been unreadable if the pelican happened to be in a slightly different position, so you need either to add a dark background or to identify an empty-ish area of the image (and its colour) with an appropriate image library.
The selection of the caption is a story of its own... I'd love to read something about it (if Trello, direct links please).
Nemo