If you’ve ever tried to control MKS SERVO42D or SERVO57D stepper motor controllers from Python, you know the pain. These controllers transform regular stepper motors into servo-like systems with closed-loop feedback, position control, and CAN communication. They’re affordable and capable, but the lack of a proper Python library meant you were stuck writing raw CAN commands or wrestling with…
I’m convinced that AI tools will soon dominate most engineering workflows, not by replacing engineers, but by becoming the tool we all need to master. Like any tool, you don’t get good at it just by reading about it. You practice! So I set myself a new challenge: How far could I go in a single day(ish), using only an LLM, to build something I actually needed? 🛠️ The result: ✅ A complete library…
This webside already has an Advanced QR code Generator , but as the name says, it only generates QR codes. The nice thing about QR codes is that anyone can read them directly from the smartphone camera app (at least modern ones). However, there are other codes that you need to install an app only for reading them. I’m not a big fan of installing “yet-another-phone-app”, so I decided to fix this…
Last week, I saw this post on LinkedIn where Carlos Argueta was showing some interesting robotics perception experiments that were running on Google Colab. I mentioned in the comments that I had, in the past, managed to run Gazebo on Google Colab. So, I decided to find that old notebook and here it’s:…
I was testing some ideas at home and I needed to create a QR code. I searched online and found a few websites, but they were full of ads and I was not sure what they were doing with my data. So, I went to my “friend” Gemini and asked it for a single webpage QR code generator. After a few iterations, I got something quite interesting! https://ricardodeazambuja.com/qrcodegenerator/ Usage example of…
After spending years using weird magic spells to launch a graphical file manager (e.g. nautilus ) from the command line without it printing a lot of rubbish, I finally learned that xdg-open just works ! Use xdg-open . and you will have your graphical file manager PLUS a clean terminal!
In the last weeks I’ve been reading a lot of papers. Usually I open an online document (e.g. google docs) and write down my notes there while I read a paper. However, I also like to highlight a pdf as I read it, but that forces me to download the pdf and keep the final file. Therefore I was trying to find a way to annotate a pdf directly from my web browser… and that’s the motivation that made me…
Today I was trying to implement, using PyTorch, the Focal Loss ( paperswithcode , original paper ) for my semantic segmentation model. Focal Loss is “just” Cross Entropy Loss with some extra sauce that allows you to adjust (γ) how much weight you give to examples that are harder to classify otherwise your optimiser will focus on the easy examples because they have more impact on the loss. To save…
Today I needed to check some connections in the PCB of my ST-Link V2 clone because I wanted to add the trace support following the nice explanations from here . However, my old brandless digital microscope (you know, they all look the same and come in a blue box…) refused to work. dmesg helped me find some repeated error messages ( Failed to query (GET_DEF) UVC control 4 on unit 1 or Failed to…
I am always using Google Colab , but in many cases I also need to install something using apt-get . The problem was that sometimes you need to add a new repository, update, install… then your notebook becomes full of text and that eats your memory (locally too as the browser needs to render that after all). So, today I found a nice post explaining the reason why the -qq argument may still leave…
Today, I decided to close my LinkedIn account. I’d been mulling over this idea for a while, trying to weigh the PROS/CONS. The final result was that I couldn’t see much value on having that account, and I also realized I should be posting things on my own website instead :smiley: I still have my twitter account ( @ricarbotics ), but I’m thinking about shutting it down as well. UPDATE (04/07/2022):…
From time to time I have a project with some electronics that need testing. This weekend I was checking how to power my Maple Syrup Pi Camera with a solar panel. However, prototypes always have a chance of generating the magic smoke , so it’s nice to be able to limit the current to avoid that fate. In addition to that, I already have a fancy soldering iron that is power by USB-C, so why not a…
I may write another post in the near future about this, but for now it will be yet another very-short-post™ :wink:. I’m working with Tiny ML (or Edge AI or simply trying to run complex stuff on not-so-great hardware ) and, currently, my focus is on Google Coral EdgeTPU . In general, I like Google , TensorFlow , etc, but a lot of the things they release are badly documented (or the documentation is…
This is yet another very-short-post™ . I really like VSCode because I think it speeds up lots of things. However, when I’m developing stuff on the Raspberry Pi, I’m often forced to keep moving files back & forth or just use vim. So, today I decided to google a little bit and I found a simple solution: sshfs Install it (Debian-based Linux): $ sudo apt-get install sshfs You don’t even need to be…
After all that story about the lawyer cat , I decided to try to make something interesting to use during webinars, virtual meetings, etc. With the help of Google Coral Edge TPU USB Accelerator, it’s possible to run deep neural models, with very high framerate, without the need of a GPU (and without all the noise coming from the colling fans). Above, I’m using segmentation to transform myself into…
My apologies. I seem to have totally ignored the existence of the Disqus comments in this blog. Yesterday, I randomly read some article showing all the tracking Disqus does on people and I didn’t like that. I was using it just because I thought it was an easy way to have comments that looked like a forum. So, until I find a new way to add comments to this blog without the risk of people being…
I’m a big fan of the Raspberry Pi Foundation and a user of their single-board computers as well. In the past two years, I worked developing tiny, under-250g, collision resilient quadcopters that had as the main computer a Raspberry Pi Zero W (RPI Zero W) . The reasons why I chose the RPI Zero W were size/weight, power consumption, price and the huge community of users. I even considered to use the…
TL; DR: I like Google Colab (Colaboratory) and I use it quite a lot because that way I can work during the night without waking up my wife with my laptop’s crazily loud gpu fan noises. Not so long ago I wrote a post where I shared two notebooks that allowed the user to save images and sounds directly from your webcam / mic to use inside a colab notebook. Now, I put everything together in a python…
TL; DR: Singularity containers are like Docker containers that don’t force you to be root to run them. Ok, if you want a better explanation, I suggest this presentation or just try searching for it . I’m writing this post to keep this info easily accessible for me and my ~4 readers… An aspect I like about Singularity is the possibility of reusing a Docker image. However, afaik it only works if the…
The very first example you use to introduce neural nets to students nowadays is always something based on MNIST handwritten numbers . Therefore, I decided to create an interactive notebook where you can directly draw your digits to test your brand new trained neural net. The notebook, embed below, is pretty much self-explanatory, but it has some caveats. It is based on old TensorFlow when we…
I may be getting used to short posts, but here it comes: this will be another zippy one! The other day, I realized something quite interesting about the Jupyter notebook (in fact, it comes from IPython…) magic %load . You can use it with an URL! Sadly, it still doesn’t work with Google Colab, but it works with your local Jupyter like a charm. Also, the use of %load is safe’ ish considering it will…
Ok, this is a straight to the point post! In previous posts I explained how to save an image directly from your webcam. However, that method was using OpenCV and it can only access hardware connected to the host (where the Jupyter notebook server is running). One classic example where you can’t access a webcam directly is Google Colaboratory . As I said at the beginning, you can only access the…
UPDATE (28/06/2020): NVIDIA container toolkit changed! See their repository for more details . Now, instead of --runtime=nvidia , you should use --gpus all . Many months ago, I prepared a docker image using Tensorflow, OpenCV, Dlib, etc . Tensorflow was still in its version 1.8.0 and I can’t even remember what was the docker version at that time. However, at the end of August (2018) my career took…
My last post was all about creating a TensorFlow docker image that would work with OpenCV , inside a Jupyter notebook , creating external windows, accessing the webcam, saving things using the current user from host, etc. All that hard work had a reason: use the newest version of TensorFlow for computer vision. So, let’s try it! Without the hat and the measuring tape, it was 0.9 for mask…
Today I’m in need to develop an algorithm to segment some special stuff on an image and my old TensorFlow docker image is… too old to invest time on it. So I decided to pull a new Docker image for the latest TensorFlow with GPU enabled and Python 3 ( 2020-01-01 is Python 2 end-of-life ). The image of my choice was tensorflow/tensorflow:1.8.0-gpu-py3 . Pulling that image was as easy as typing: $…
Last month, I decided to sell my good ol’ 3D printer , a HobbyKing incarnation ( Turnigy Fabrikator Mini ) of the TinyBoy V1 , to buy a delta one. My new Linear Delta 3D Printer working and working and working... My old printer was one of the cheapest printers when I bought it (end of 2015), fully assembled and from a well-known supplier (something good when you are starting at 3D printing). I…
Currently, I’m a last year Robotics / Artificial Intelligence Ph.D candidate (don’t be shy, have a look at my publications ), father of a 7-yrs-old boy and I’m living abroad with my family since 2013. So, life is quite busy, a little bit stressful and it happens that, sometimes, I simply forget things. The other day, I was setting up a new Dell laptop (I’ve bought it really, really cheap from…
This is the continuation (finally!), or the Part 2 , of the “Easy-peasy Deep Learning and Convolutional Networks with Keras” . This post should be something self-contained, but you may enjoy reading Part 1 and Part 1½ … it’s up to you. Around one week ago, I’d attended a CUDA workshop presented (or should I say conducted ?) by my friend Anthony Morse and I’m still astounded by DIGITS . So, during…
When you start playing with cloud computing like Amazon Web Services , you will, sometimes, decide to launch a program that will take a while to run. If you simply close the connection before all processes are finished, the system will terminate bash (or whatever shell you were using) and, therefore, your program will be also terminated. Normally, when we are working on a terminal, we make use of…
This post is a personal reminder. I’m always forgetting Ubuntu (up to 16.04), doesn’t know how to mount exFAT - Extended File Allocation Table and then I need to Google for it . Why would you need exFAT? Among other things, it’s possible to have files bigger than 4GB. Ok, by default Ubuntu doesn’t know how to deal with exFAT and we need to install the FUSE module exfat-fuse : $ sudo apt-get…
This is the continuation, Part 1½ , of the “Easy-peasy Deep Learning and Convolutional Networks with Keras” . Do you really need to read Part 1 to understand what is going on here? Honestly, probably not, but I would suggest you doing so anyway. This is what my trained network outputs, but viewed as RGB images. Before we start, let me just tell you a little bit about myself , as if you…
Do you know what is a Jupyter Notebook ? If you don’t, please, have a look at the previous link and come back later… just joking… ok, seriously, check the previous link because they will do a much better job explaining what is a Jupyter Notebook than me :wink:. This is what I was doing just before start writing this post. Why do I love those notebooks? Probably it’s started long time ago while I…
Deep learning … wow… this is “the” hot topic since, at least, some good years ago! I’ve attended a few seminars and workshops about deep learning, nevertheless I’ve never tried to code something myself - until now! - because I had always another priority . Also, I have to admit, I thought it was a lot harder and it would need much more time to be able to run anything that was not simply a sample…
Today, I’ve decided to write something to make sure I’m not going to forget, again, about my old projects. Another reason for this post is to be an incentive for sharing / publishing your work online. If I had published everything online, as I was developing, I would not need to write a post about things from the past like I’m doing right now ;) When I was still an undergrad student (2000-2005),…
This is my first attempt using Jekyll . It all started because my colleague, Massimiliano, showed me his brand new Jekyll based website . Actually, I’d tried Jekyll before, but when I read the first lines asking me to install Ruby , RubyGems , NodeJS and then install Jekyll , I instantaneously gave up. I was way too used to deploy and admin WordPress websites, so I could not accept the idea of not…