\section{Methods}
\label{sec:methods}

Our evaluation spans four approaches: classical computer vision, foundation models with post-processing, domain-specific semantic/instance segmentation, and panoptic formulation.


\subsection{Processing Pipeline Overview}

Figure~\ref{fig:workflow_overview} illustrates the complete pipeline. The 60,971 $\times$ 88,127 pixel drone orthomosaic (10 km$^2$, 4.31 cm/pixel) is partitioned into 1024$\times$1024 tiles without overlap. Filtering tiles with $<$50\% valid content reduces 6,732 raw tiles to 3,425 clean tiles. 500 tiles spanning diverse land use were densely annotated for training.

\subsection{Classical Computer Vision}

We evaluated whether geometric heuristics achieve sufficient accuracy without learned representations. Our pipeline combined edge detection (Canny, Sobel), morphological operations, and geometry-based constraints.

These approaches failed fundamentally. Agricultural parcel boundaries are semantic constructs encoding ownership rather than physical discontinuities. Shadows produce stronger edges than actual field boundaries. Post-processing rules based on geometric metrics cannot resolve this.

\subsection{Foundation Models}

Foundation models promise zero-shot deployment without domain annotation---attractive for resource-constrained regions. We systematically evaluated whether this holds for agricultural boundaries.

\textbf{SAM Family.} We evaluated SAM (ViT-H, 636M), SAM 2.1 (Hiera-Large, 224M), and SAM 3 (PE-ViT, 848M) in automatic mask generation mode. SAM 2.1 used 4,096 prompts per tile. All achieved only 35-51\% Field IoU, systematically merging adjacent parcels.

These models excel at building detection: SAM 3 achieves 95\% Building IoU despite houses representing only 0.16\% of pixels. Buildings exhibit high-contrast edges matching SA-1B's training distribution, while agricultural parcels require semantic understanding.

\textbf{SAM 2 with Post-Processing.} We implemented a 5-stage pipeline: (1) Watershed segmentation, (2) Morphological closing, (3) Dilation/erosion, (4) Geometric filtering, (5) Polygon vectorization.

Figure~\ref{fig:boundary_challenges} illustrates systematic failures: merged adjacent parcels (tiles 1,2,6,7), boundary blindness (tiles 4,5), fragmentation (tile 3), inconsistent detection. Geometric filtering removed 20-40\% of detections---demonstrating irreducible precision-recall trade-offs.


\begin{table*}[t]
\centering
\caption{Comprehensive Model Comparison across Foundation, Semantic, Instance, and Panoptic Approaches}
\label{tab:model_comparison}
\resizebox{\textwidth}{!}{%
\begin{tabular}{l l l r r l r r r r}
\toprule
Model & Type & Backbone & Input & Epochs & Loss & Field IoU & Building IoU & mIoU & Params \\
\midrule
\multicolumn{10}{l}{\textit{Foundation Models (Zero-Shot)}} \\
SAM & Foundation & ViT-H & 1024 & -- & -- & 35\% & 80\% & 28\% & 636M \\
SAM 2.1 & Foundation & Hiera-L & 1024 & -- & -- & 40\% & 85\% & 32\% & 224M \\
SAM 3 & Foundation & PE-ViT & 1024 & -- & -- & 51\% & \textbf{95\%} & 41\% & 848M \\
\midrule
\multicolumn{10}{l}{\textit{Semantic Segmentation (7-Class)}} \\
UNet MIT-B4 & Semantic & MIT-B4 & 512 & 50 & CE+Tversky & \textbf{95.37\%} & 70.82\% & 83.98\% & 64M \\
SegFormer MIT-B2 & Semantic & MIT-B2 & 512 & 50 & Tversky+Focal & 93.47\% & 57.27\% & \textbf{84.77\%} & 27M \\
\midrule
\multicolumn{10}{l}{\textit{Instance Segmentation}} \\
Mask2Former & Instance & Swin-Tiny & 512 & 30 & CE+BCE+Dice & 85.61\% & \textbf{95.32\%} & 78.50\% & 28M \\
DelineateAnything & Instance & YOLO11 & -- & Pre-trained & -- & 72.0\% mAP@50 & -- & -- & -- \\
YOLOv11m-seg & Instance & YOLO11m & 1024 & 100 & Auto & \textbf{92.9\% mAP@50} & -- & 63.7\% & 45.3M \\
\midrule
\multicolumn{10}{l}{\textit{Panoptic Segmentation (Novel)}} \\
\textbf{Mask2Former} & Panoptic & Swin-Tiny & 1024 & 50 & Panoptic+Boundary & \textbf{97\%} & 79\% & \textbf{86.5\%} & 28M \\
\bottomrule
\end{tabular}%
}
\end{table*}

\textbf{DelineateAnything.} Pre-trained on 22.9M global farm instances, this represents state-of-the-art agricultural boundary detection. Despite massive pre-training, zero-shot evaluation achieved only 72\% mAP@50. Resolution mismatch (trained on 0.5-1.0 m/pixel, tested at 4.31 cm/pixel) and subtle Nepali earthen boundaries explain this gap.



\subsection{Semantic Segmentation}

Having established geometric and foundation approaches cannot achieve deployment accuracy, we evaluated domain-specific semantic segmentation trained on 400 images.

\textbf{UNet with MIT-B4.} Heavy UNet decoder with Mix Transformer B4 encoder (64M parameters), 512$\times$512 input. Training used combined Cross-Entropy and Tversky loss with Albumentations augmentation for 50 epochs.

\textbf{SegFormer with MIT-B2.} Mix Transformer B2 encoder (27M parameters). Combined Tversky and Focal loss with AdamW optimizer for 50 epochs.


\textbf{Limitation.} Semantic segmentation provides per-pixel labels but cannot distinguish individual parcel instances.

\subsection{Instance Segmentation}

DelineateAnything demonstrated YOLOv11 effectively learns agricultural boundaries when trained on sufficient data. However, their pre-trained weights achieved only 72.0\% mAP@50 zero-shot on our 4.31 cm/pixel imagery due to resolution mismatch.

We adopted their architecture---YOLOv11m-seg (45.3M parameters)---and retrained on our dataset at 1024$\times$1024 resolution for 100 epochs (early stopping epoch 80), batch size 16, AdamW optimizer. Domain adaptation achieved 92.9\% mAP@50 (+20.9pp over DelineateAnything), demonstrating 400 local images outperform 22.9M global instances when resolution differs.

\subsection{Panoptic Segmentation}

We propose novel panoptic formulation for agricultural parcel extraction. Only FIELD is designated as ``thing'' requiring instance identification; landscape context (WATER, ROAD, VEGETATION, SAND, HOUSE, BACKGROUND) remains ``stuff'' with semantic labels only. This reflects task structure: each parcel requires unique identification for damage attribution.

\textbf{Mask2Former with Swin-Tiny.} Implementation uses Mask2Former (28M parameters) at 1024$\times$1024 with differential learning rates (backbone 1e-5, decoder 1e-4). Custom boundary loss applies only to FIELD edges. Training ran 50 epochs on A100 with best model at epoch 14.
