Łukasz Piłatowski

IT passionate with a head full of ideas

Posted by : at

Category : janitor

This time nothing crashed - I just did this work very partially and didn’t have a clear 1-2 hour window to start recording.

First, I finished the database connection and saving using SQLAlchemy.

For now, data model looks like this:

  • There is a User model with ID and name
  • There is a face_encoding model with user_id FK and encoding array

This caused a minor problems with creating JOIN statement in SQLAlchemy (it’s API is terrible…) but all in all it’s working nor.

Our app has also been provided with LEARNING_MODE flag, so that not every run is saved to database.


Now, the most astonishing thing I did recently - Setting up WebRTC!

This experimental feature allows one to stream video, audio and data both ways between client and server - and all this in parallel!

Big thanks to aiortc library and this example that made it possible to set the PoC in my browser.

Of course, it required me to both experiment with a dockerfile (I created new one and needed to add additional codecs packages)

Also, I needed to enable following chrome flags:

  • chrome://flags/#enable-experimental-web-platform-features
  • chrome://flags/#unsafely-treat-insecure-origin-as-secure (added here http:\\localhost:8080)

After manually allowing video and audio for the site, everything started to work perfectly!

This will allow, after I will understand the code and alter it, to apply first janitor integration:

App authorization using face encoding and liveness detection!

Newsletter