Using nnU-Net with 2D RGB images and custom data splits
nnU-Net is now considered a standard and state-of-the-art tool for medical image segmentation, but, I think that it is opinionated in the following ways that affect how I may use it: It enforces a specific training and evaluation workflow, including assumptions about data splits. This means using custom train-valid-test splits requires some workarounds. It assumes 3D volumetric data, and while 2D data is supported, it’s the not the primary use case. It assumes grayscale images, and does not support RGB images out of the box. This again means that RGB images require some workarounds. A lot of researchers, however, happily use nnU-Net for 3D volumetric medical images, so these limitations may not be relevant to them. ...
Setting up Antigravity on Linux
Google recently released Antigravity, their own VSCode fork. I tried it because I liked Gemini Pro, which they also gave away for free for students, and I wanted to see how it compared to VSCode. I don’t use vibe-coding or “agentic” coding or anything “cool” like that, but I do enjoy Co-Pilot’s autocomplete features in VSCode, and I was curious to see how Antigravity compared. I tried it on my home machine, and I was quite happy with it. Maybe because it was new, but I found it to be better than Co-Pilot. So I wanted to try it on my work machine, but unfortunately, Antigravity’s Linux installation instructions offered either sudo or the source code. I would have personally liked it best if they offered an AppImage, and I even considered creating one myself (maybe I will write a post about it later). But turns out there was a much easier way to use it. ...
The case of missing rows in pandas
I usually rely on running a wc -l (line count) to do a sanity check on the number of rows in a file (e.g., dataset metadata). Yesterday, I lost an unhealthy amount of time debugging a weird discrepancy between the wc -l output on a CSV file and the number of rows after I read it into a pandas DataFrame. And I learned something new about it. I guess I was one of 10,000 lucky people yesterday. ...
Installing fastfetch without sudo
I recently wrote about using fastfetch as a part of my MOTD (Message of the Day) in this post. I like it a lot and wanted it to be available on my lab workstation as well, which runs Ubuntu 22.04. However, I do not have sudo access on this machine, which means I cannot just sudo apt install fastfetch like I did on my home computer. So, I did the next best thing (relevant xkcd?): compile it from source. The process was fairly straightforward, but I had never done it before, so I thought I might as well document it for future reference. ...
Moving to uv and ruff
For years, my Python workflow relied on conda for environment and package management, pip for package management, black for auto-formatting, and isort for sorting imports. In places where I couldn’t use conda, such as Digital Research Alliance of Canada (FKA Compute Canada) clusters or own school’s own SLURM cluster, I would use virtualenv/venv to manage my environments and ocassionally, conda-pack when I absolutely needed to use the exact conda environment on a cluster. ...