Instance segmentation in Remote Sensing Images (RSI) poses significant challenges due to the diverse scales of targets, scene complexity, and a high number of targets, making most methods struggle with suboptimal performance and time-consuming computations. To solve those problems, a fast and accurate RSI instance segmentation model (named DCTC) is designed in this paper. DCTC transforms classification problem into regression problem to improve the reference speed. DCTC contains two parallel branches. The contour branch performs iterative regression on contours, extracting precise contour information to improve boundary accuracy. Meanwhile, the DCT branch refines mask predictions and supplements instance context information, which particularly benefits the segmentation of small targets. DCT encoding is employed in the DCT branch to convert the mask representation into DCT format, aligning the outputs of the contour and DCT branches. Three innovative modules are introduced in the DCT branch: the Coarse Result Generation module (CRG), Iteratively Deform and Regress module (IDR), and Contour and DCT Fusion module (CDF). The CRG module generates coarse DCT vectors and contour coordinates, facilitating information exchange between the contour and DCT branches. The IDR module iteratively refines DCT vectors, enabling DCTC to focus more on small targets and instance details. The CDF module merges DCT vectors and contour coordinates, ensuring effective interaction between boundary and context information, thereby enhancing performance. Extensive experiments demonstrate the superiority of DCTC, which achieves 67.7, 36.3, 67.4, 55.1AP on NWPU VHR-10, iSAID, SAR Ship Detection Dataset (SSDD), and High-Resolution SAR Images Dataset (HRSID), and ranks first among state-of-the-art methods while maintaining real-time processing capability. Furthermore, DCTC exhibits strong performance on both optical and SAR images, and the designed DCT branch can be simply plug into any contour-based method to improve the network performance.