Abstract:This paper presents a two-stage instance segmentation method based on harmonic background modeling, which enables rapid and precise segmentation of targets in complex remote sensing images. The proposed framework consists of two stages. In the first stage, candidate bounding boxes are generated by a flexible and replaceable object detector (e.g., YOLOv10 or DINO). The second stage introduces a "plug-and-play" mask computation module that leverages a harmonic function model to regress the background and compute the foreground mask without additional training, thereby improving both accuracy and robustness. The method is grounded in harmonic function theory and fundamental theorems of complex analysis, with the Dirichlet problem serving as the core framework. It innovatively infers global background information from local boundary conditions to generate instance masks. By reformulating the Dirichlet problem into a least-squares regression, the algorithm achieves both feasibility and adaptability. Experiments conducted on the NWPU VHR-10 dataset demonstrate that, compared with representative methods such as Mask R-CNN and Mask2Former, the proposed approach attains superior performance in both{\mathrm{AP}}_{\mathrm{box}}and {\mathrm{AP}}_{\mathrm{mask}} metrics. In particular, it achieves an {\mathrm{AP}}_{\mathrm{mask}}^{50} of 92.1%, surpassing the best existing results by 2.5%, which confirms its effectiveness and potential in remote sensing instance segmentation tasks.