Coder Social home page Coder Social logo

scifabric / app-flickrperson Goto Github PK

View Code? Open in Web Editor NEW
13.0 11.0 39.0 460 KB

PyBossa FlickrPerson Example App

License: GNU Affero General Public License v3.0

Python 7.08% JavaScript 17.94% HTML 74.98%
pybossa-pbs pybossa-server flickr image

app-flickrperson's Introduction

Image Pattern Recognition Demo project for PyBossa

The aim of this demo project is to show how you can solve an image pattern recognition problem using PyBossa technology.

This demo uses Flickr as the backend for storing the photos, but you can use any other web server or service that gives you public access to the photos.

The project has five main files:

  • project.json: a JSON file that describes the project.
  • long_description.md: a Markdown file with a long description of the project.
  • get_images.py: to query Flickr and write a file with the photo links.
  • template.html: the task presenter where the user/volunteer will do the image pattern recognition.
  • tutorial.html: a simple tutorial that explains how to do the image pattern recognition.

alt screenshot

Testing the project

You need to install the pybossa-pbs. If you don't have a virtual environment, we recommend you to create one, and activate it:

    $ virtualenv env
    $ source env/bin/activate

Then, you can install pybossa-pbs:

    $ pip install pybossa-pbs

Or if you prefer:

    $ pip install -r requirements.txt

NOTE: Use this template with a PyBossa server version >=1.0.0.

Creating an account in a PyBossa server

Now that you've all the requirements installed in your system, you need a PyBossa account:

  • Create an account in your PyBossa server (use Crowdcrafting if you want).
  • Copy your API-KEY (you can find it in your profile page).

Configure pybossa-pbs command line

PyBossa-pbs command line tool can be configured with a config file in order to avoid typing the API-KEY and the server every time you want to take an action on your project. For this reason, we recommend you to actually create the config file. For creating the file, follow the next steps:

    $ cd ~
    $ editorofyourchoice .pybossa.cfg

That will create a file. Now paste the following:

[default]
server: http://yourpybossaserver.com
apikey: yourapikey

Save the file, and you are done! From now on, pybossa-pbs will always use the default section to run your commands.

Create the project

Now that we've everything in place, creating the project is as simple as running this command:

    $ pbs create_project

Adding some tasks

Now we can add some tasks. The project comes with two samples that you can use:

  • flickr_tasks.csv: a CSV file with some tasks
  • get_images.py: a script that will contact Flickr to create a JSON file with links to images

Using a CSV file for adding tasks

This is very simple too, thanks to pbs:

    $ pbs add_tasks --tasks-file flickr_tasks.csv

You'll get a progress bar with the tasks being uploaded. Now your project has some tasks in the server to be processed by the volunteers.

Using a JSON file for adding tasks

Instead of giving you a JSON file, we wanted to show you how you can use a web service like Flickr to query it and get the images that want to do image pattern recognition. For this reason, we've created the script get_images.py.

When you run this script, it will contact Flickr, get the last 20 published photos in the web services, get its links, and write a file in JSON format named: flickr_tasks.json. We'll use this file to add some extra tasks to our project:

    $ python get_images.py
    $ pbs add_tasks --tasks-file flickr_tasks.json

Again, as before, you will see a progess bar as the tasks are being added to your project. You can modify get_images.py to adapt it for your needs ;-)

Finally, add the task presenter, tutorial and long description

Now that we've some data to process, let's add to our project the required templates to show a better description of our project, to present the tasks to our users, and a small tutorial for the volunteers:

    $ pbs update_project

Done! Now you can do image pattern recognition problems in the PyBossa server.

NOTE: we provide templates also for Bootstrap v2 in case your PyBossa server is using Bootstrap2 instead of Bootstrap3. See the rest of the files.

Documentation

We recommend that you read the section: Build with PyBossa, follow the step by step tutorial and read the PyBossa pbs documentation.

NOTE: This project uses the pybossa-pbs library in order to simplify the development of the project and its usage. Check the documentation.

LICENSE

Copyright (C) 2015 SciFabric LTD

Please, see the COPYING file.

Acknowledgments

The thumbnail has been created using a photo from Sean McGrath (license CC BY 2.0).

Note: You can see the results of the Crowdcrafting app here

app-flickrperson's People

Contributors

alejandrodob avatar jjelosua avatar mk270 avatar nigini avatar teleyinex avatar therealmarv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

app-flickrperson's Issues

There is no photo should be an answer

Problem: As a user I get a broken photo, but I do not have a button to answer that there is no photo.
Solution: Add another button with the text: "There is no photo"

Minor issue with readme file - misses setting redundancy

When following the instructions in the readme I could not get the app to work - it always had zero tasks. Investigated and got it working by setting task redundancy to be non-zero prior to updating the project. Should there be a step in the documentation for this?

BTW, this step IS on the webpage that describes how to get the app working.

Images should be bigger

Problem: As a user I want to see bigger images in my browser, so I can answer the question much easily.
Solution: Use the image_b instead of image_m for the skeleton.

Flickr person app should support keyboard accelerators

The example apps should demonstrate best practices so that these propagate to the children cloned from them. In a crowdsourcing app, efficiency is important, so it should be possible to quickly vote from the keyboard without having to navigate with the mouse.

Recommended mappings:

  • Y, Left arrow == yes
  • N, Right arrow == no
  • Space bar, down arrow == don't know
  • X, up arrow == invalid (e.g. the photo I got which was a rendered image of the Flickr message "this photo is not available")

Consider redefining "human" photos that are of interest

This is a very minor issue that mostly concerns with vague wording. The question of "Do you see a human?" may be a little too simple and lead to some confusion. For instance, do I need to see a human face in the photo in order to say "Yes" or is just seeing a part of a person's body such as a hand or leg enough? If I see a photograph that focuses on trees and the natural scenery but I see a distant person in the background, should I consider this a photo with a human? Finally, if the photograph is a picture of some form of artwork (painting, statue, etc) that is made to portray humans, should I count that too? Again, this is a small issue regarding vague wording but I figured since it was never addressed, it could generate some confusion.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.