r/computervision • • 27d ago

Help: Project Please help

I'm working on a robot that detects grapevines and sprays them with fertilizer using an articulated boom.

Due to budget limitations, I can only afford a Raspberry Pi 4 and a standard RGB camera, not an RGB-D camera.

I'm considering combining Meta's DINO with Depth Anything V2 to estimate the distance to irregular objects like grapevines, leaves, and fruit. However, I'm unsure how feasible this is on a Raspberry Pi 4 or what challenges I might face.

Is there a better, more practical approach within this budget? I'd appreciate your technical advice and recommendations.

3 Upvotes

8 comments sorted by

3

u/PlagueCookie 27d ago

Depends on which raspberry pi 4. But if I recall correctly, Dino is a pretty huge model, it won't fit even in 8 GB of ram. Probably some distilled version might fit, but it would still be very slow.

1

u/Real-Arrival-9310 27d ago

Do you have any suggestions, I have some questions so can I Dm you?

→ More replies (1)
→ More replies (1)

3

u/biskuitkelapa 27d ago

Don't combine DINOv2 and Depth Anything V2 initially. Focus on lightweight detection and geometric positioning first. Only explore depth estimation if the initial approach cannot meet your positioning requirements.

Start with YOLO11n to detect grapevine canopies. Test its inference speed on the Raspberry Pi 4.

Try lightweight segmentation if you need precise canopy boundaries.

Calibrate the RGB camera and use vineyard geometry to estimate target positions.

Benchmark on the Pi 4 using a smaller input resolution and a lightweight inference runtime.

Recommended model

  • yolo11n
  • yolo11n-seg
  • mobilenetv3-small + deeplabv3

1

u/frgfm 27d ago

Depth Anything V2 gives you relative depth, not meters, so you'd still need a scale reference. In a vineyard that's cheap to get: the camera's fixed height on the robot plus the known row spacing, calibrated once. On a Pi 4 I wouldn't run DINO plus a depth model on every frame. Run something tiny (a small segmenter, or even color/texture rules, since canopy vs soil vs sky separates fairly well) at a few FPS, and only estimate distance when you're about to spray. Honestly, for boom distance a cheap range sensor (ToF or ultrasonic) on the boom may beat any monocular model, but test it in direct sun and through moving leaves. How precise does the spray distance need to be: a few cm, or just near/far side of the row?

1

u/nickdaniels92 27d ago

This sounds like fun. Personally I wouldn't start on a raspi at all though, but use a conventional machine with a decent graphics card so you can iterate faster and get to proof of concept quicker. If the speed of iteration from one experiment to the next actually is fast on the Pi then fine, but otherwise you may be hampering getting to a point where anything even works.

If getting power to the vines is an issue and you don't have a suitable battery source and inverter for a conventional machine, then that obviously does force your hand. If possible though, aim to figure out how to solve the problem when not constrained, keeping in mind the type of hardware you'll need, but not making that a hard constraint. If you get it to work but a more powerful device is needed, I'd expect that funds could be found somehow. Good luck with it!