[{"id": 666, "created": "2023-08-31T08:05:37.418186", "updated": "2023-08-31T08:11:51.400350", "name": "Flickr Person Finder 3", "short_name": "flickrperson", "description": "Image pattern recognition", "long_description": "Flickr Person is a **demo application** for PyBossa that shows how you can\ncrowdsourcing an image classification problem.\n\nThis application uses the Flickr web service as the source of the data. By\nusing Flickr, we have the possibility of using its API to refine the searches,\nand looking for specific tags or descriptions that match a specific criteria,\ni.e. houses of 1920 or tsunami.\n\nIn this demo application, we use a very simple approach by polling the latest\n20 published photos in the public Flickr feed.\n\nThe feed provides the direct link to the photo. This link is used to show the\nimage to the users, and ask them the following question: **Do you see a human\nin this photo?**\n\nThe application provides three simple answers as action buttons:\n\n  * Yes\n  * No and\n  * I don't know\n\n![](http://farm7.staticflickr.com/6109/6286728068_2f3c6912b8_q.jpg)\n\nBased on the answer of the users, we will be able to classify the photos,\ndistributing the tasks (thanks to PyBossa) to different users and volunteers.\n\n__ Note If you want to learn more about how to use this application as a\ntemplate, check the:\n\n  * [source code](http://github.com/PyBossa/app-flickrperson)\n  * [ Google Spreadsheet Task Template](https://docs.google.com/spreadsheet/ccc?key=0AsNlt0WgPAHwdHFEN29mZUF0czJWMUhIejF6dWZXdkE&usp=sharing#gid=0)\n  * [the official documentation of PyBossa](http://docs.pybossa.com/) and \n  * [the step by step tutorial.](http://docs.pybossa.com/en/latest/user/tutorial.html)\n\n* * *\n\n", "featured": false, "owner_id": 2483, "category_id": 9, "info": {"tutorial": "<div class=\"row\">\n    <div class=\"col-md-12\">\n        <div id=\"modal\" class=\"modal hide fade\">\n            <div class=\"modal-header\">\n                <h3>Flickr Person Finder tutorial</h3>\n            </div>\n            <div id=\"0\" class=\"modal-body\" style=\"display:none\">\n                <p><strong>Hi!</strong> This is a <strong>demo project</strong> that shows how you can do pattern recognition on pictures or images using the PyBossa framework in Crowdcrafting.org.\n               </p> \n            </div>\n            <div id=\"1\" class=\"modal-body\" style=\"display:none\">\n                <p>The application is really simple. It loads a photo from <a href=\"http://flickr.com\">Flickr</a> and asks you this question: <strong>Do you see a human in this photo?</strong></p>\n                <img src=\"http://farm7.staticflickr.com/6109/6286728068_2f3c6912b8_q.jpg\" class=\"img-thumbnail\"/>\n                <p>You will have 3 possible answers:\n                <ul>\n                    <li>Yes,</li>\n                    <li>No, and</li>\n                    <li>I don't know</li>\n                </ul>\n                </p>\n                <p>\n                </p>\n                <p>All you have to do is to click in one of the three possible answers and you will be done. This demo project could be adapted for more complex pattern recognition problems.</p>\n            </div>\n            <div class=\"modal-footer\">\n                <a id=\"prevBtn\" href=\"#\" onclick=\"showStep('prev')\" class=\"btn\">Previous</a>\n                <a id=\"nextBtn\" href=\"#\" onclick=\"showStep('next')\" class=\"btn btn-success\">Next</a>\n                <a id=\"startContrib\" href=\"../flickrperson/newtask\" class=\"btn btn-primary\" style=\"display:none\"><i class=\"fa fa-thumbs-o-up\"></i> Try the demo!</a>\n            </div>\n        </div>\n    </div>\n</div>\n<script>\n    var step = -1;\n    function showStep(action) {\n        $(\"#\" + step).hide();\n        if (action == 'next') {\n            step = step + 1;\n        }\n        if (action == 'prev') {\n            step = step - 1;\n        }\n        if (step == 0) {\n            $(\"#prevBtn\").hide();\n        }\n        else {\n            $(\"#prevBtn\").show();\n        }\n\n        if (step == 1 ) {\n            $(\"#nextBtn\").hide();\n            $(\"#startContrib\").show();\n        }\n        $(\"#\" + step).show();\n    }\n\n    showStep('next');\n    $(\"#modal\").modal('show');\n</script>\n", "task_presenter": "<div class=\"row\">\r\n    <!-- Success and Error Messages for the user --> \r\n    <div class=\"col-md-6 col-md-offset-2\" style=\"height:50px\">\r\n        <div id=\"success\" class=\"alert alert-success\" style=\"display:none;\">\r\n            <a class=\"close\">\u00d7</a>\r\n            <strong id=\"i18n_welldone\">Well done!</strong> <span id=\"i18n_welldone_text\">Your answer has been saved</span>\r\n        </div>\r\n        <div id=\"loading\" class=\"alert alert-info\" style=\"display:none;\">\r\n            <a class=\"close\">\u00d7</a>\r\n            <span id=\"i18n_loading_next_task\">Loading next task...</span>\r\n        </div>\r\n        <div id=\"taskcompleted\" class=\"alert alert-info\" style=\"display:none;\">\r\n            <strong id=\"i18n_task_completed\">The task has been completed!</strong> <span id=\"i18n_thanks\">Thanks a lot!</span>\r\n        </div>\r\n        <div id=\"finish\" class=\"alert alert-success\" style=\"display:none;\">\r\n            <strong id=\"i18n_congratulations\">Congratulations!</strong> <span id=\"i18n_congratulations_text\">You have participated in all available tasks!</span>\r\n            <br/>\r\n            <div class=\"alert-actions\">\r\n                <a class=\"btn small\" href=\"/\">Go back</a>\r\n                <a class=\"btn small\" href=\"/app\">or, Check other projects</a>\r\n            </div>\r\n        </div>\r\n        <div id=\"error\" class=\"alert alert-danger\" style=\"display:none;\">\r\n            <a class=\"close\">\u00d7</a>\r\n            <strong>Error!</strong> Something went wrong, please contact the site administrators\r\n        </div>\r\n    </div> <!-- End Success and Error Messages for the user -->\r\n</div> <!-- End of Row -->\r\n\r\n<!--\r\n    Task DOM for loading the Flickr Images\r\n    It uses the class=\"skeleton\" to identify the elements that belong to the\r\n    task.\r\n-->\r\n<div class=\"row skeleton\"> <!-- Start Skeleton Row-->\r\n    <div class=\"col-md-6 \"><!-- Start of Question and Submission DIV (column) -->\r\n        <h1 id=\"question\"><span id=\"i18n_question\">Do you see a human face in this photo?</span></h1> <!-- The question will be loaded here -->\r\n        <div id=\"answer\"> <!-- Start DIV for the submission buttons -->\r\n            <!-- If the user clicks this button, the saved answer will be value=\"yes\"-->\r\n            <button class=\"btn btn-success btn-answer\" value='Yes'><i class=\"fa fa-thumbs-o-up\"></i> <span id=\"i18n_yes\">Yes</span></button>\r\n            <!-- If the user clicks this button, the saved answer will be value=\"no\"-->\r\n            <button class=\"btn btn-danger btn-answer\" value='No'><i class=\"fa fa-thumbs-o-down\"></i> No</button>\r\n            <!-- If the user clicks this button, the saved answer will be value=\"NoPhoto\"-->\r\n            <button class=\"btn btn-answer\" value='NoPhoto'><i class=\"fa fa-exclamation\"></i> <span id=\"i18n_no_photo\">No photo</span></button>\r\n            <!-- If the user clicks this button, the saved answer will be value=\"NotKnown\"-->\r\n            <button class=\"btn btn-answer\" value='NotKnown'><i class=\"fa fa-question-circle\"></i> <span id=\"i18n_i_dont_know\">I don't know</span></button>\r\n        </div><!-- End of DIV for the submission buttons -->\r\n        <!-- Feedback items for the user -->\r\n        <p><span id=\"i18n_working_task\">You are working now on task:</span> <span id=\"task-id\" class=\"label label-warning\">#</span></p>\r\n        <p><span id=\"i18n_tasks_completed\">You have completed:</span> <span id=\"done\" class=\"label label-info\"></span> <span id=\"i18n_tasks_from\">tasks from</span>\r\n        <!-- Progress bar for the user -->\r\n        <span id=\"total\" class=\"label label-info\"></span></p>\r\n        <div class=\"progress progress-striped\">\r\n            <div id=\"progress\" rel=\"tooltip\" title=\"#\" class=\"progress-bar\" style=\"width: 0%;\"  role=\"progressbar\"></div>\r\n        </div>\r\n        <!-- \r\n            This application uses Disqus to allow users to provide some feedback.\r\n            The next section includes a button that when a user clicks on it will\r\n            load the comments, if any, for the given task\r\n        -->\r\n        <div id=\"disqus_show_btn\" style=\"margin-top:5px;\">\r\n            <button class=\"btn btn-primary btn-large btn-disqus\" onclick=\"loadDisqus()\"><i class=\"fa fa-comments\"></i> <span id=\"i18n_show_comments\">Show comments</span></button>\r\n            <button class=\"btn btn-large btn-disqus\" onclick=\"loadDisqus()\" style=\"display:none\"><i class=\"fa fa-comments\"></i> <span id=\"i18n_hide_comments\">Hide comments</span></button>\r\n        </div><!-- End of Disqus Button section -->\r\n        <!-- Disqus thread for the given task -->\r\n        <div id=\"disqus_thread\" style=\"margin-top:5px;display:none\"></div>\r\n    </div><!-- End of Question and Submission DIV (column) -->\r\n    <div class=\"col-md-6\"><!-- Start of Photo DIV (column) -->\r\n        <a id=\"photo-link\" href=\"#\">\r\n            <img id=\"photo\" src=\"http://i.imgur.com/GeHxzb7.png\" style=\"max-width=100%\">\r\n        </a>\r\n    </div><!-- End of Photo DIV (columnt) -->\r\n</div><!-- End of Skeleton Row -->\r\n\r\n<script type=\"text/javascript\">\r\n    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */\r\n\r\n    /* * * DON'T EDIT BELOW THIS LINE * * */\r\n    function loadDisqus() {\r\n    $(\"#disqus_thread\").toggle();\r\n    $(\".btn-disqus\").toggle();\r\n    var disqus_shortname = 'pybossa'; // required: replace example with your forum shortname\r\n    //var disqus_identifier = taskId;\r\n    var disqus_developer = 1;\r\n\r\n    (function() {\r\n        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;\r\n        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';\r\n        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);\r\n    })();\r\n    }\r\n\r\n</script>\r\n<noscript>Please enable JavaScript to view the <a href=\"http://disqus.com/?ref_noscript\">comments powered by Disqus.</a></noscript>\r\n\r\n<script>\r\n// Default language\r\nvar userLocale = \"en\";\r\n// Translations\r\nvar messages = {\"en\": {\r\n                        \"i18n_welldone\": \"Well done!\",\r\n                        \"i18n_welldone_text\": \"Your answer has been saved\",\r\n                        \"i18n_loading_next_task\": \"Loading next task...\",\r\n                        \"i18n_task_completed\": \"The task has been completed!\",\r\n                        \"i18n_thanks\": \"Thanks a lot!\",\r\n                        \"i18n_congratulations\": \"Congratulations\",\r\n                        \"i18n_congratulations_text\": \"You have participated in all available tasks!\",\r\n                        \"i18n_yes\": \"Yes\",\r\n                        \"i18n_no_photo\": \"No photo\",\r\n                        \"i18n_i_dont_know\": \"I don't know\",\r\n                        \"i18n_working_task\": \"You are working now on task:\",\r\n                        \"i18n_tasks_completed\": \"You have completed:\",\r\n                        \"i18n_tasks_from\": \"tasks from\",\r\n                        \"i18n_show_comments\": \"Show comments:\",\r\n                        \"i18n_hide_comments\": \"Hide comments:\",\r\n                        \"i18n_question\": \"Do you see a human face in this photo?\",\r\n                      },\r\n                \"es\": {\r\n                        \"i18n_welldone\": \"Bien hecho!\",\r\n                        \"i18n_welldone_text\": \"Tu respuesta ha sido guardada\",\r\n                        \"i18n_loading_next_task\": \"Cargando la siguiente tarea...\",\r\n                        \"i18n_task_completed\": \"La tarea ha sido completadas!\",\r\n                        \"i18n_thanks\": \"Much\u00edsimas gracias!\",\r\n                        \"i18n_congratulations\": \"Enhorabuena\",\r\n                        \"i18n_congratulations_text\": \"Has participado en todas las tareas disponibles!\",\r\n                        \"i18n_yes\": \"S\u00ed\",\r\n                        \"i18n_no_photo\": \"No hay foto\",\r\n                        \"i18n_i_dont_know\": \"No lo s\u00e9\",\r\n                        \"i18n_working_task\": \"Est\u00e1s trabajando en la tarea:\",\r\n                        \"i18n_tasks_completed\": \"Has completado:\",\r\n                        \"i18n_tasks_from\": \"tareas de\",\r\n                        \"i18n_show_comments\": \"Mostrar comentarios\",\r\n                        \"i18n_hide_comments\": \"Ocultar comentarios\",\r\n                        \"i18n_question\": \"\u00bfVes una cara humana en esta foto?\",\r\n                      },\r\n               };\r\n// Update userLocale with server side information\r\n $(document).ready(function(){\r\n     userLocale = document.getElementById('PYBOSSA_USER_LOCALE').textContent.trim();\r\n\r\n});\r\n\r\nfunction i18n_translate() {\r\n    var ids = Object.keys(messages[userLocale])\r\n    for (i=0; i<ids.length; i++) {\r\n        console.log(\"Translating: \" + ids[i]);\r\n        document.getElementById(ids[i]).innerHTML = messages[userLocale][ids[i]];\r\n    }\r\n}\r\n\r\n\r\nfunction loadUserProgress() {\r\n    pybossa.userProgress('flickrperson').done(function(data){\r\n        var pct = Math.round((data.done*100)/data.total);\r\n        $(\"#progress\").css(\"width\", pct.toString() +\"%\");\r\n        $(\"#progress\").attr(\"title\", pct.toString() + \"% completed!\");\r\n        $(\"#progress\").tooltip({'placement': 'left'}); \r\n        $(\"#total\").text(data.total);\r\n        $(\"#done\").text(data.done);\r\n    });\r\n}\r\n\r\npybossa.taskLoaded(function(task, deferred) {\r\n    if ( !$.isEmptyObject(task) ) {\r\n        // load image from flickr\r\n        var img = $('<img />');\r\n        img.load(function() {\r\n            // continue as soon as the image is loaded\r\n            deferred.resolve(task);\r\n        });\r\n        img.attr('src', task.info.url_b).css('height', 460);\r\n        img.addClass('img-thumbnail img-responsive');\r\n        task.info.image = img;\r\n    }\r\n    else {\r\n        deferred.resolve(task);\r\n    }\r\n});\r\n\r\npybossa.presentTask(function(task, deferred) {\r\n    if ( !$.isEmptyObject(task) ) {\r\n        loadUserProgress();\r\n        i18n_translate();\r\n        $('#photo-link').html('').append(task.info.image);\r\n        $(\"#photo-link\").attr(\"href\", task.info.link);\r\n        //$(\"#question\").html(task.info.question);\r\n        $('#task-id').html(task.id);\r\n        $('.btn-answer').off('click').on('click', function(evt) {\r\n            var answer = $(this).attr(\"value\");\r\n            if (typeof answer != 'undefined') {\r\n                //console.log(answer);\r\n                pybossa.saveTask(task.id, answer).done(function() {\r\n                    deferred.resolve();\r\n                });\r\n                $(\"#loading\").fadeIn(500);\r\n                if ($(\"#disqus_thread\").is(\":visible\")) {\r\n                    $('#disqus_thread').toggle();\r\n                    $('.btn-disqus').toggle();\r\n                }\r\n            }\r\n            else {\r\n                $(\"#error\").show();\r\n            }\r\n        });\r\n        $(\"#loading\").hide();\r\n    }\r\n    else {\r\n        $(\".skeleton\").hide();\r\n        $(\"#loading\").hide();\r\n        $(\"#finish\").fadeIn(500);\r\n    }\r\n});\r\n\r\npybossa.run('flickrperson');\r\n</script>\r\n"}, "owners_ids": [2483], "links": ["<link rel='category' title='category' href='https://crowdsourced.micropasts.org/api/category/9'/>"], "link": "<link rel='self' title='project' href='https://crowdsourced.micropasts.org/api/project/666'/>"}]