AIFS Sony Tech Challenge
Our team (Heesup Yun, Jonathan Berlingeri, Ethan Truong, and Nathan Chiu) won 1st place at the 2025 AIFS × Sony AI AgTech Challenge. In the two-day hackathon we built WeedTrackr, a weed mapping system, on a Raspberry Pi Zero with a Raspberry Pi AI Camera, and had a working demo by the end.
Weeds
In the U.S., weeds cost about $33 billion a year in lost yield and $6 billion a year in control. About 70 million pounds of herbicide a year are lost to imprecise application and overuse.
Most farms spray the same amount over the whole field, wherever the weeds are. Precision sprayers exist, but they are expensive and built mainly for annual row crops. In vineyards and orchards, mowing handles weeds between rows, but weeds along the rows are still a problem.
WeedTrackr
WeedTrackr is a low-cost weed monitor for planning herbicide sprays in orchards and vineyards. It maps weeds while the grower does regular work, and the map is used to spray only where weeds are, which could cut herbicide use by up to 90%.
The grower mounts it on a mower or tractor, turns it on, and keeps working. It collects images on its own in the background.
How it works
WeedTrackr uses off-the-shelf hardware and our own software.
A Raspberry Pi Zero with the AI camera and a Sony Spresense GPS module captures geolocated images as the vehicle moves through the field. A model on the camera classifies each image in real time as broadleaf weed, grass, or soil. The model is a modified MobileNetV2 trained on 500+ broadleaf, 500+ grass, and 1000+ soil/background images.
To run it on the device, we used MCT (Model Compression Toolkit) for INT8 quantization and ONNX conversion to an IMX500 package, we reduced the model size by 75% while maintaining over 93% of the original accuracy.
A web dashboard (React + TypeScript) turns the classified data into spray routes and variable rate application maps. It shows weed heat maps for grass and broadleaf weeds, past treatments, and the estimated chemical savings over blanket spraying.
AI and robotics hardware is now cheap enough for this kind of tool. With chemical, labor, and fuel costs rising and regulations getting stricter, spraying only where weeds are also cuts scouting labor and herbicide residue.
Hardware setup
The Raspberry Pi Zero is not powerful enough for deep learning out of the box. I overclocked the CPU and GPU and fit our classification model to the Raspberry Pi AI Camera, so the model runs on the camera’s AI accelerator instead of the CPU.
We first set up the device with a 64-bit OS referring to this guide: Install a 64-bit OS on Raspberry Pi zero 2 - Q-engineering.
These are the settings we tried, based on the MakeUseOf overclocking guide.
1. Stock Configuration
By default, the arm_freq is set to 1000 and gpu_freq to 300.
weed@raspberrypi:~ $ vcgencmd get_config int
... (shortened)
arm_freq=1000
core_freq=400
gpu_freq=300
sdram_freq=450
2. First Overclock
We raised arm_freq to 1200 and core_freq to 500 without changing the voltage.
weed@raspberrypi:~ $ vcgencmd get_config int
... (shortened)
arm_freq=1200
core_freq=500
gpu_freq=300
sdram_freq=450
3. Pushing Further
Then we raised arm_freq to 1300, gpu_freq to 500, and sdram_freq to 500. We also configured over_voltage=5 and over_voltage_sdram=3 to keep the system stable.
weed@raspberrypi:~ $ vcgencmd get_config int
... (shortened)
arm_freq=1300
core_freq=500
gpu_freq=500
sdram_freq=500
over_voltage=5
over_voltage_sdram=3
These settings can be applied in /boot/config.txt as follows:
[all]
arm_freq=1300
core_freq=500
gpu_freq=500
sdram_freq=500
over_voltage_sdram=3
# over_voltage is done by the governor.
# set the parameter to overrule its moderate choice.
over_voltage=5
enable_uart=1
dtoverlay=pi3-miniuart-bt
Overclocking improved the VNC performance a lot. But it requires active cooling, so I added a heatsink and fan.
Running the AI Model on the Raspberry Pi Camera
Getting the model to run on the AI Camera took several tries.
1. Exploring TF Lite & Miniforge
We first tried TensorFlow Lite and a few guides for object detection and image classification, including building the tflite-runtime explicitly for the Pi Zero:
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install python3-tflite-runtime
We also set up a local Conda environment using Miniforge to manage dependencies. We also looked at the official TensorFlow Lite Raspberry Pi examples. To check the camera, the libcamera-based Python library picamera2 is useful.
2. Resolving Environment Conflicts
The tools for the Sony IMX500 sensor are installed with:
sudo apt install imx500-all
3. Execution
Once the environment used the native Raspberry Pi OS libraries instead of Conda’s, it worked. We ran our compiled .rpk model with:
python imx500_classification_demo_ucd.py --model weed.rpk --softmax