# TSINet: A Semantic and Instance Segmentation Network for 3D Tomato Plant Point Clouds
## 2 Materials and Methods
### Network Architecture
#### 2.3.1 Geometry-Aware Adaptive Feature Extraction Block (GAFEB)  
To effectively capture the local structures and geometric relationships in the raw tomato plant point cloud, we propose a Geometry-Aware Adaptive Feature Extraction Block (GAFEB), as illustrated in Figure 4a. GAFEB consists of four key components: Farthest Point Sampling (FPS) [24], EdgeConv [26], Position Adaptive Convolution (PAConv) [27], and residual-based feature fusion. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Overall** & **Training Set** & **Test Set** \\ \hline Initial dataset & 77 & 61 & 15 \\ Augmented & 1540 & 1220 & 320 \\ Dataset & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Point cloud distribution before and after data augmentation. Figure 3: The architecture of TSINet. It adopts a dual-branch encoder-decoder structure for simultaneous semantic and instance segmentation of tomato plant point clouds. The network consists of a shared encoder, parallel decoders, and a dual attention module integrating spatial and channel attention mechanisms. N\({}_{0}\) > N\({}_{1}\) > N\({}_{2}\) > N\({}_{3}\) > N\({}_{4}\) denote point numbers. For each GAFEB, we first perform FPS to downsample the input point cloud by a factor of four, retaining only 25% of the points while preserving their corresponding C-dimensional features. FPS selects representative key points with uniform spatial distribution, reducing computational redundancy. EdgeConv dynamically constructs local adjacency graphs in the feature space and performs convolution over the relational features between each point and its neighboring points, effectively capturing local geometric structures and spatial dependencies within the point cloud. As illustrated in Figure 4b, a k-nearest neighbor (kNN) graph is constructed for each sampled point, forming a graph structure \(G(V,E)\), where \(V=\{1,...,n\}\) denotes the set of sampled points and \(E\subseteq~{}V\times V\) denotes the set of edges representing spatial relationships between neighboring points. The edge feature between a point \(x_{i}\) and its neighbor \(x_{ij}\) is defined as  
\[e_{ij}=h_{\theta}\big{(}\big{[}x_{i},x_{ij}-x_{i}\big{]}\big{)} \tag{1}\]  
where \(x_{i}\) is the feature of the center point, \(x_{ij}\) is the feature of a neighboring point, and \(h_{\theta}(\cdot)\) denotes a multilayer perceptron (MLP) with shared parameters. The edge features within each neighborhood are aggregated via max pooling to produce a local structure-aware representation. To enhance adaptability to varying local geometries, we introduce PAConv after EdgeConv. As shown in Figure 4c, PAConv adaptively learns convolutional kernel weights based on the spatial configuration of point clouds. It leverages a learnable ScoreNet to generate dynamic weights over a set of predefined kernels, enabling spatially adaptive local feature extraction. \[y_{i}=\sum_{m=1}^{M}\alpha_{m}(i)\cdot Conv_{m}(x_{i},\mathcal{N}(x_{i})) \tag{2}\]  
where \(M\) is the number of predefined kernels, and \(\alpha_{m}~{}(i)\) are the weights generated by ScoreNet. Compared with static MLPs or fixed graph structures, PAConv provides improved flexibility and generalization in modeling diverse local structures. To further enrich feature representations, the outputs of EdgeConv and PAConv are concatenated and fused using an additional PAConv layer. A residual connection is then employed to add the input features to the fused features, resulting in enhanced representations. This residual design  
Figure 4: Architecture and key operations of the proposed Geometry-Aware Adaptive Feature Extraction Block (GAFEB). (**a**) Overall structure of GAFEB. (**b**) Illustration of the EdgeConv operation: a k-nearest neighbor (kNN) graph is constructed for each sampled point, and edge features are computed based on the relative features between the point and its neighbors.