Mars 2023, we start noticing train cars. That is, when a train approaches, stop what you are doing, and just watch in silence until the train passes. This encourages presence.

While watching these cars, I started counting. These are long cargo trains, sometimes with double stacked containers. They come several times per hour in either direction.

alt name:: Train Otaku


2024-02-29 Submitting film to BBIFF

brief description:

A shot of two trains passing just outside of Bombay Beach. The train, an embodiment of human progress and industry, stands in stark contrast to the natural tranquility of the desert landscape. By stopping to observe the train, to be present for its passing, we interrogate the contrast of rumbling train and vast desert.


At Bombay Beach in California’s Sonoran desert, two cargo trains pass by, their powerful engines interrupting the serene silence with a reminder of industry and technological advancement.

We pause to observe the contrast between the raw power of the trains and the natural beauty of the landscape, and observe the interplay between silence and noise, monotony and change, the past, present, and future.

Shot on February 4th, 2024 as part of a larger train observation project at Mars College.


Filmed more trains.

  • upload train footage.
  • split train footage in to individual photos
  • add to Roboflow dataset

Use a solar panel + camera + meshtastic? Would be cool to get closer to the trains for higher res pics. Need auto exposure adjustment.


Showed Nickl and Sophia - they agreed I was on the right path and should just train on a much larger dataset. Existing dataset is ~4 of my own images and ~50 of some random train dataset. I think I need to film these trains from many different angles/times of day. Aim for a dataset of around 100 images and see where we get.


  • Following a tutorial to train v8.
    • set up Conda to manage virtual environments. Seems to be what Apple recommends
    • ensure pytorch is set up to use Metal Performance Shaders (MPS)
    • The tutorial shows how to set up a directory structure for training with YOLO, just need to create a data_custom.yaml file to point at correct directories.
    • Currently using yolo cli from homebrew - it tries to use a datasets directory in /opt/homebrew...
    • yolo task=detect mode=train epochs=10 data=data_custom.yaml imgsz=640
    • yolo task=detect mode=predict show=True conf=0.5 source=../../python/train-10s.mp4
    • Did not work so great, as the data set is wayy to small.
    • Used an existing Train data set, though it did not work either on this clip. See result
      • yolo task=detect mode=predict model=/opt/homebrew/runs/detect/train18/weights/ show=True conf=0.5 source=../../python/train-10s.mp4 this was trained on this dataset
      • Maybe I can amend this data set with own images of these local trains - which I did. It contains only a few. Need way more!!!
      • this actually worked okay on the full frame video

MVP [Done]

How can I complete this in one hour?

  • Film a few trains
  • Davinci resolve project, create square video of train moving across Train Layer Video

Goal: Automate car counting


OpenCV (python) on the backend, JavaScript for scripting, some webview


Daylight hours, using solar (this is offgrid), using high quality camera.


A camera hooked up to a computer should be recording footage. The footage should only be kept if a train passes. Analyze footage using OpenCV - count cars, count containers, count engines, identify cars with Graffiti, identify Containers from same company, identify empty cars, identify cars with non-container cargo. Extract photo of each car, and piece together in to panorama (perhaps with width constraint to make a square photo).

Things to notice

  • count cars
  • count containers
  • count engines
  • identify cars with Graffiti
  • identify Containers from same company
  • identify empty cars
  • identify cars with non-container cargo.


  • Panoramic images
  • Panoramic video
  • Discord Bot on Mars Server (Eden)
  • Webpage to document all of these things.


This project uses motion detection

Use ImageAI


This uses PyTorch beneath and is a layer on top.

  • 2024-02-06 I got this running, and there is a ‘train’ label, though it did not detect any trains when I ran the 10s video through it.

Label Studio

Open Source data labeling

Track and Count Objects using YOLOv8 ByteTrack and Supervision

How to Train for Object Detection on a Custom Dataset