Posts

Keeping Track IDs Through Full Occlusion: YOLO + a GPU Kalman Tracker

Image
I wanted to know one thing: when an object walks behind a bus, a pillar or another object, and it comes out again a few seconds later, does it keep its track id? Most trackers say yes in the paper and no in the video. The detector cannot see a hidden object, so the tracker must remember it, predict where it goes, and recognize it when it comes back. If the tracker forgets too early, the same person gets a second id, and every count, dwell time and trajectory after that point is wrong. So I built my own tracker. Ultralytics YOLO26 is only the detector. The tracking part is my code: a Kalman filter, a matching cascade and an appearance check, all in PyTorch on the GPU, batched over tracks and over video streams. Then I asked a second question: if the whole loop stays on the GPU, how many frames per second can two GPUs track? The source is on GitHub: mraad/yolo-kalman . Tracker output on "Inbound B Branch train, March 2021" by Flickr user 132192938@N04 ( CC BY 2.0 , vi...

e-means Meets DBSCAN: Two Moons Said Yes, Cairo Said No

Image
Back in 2016, I wrote DBSCAN on Spark . I like DBSCAN because you do not have to give it the number of clusters. But it uses a lot of time and memory when the input is large. This month, Meta FAIR and École des Ponts released e-means in faiss 1.16.0. It does the work of k-means in a few passes over the data. So I asked a simple question: can e-means make the data small, so that DBSCAN can do the rest? In this post, I show how I combined the two and how fast e-means is on a GPU. Then I test the method on real satellite data of Cairo. It did not win there. The source is on GitHub: mraad/emeans-dbscan . The e-means explorer after one run on Cairo with k = 3. All the arithmetic runs in the browser. The terms Vector. One row of numbers. There are n vectors, and each vector has d numbers. Centroid. The center point of a cluster. There are k centroids. Epoch. One pass over all the training vectors. Noise. The vectors that DBSCAN does not put in a cluster. Their...

map-pane: one live map for Claude Code, Codex and Pi

Image
I work most of the day in a terminal with a coding agent. When the work is spatial, I want to see the result on a map. I do not want to leave the terminal, and I do not want to write a web app first. map-pane is my answer. It is a live web map that an agent drives from the shell. The map uses the ArcGIS Maps SDK for JavaScript 5.2.2. Headless Chrome draws the map, and a terminal pane shows it. The pane also takes your mouse and keys, so you can pan and zoom by hand while the agent works. The code is at github.com/mraad/map-pane , MIT licensed. It needs macOS, Node.js 24 and Google Chrome. It has no npm dependencies. I want to keep it that way. What it does The agent can do these things on the map: Add data: GeoJSON (file, URL or inline), GeoPackage, GeoParquet, CSV, feature services, map services, tile and vector tile layers, and portal items. Style data: renderers, labels and filters. GeoJSON with one geometry type gets a legend entry and popups. Move the view: to a geocoded ...

Service Areas on the GPU and in the Browser, Checked Against ArcGIS

Image
I have used ArcGIS Network Analyst for service areas for a long time. You give it a start point and a few drive times, and it gives you the streets and the area that you can reach. It is correct, and it is the reference that people trust. But it is not fast. For 100 crash locations in Adams County, Ohio, with breaks of 1, 5 and 10 minutes, the solve takes 69 seconds. For all 2,483 crashes, it takes 31 minutes. So I asked a simple question: can a GPU calculate the same service areas, and I mean the same, not "close enough"? And if the GPU can do it, can the browser do it too? In this post, I show the three engines that I built, how I compare them with ArcGIS, and where they do not agree. The source is on GitHub: mraad/service-area . The live page. The mouse moves along a street near West Union, Ohio. The browser calculates the 5-minute service area again at each position. The problem The study area is Adams County, Ohio. The data is a file geodatabase with 3,063...