U-Net for Agricultural Field Segmentation [P]

Reddit r/MachineLearning / 5/1/2026

💬 OpinionIdeas & Deep AnalysisTools & Practical Usage

Key Points

  • A student project is using a U-Net with an attention mechanism to segment agricultural fields, trained on the AI4Boundaries dataset with 5 input channels.
  • The model performs poorly when applied to raw Sentinel-2 imagery, with its confidence dropping to near zero.
  • The author asks whether stacking multi-date images could reduce noise and cloud interference.
  • They also seek advice on handling sun/viewing angle variations not present in the training data and on improving robustness when real-world data differs significantly from the training set.
  • The post invites community guidance and offers to share the full public code if needed.
U-Net for Agricultural Field Segmentation [P]

Hi everyone, I’m working on a solo student project (it was supposed to be a team of five, but here I am) focused on agricultural field analytics.
Architecture: U-Net with an attention mechanism
Data: Trained on the AI4Boundaries dataset (5 channels)

The problem: When I switch to raw Sentinel-2 data, the model’s confidence drops to almost zero.

Questions:
Should I stack images from different dates to reduce noise and cloud interference?
How should I handle varying sun and viewing angles that are not present in the training set?
How can I improve the model’s performance when the training data differs significantly from the real-world data?

Any advice on making the model more robust for real-world conditions would be appreciated.

P.S. I’ve been coding for the last 12 hours and have already started drinking just to avoid looking at this mess again, so I might have missed some community rules. If needed, I can share the full code , it’s all public.

Training:

https://preview.redd.it/2u0vgg3tpeyg1.png?width=1462&format=png&auto=webp&s=7e8f773bddfc218955f931813c423e3b22ed1e6d

Real:

https://preview.redd.it/irlpf6alpeyg1.png?width=959&format=png&auto=webp&s=8da6955b9b5c73f5d9e49e6e29b27d70125109d9

submitted by /u/niki88851
[link] [comments]