GSoC 2019 — Web App and Second Evaluations

Artem Fedoskin
Jul 25 · 5 min read

So, it is already time for Second Evaluations! July was a pretty harsh month for me as I had 3 exams and I had to go back to my home country (Kazakhstan) from Germany where I study Data Analytics (this post was partially written in a train, airport and a bus 😛). During the period since my last post, I have been focusing primarily on Web App and REST API, about which I will talk in this post. But first…

Face Expression Recognition

Face Expression Recognition in action!

This is the last type of models that I listed in my proposal (but not the last for this project, as I am going to add object segmentation, facial characteristics models and many more). Unfortunately, there has been not much progress in this field and thus I used a 2–3 years old model. Still, this model is enough for an initial try.

This model is based on PyTorch and it is capable of recognizing 7 basic emotions such as ‘Angry’, ‘Disgust’, ‘Fear’, ‘Happy’, ‘Sad’, ‘Surprise’ and ‘Neutral’. As you can see in the pic above, it works pretty well for a wide range of basic cases.

Continuing to work on Web App

Web development is like LEGO — brick after brick you are building your website, being able to see the results of your decisions almost instantly. When I was a kid I was limited by the amount of different LEGO bricks and parts I had, whereas with web development time and knowledge are the biggest constraints for me 😀. Creating a Web App is a very immersive process and I already have new features ideas rolling around in my head.

New Task Manager Interface

First of all, Web App was moved to a separate repository for better components decoupling and now you can see that PMR’s repository is 100% Python 😀.

New Task Manager interface (full resolution

The Task Manager that is also the main page was updated — now to submit a new task you will need to click on a red “Add Task” button, which in turn opens a modal window with a possibility to submit a task of one of the 3 task types — Video, Images and YouTube video.

New AJAX-based File Uploader

File Uploader is based on AJAX meaning that you will be able to send your file asynchronously and see uploading progress. Once your file is uploaded, you will need to click “Submit Task” button to start processing it. In my 3rd stage of GSoC I am going to add “Pipeline Constructor” to allow choosing a specific pipeline for a task.

User Panel

User Panel interface (full resolution

User Panel is a new feature and currently, it is used only for displaying how many files did the user uploaded and also for generating the API token.

Generate Token modal window

I will talk more about API token in the next section but for now, just remember that User Panel is your first step towards PMR’s REST API.


As this is the first time I am designing API, I was reading and thinking a lot about how to design a secure and efficient REST API that would mimic all the functions of Web App. Keep in mind that even if the current API already allows a user to do tasks like submitting files and getting processing results, it will be heavily upgraded in the coming month.

API Token

In order to perform authentication with REST API you need to obtain an “Access Token” that must be included in every POST request to API. You can get it in User Panel by clicking “Get API Token” button. The token will be generated for you for the first time, but you can regenerate it anytime by clicking “Generate Token” button. Once you obtained your token, you can test it by sending POST request to http://pmr.example/api

Example Request

Uploading Files using API

Your first step for adding a new task with API is to upload your file. This can be done using POST request to http://pmr.example/api/uploadfile with Access Token and URL to your file. For now, PMR’s API only supports downloading files but in the next stage, I am going to add resumable file uploads using

File upload request

Handling Tasks with REST API

Don’t forget to write down “file_id” as you will need it for this step! To submit a new task just send a POST request to http://pmr.example/api/addtask with file_id and you will get id of a new task.

Request to add a new task

By sending “task_id” to http://pmr.example/api/task you can get the current status of your task. Once the processing is finished, json_data will be filled with all the data from a pipeline (e.g. recognized persons, names, facial expressions, etc.)

Task description

Second Evaluations and Future Work

With that, I conclude the second stage of GSoC 2019. During this stage, I have added two new models, updated and created main functions of Web App, implemented the basic REST API and most importantly improved Face Recognition results. I still have to start working on Native Bindings and finish building a huge celebrities dataset and all this will be done in the next stage.

Moreover, in the next stage, I will add various data visualizations tools (timeline of a person, video statistics, relations between persons, etc.) and custom pipeline builder. If time permits, I will also add several new types of models.

Thank You!

As usual, thank you for reading yet another post and stay tuned for future updates!

Originally published at on July 25, 2019.

Artem Fedoskin

Written by

GSoC 2016 Finalist, GSoC 2019 On-going Student. Blog about Deep Learning, Programming and Life

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade