We made it! (aka Outreachy wrap-up report)

I can hardly believe it – the project is complete and Outreachy is nearly over! When I started, I was plagued with doubts about whether or not I could do it – I didn’t have a clue on how to do many of the things that we’d planned. But it all worked out in the end, and in fact turned out better than I expected. Perhaps it’s okay to not know how you’re going to do something, perhaps it’s a normal part of a developer’s life? That’s one of the more important lessons I’ll be taking away from this, at least.

But enough of my rambling, here’s the final summary of the Upload to Commons Android app project. The main goal of the project was to improve the image categorization functionality of the app by offering relevant category suggestions based on geolocation, and making category search more flexible. Download the latest version of the app here, or check out its source code here!

Category suggestions based on geolocation

If a picture with geolocation is uploaded, nearby category suggestions are offered based on the categories of other nearby Commons images. We query the Commons MediaWiki API for the Commons categories of pictures with geolocation within a radius of 10km of the uploaded pic’s geolocation. The categories found are also cached using the quadtree library, so that if another picture with similar geolocation is uploaded, the cached categories are displayed and the API is not queried. This is done to reduce the load on the API, as people often upload several pics with similar locations.

Example: Uploading an image of the Hamilton Gardens with geolocation:

Entering the title and description:

Category suggestions obtained:

If a picture with no geolocation is uploaded, nearby category suggestions can be offered based on the user’s current location. This is useful if someone doesn’t want to geotag their pictures, and uploads them while still in the same area. The feature is optional and only works if enabled in Settings (disabled by default for privacy).

Enabling the ‘use current location’ settings:

More flexible category search

Category search (when typing in the search field) has been made more flexible. Prior to this, category search was done solely by prefix search. E.g. if you searched for ‘latte’, you would only get categories that start with ‘latte’, which excludes many potentially relevant categories (i.e. ‘iced latte’). Prefix search is useful when you are certain of what the exact name of the category you want is, but not so useful if you are unsure. So we wanted to retain prefix search, but also provide additional suggestions for relevant categories that do not share that prefix.

We query the Commons MediaWiki API for pages of type “Category” (srnamespace=14), maximum 10 results (srlimit=10). These results are aggregated with the prefix search results and the duplicate suggestions are eliminated before they are displayed.

Example: Searching for ‘latte’ categories:

Advertisements
We made it! (aka Outreachy wrap-up report)

Outreachy Week #10 (and message to potential new interns, if any of you read this)

Got the optional task up early this week! Good thing, too, as I haven’t been feeling very well since Tuesday. 😦

So that’s pretty much all the MVPs that have been scheduled in my proposal, woohoo! 🙂 Not sure what I should be doing after this – probably do another announcement on the mailing lists, fix any further bugs that are reported, and start on the documentation and wrap-up report? We’ll see what the mentors think during our next meeting. I can’t believe the project is nearly over! It’s been a whirlwind and a half, but so very fulfilling. And I’ve learnt so, so much. Not just about coding, but about collaborating and FOSS as well. Good stuff.

Which reminds me – the application process for the next round of Outreachy and GSoC is starting soon! If any of you potential new interns are reading this – go for it! Really. Find an organization, a project/mentor, make your small contributions, and submit your application. Start as early as you can, but don’t worry too much about it, the folks in charge are very helpful and encouraging, and they most certainly do not bite. 🙂

If you are interested in applying to Wikimedia, this is an excellent place to start.

Outreachy Week #10 (and message to potential new interns, if any of you read this)

Outreachy Week #9

The bulk of the work planned for my Outreachy programme has been implemented – I can hardly believe it! Wrapped up the minimum viable product of Phase 2 at the end of last week, while fixing a stray bug from Phase 1.

I was actually asked what I’d like to do for this week, so I chose to work on the optional task in my schedule, which involves retrieving the user’s location if the uploaded image has no GPS coordinates, in order to offer suggestions for nearby categories. This would hopefully allow the feature added in Phase 1 (suggesting nearby categories based on an image’s coordinates) to be useful to more people, since it’s quite conceivable that someone might have location tagging disabled on their phone camera but might upload their pictures while still around the same area. Of course, there would be a preference to enable/disable this extra feature.

I wrongfully assumed that obtaining the user’s location would be as simple as extracting the GPS coordinates from an image, which I quickly found out was not the case. There are several ways in which it can be implemented, usually involving some form of LocationListener attached to a LocationManager. Mentor advised against using the fused location provider that required the use of Google Play services, so I’m trying out the method described at this blog and that for now. Ah, we learn new things every day…

On a side note, I’ve really enjoyed my time with Wikimedia Foundation so far, contributing to FOSS. Also, watching the number of active app installs on Google Play grow has been crazy addictive! I find myself wishing that it didn’t have to end… and maybe it doesn’t? I’ve been enquiring about further opportunities, and there appears to be a route I can pursue that might allow me to continue work on this app. We’ll see how it works out… 🙂

Outreachy Week #9