ia: Benvenite! In mi blog io scribe in interlingua, italiano e anglese.

it: Benvenuti! Nel mio blog scrivo in interlingua, italiano e inglese.

en: Welcome! In my blog I write in Interlingua, Italian and English.

Need a fast way to tag faces in many images? Try Imaginario!

Today I've released Imaginario 0.9. The big feature coming with this new release is a face tagging flow which I believe will be the fastest and simplest you've ever used, despite it being all manual. I even sat down and spent some quality time with Blender to prepare a video to show it off:

While some people might actually think that I spent more time for making the video than for implementing the face tagging feature itself, this couldn't be farther from the truth: the face tagging branch has been being worked on for at least three months (of course, that's my spare time — so it's actually less than one hour per day) and consisted of more than 40 commits (after squashing all the fixups), whereas for the video I spent no more than a couple of hours.

I would appreciate if the curious could go and try it out, and let me know about any issues you should find: there are built packages for Linux (AppImage), macOS and Windows. I do also have an Ubuntu PPA where nightly images are built, but I'm not sure if I can recommend that one, since I've not been using it myself and have no idea whether those packages actually even start. But you are welcome to try :-)

Your feedback will help me do better, so please don't be shy!

A simple cross-compiler for the Raspberry Pi

I've recently found some use for a first-generation Raspberry Pi (Pi 1 model B) which had been lying in a drawer since many years. A few days ago I've installed the Raspbian distribution in it, and was about to install motion on it, but I stopped as soon as I noticed that apt was suggesting to bring in 1 GB worth of dependencies. Adding --no-install-recommends reduced the proposal a bit, but it was still around 700 MB -- a bit too much for my taste. I figured out that the motion package for Debian (and Raspbian) depends on MySQL, PostgreSQL, FFmpeg and what not; so, I decided that I could probably just recompile it and disable all the stuff I didn't need at configure time.

But I didn't want to install all the build dependencies and the cross-compiler in my machine; containers exist for a reason, after all. So I had a look at the crossbuilder tool that we use in UBports: this is a nice little shell program that uses an Ubuntu-based LXD image to cross-compile a package after automatically fetching all its dependencies, and installs it into an UBports device. It does some magic with adb and stuff, but I thought that the basic functionality should work with minor modifications on any Debian-based distribution.

And indeed, some hours later, I got a branch where I can use crossbuilder to build packages for the Raspberry Pi. Assuming that you have LXD properly setup, the command

crossbuilder --raspbian source motion

will cause crossbuilder to create a container and download the Debian source package for motion; at this point you can modify the source code as you see fit, and rebuild it. I only changed the debian/rules file to add a few flags such as --without-mysql, --without-ffmpeg, etc. And

crossbuilder --raspbian

is the command to run in order to perform the build. This will first download all the dependencies (according to the debian/control file), build the package, and create a tar archive containing all the generated .deb files. This archive can then be copied into the target device and unpacked there.

Now, there's a small problem in that Raspbian claims to be armhf, while in fact its floating-point processor is somehow not compliant with the armhf architecture. So, you generally cannot use an armhf package from Debian or Ubuntu on the Raspberry Pi. Given that I didn't have the time to prepare a proper Raspbian image for LXD, I used the Debian distribution as a base instead, and I chose to target the armel architecture: this might impose some penalties on the performance (at least for floating-point code), but it seems to work fine on the Raspberry Pi. Unfortunately, this means that you cannot just install the generated packages o the Pi, as dpkg will complain about the architecture mismatch (your package is armel, while the distro claims to be armhf). But unpacking the debian package with

dpkg -x motion_<...>.deb tmp

will indeed give you package that you can use.

I will eventually get back to this and make the script work better with Raspbian, but this is a quick start.