An Accurate and Efficient Neural Network for OCTA Vessel Segmentation
  and a New Dataset
Optical coherence tomography angiography (OCTA) is a noninvasive imaging
technique that can reveal high-resolution retinal vessels. In this work, we
propose an accurate and efficient neural network for retinal vessel
segmentation in OCTA images. The proposed network achieves accuracy comparable
to other SOTA methods, while having fewer parameters and faster inference speed
(e.g. 110x lighter and 1.3x faster than U-Net), which is very friendly for
industrial applications. This is achieved by applying the modified Recurrent
ConvNeXt Block to a full resolution convolutional network. In addition, we
create a new dataset containing 918 OCTA images and their corresponding vessel
annotations. The data set is semi-automatically annotated with the help of
Segment Anything Model (SAM), which greatly improves the annotation speed. For
the benefit of the community, our code and dataset can be obtained from
https://github.com/nhjydywd/OCTA-FRNet.
Haojian Ning, Chengliang Wang, Xinrun Chen, Shiying Li
# An Accurate and Efficient Neural Network for Octa Vessel Segmentation and a New Dataset

###### Abstract

Optical coherence tomography angiography (OCTA) is a noninvasive imaging technique that can reveal high-resolution retinal vessels. In this work, we propose an accurate and efficient neural network for retinal vessel segmentation in OCTA images. The proposed network achieves accuracy comparable to other SOTA methods, while having fewer parameters and faster inference speed (e.g. 110x lighter and 1.3x faster than U-Net), which is very friendly for industrial applications. This is achieved by applying the modified Recurrent ConvNeXt Block to a full resolution convolutional network. In addition, we create a new dataset containing 918 OCTA images and their corresponding vessel annotations. The data set is semi-automatically annotated with the help of Segment Anything Model (SAM), which greatly improves the annotation speed. For the benefit of the community, our code and dataset can be obtained from [https://github.com/nhjdywd/OCTA-FRNet](https://github.com/nhjdywd/OCTA-FRNet).

Haojian Ning, Chengliang Wang\({}^{*}\), Xinrun Chen

Chongqing University

College of Computer Science

Chongqing, China Shiying Li

Xiang'an Hospital of Xiamen University

Department of Ophthalmology

Xiamen, China OCTA, Vessel Segmentation, Neural Network, ConvNeXt, Dataset, Segment Anything Model

## 1 Introduction

Optical coherence tomography angiography (OCTA) is a rapid and non-invasive imaging technology for retinal micro-vasculature[1]. It can help diagnose various retinal diseases such as age-related macular degeneration (AMD)[2], diabetic retinopathy (DR)[3], glaucoma[4], etc. Automatic OCTA vessel segmentation based on neural networks has been a research hotspot because it helps to improve the efficiency of diagnosis.

On-device inference is important for industrial applications of neural networks. Since the computing power and storage space of end-side devices are often very limited, it is necessary for the model to have a small number of parameters and high computing efficiency. Previous work [5, 6, 7, 8, 9, 10] mainly adopted the encoder-decoder architecture and achieved very high accuracy in OCTA vessel segmentation. However, these networks usually have a large number of parameters and slow inference speed, which is unfriendly to on-device applications. There is still a lack of models that are friendly to industrial applications in OCTA images.

In this paper, we make the following contributions:

* We propose a full-resolution convolutional network (FRNet), which consists of several modified Recurrent ConvNeXt Blocks. The network has comparable accuracy to other SOTA methods while having significantly fewer parameters and faster inference speed, making it very friendly for industrial applications.
* We create a new dataset containing 918 OCTA images and their corresponding vessel annotations. The data set is semi-automatically annotated with the help of Segment Anything Model (SAM), which greatly improves the annotation speed. To the best of our knowledge, our dataset is the largest (with 918 images) OCTA vessel segmentation dataset, and we believe it can help the community alleviate the problem of insufficient datasets.
* We conduct various experiments to demonstrate the effectiveness of the proposed model. And we make the

Figure 1: (a) An OCTA image from ROSSA dataset that will be released in this paper. (b) The corresponding vessel annotation.
code and dataset of this work publicly available, which helps improve the reproducibility of the work.

## 2 Related Work

### Neural Networks for OCTA Vessel Segmentation

In recent years, convolutional neural networks have been widely applied in medical image processing, including OCTA images. Previous work on OCTA vessel segmentation usually adopts the encoder-decoder architecture, more specifically, the U-Net[11] architecture. For example, Peng et al[5] applied an iterative encoder-decoder network to correct wrong output. Hu et al[12] proposed a joint encoding and seperate decoding network to handle multiple tasks. Ma et al[10] designed a two-stage split attention residual UNet to refine the segmentation results. Ziping et al[13] added a contrastive learning module after an encoder-decoder network to improve the performance.

The above method achieves quite high accuracy, but they are heavyweight, having a large number of parameters and slow inference speed, which brings inconvenience to industrial applications.

There is a trend in the 2020s for transformers[14] to replace convolutional networks in various fields of computer vision. However, the work of Liu et al. on ConvNeXt[15] demonstrated that properly designed convolutional networks can achieve better results than transformers. So in this work we adopt convolutional networks on the basis of ConvNeXt. Details will be discussed in Section 3.1.

### Datasets for OCTA Vessel Segmentation

OCTA is a relatively new imaging modality with a late start. There are only two main datasets used in vessel segmentation studies: ROSE[10] and OCTA-500[7]. ROSE contains 229 OCTA projection images with \(3mm\times 3mm\) FOV and manual labels of vessels and capillaries. OCTA-500 contains 300 OCTA projection images with \(6mm\times 6mm\) FOV and 200 OCTA projection images with \(3mm\times 3mm\) FOV and their corresponding annotations. To further increase the amount of publicly available data in this field, we release the ROSSA dataset, which contains 918 images. For more information, please refer to Section 3.2.

## 3 Methods

### Proposed Model

As shown in figure 1(a), OCTA images contain many tiny vessels, which may only consist of a few pixels. For the widely used encoder-decoder architecture, the image is downsampled and then up-sampled, making it difficult to fully restore the pixels of these small vessels, which affects the segmentation accuracy. Furthermore, each downsampling typically results in doubling the number of channels in the convolutional layer, which results in a model with a large number of parameters. This is why we believe that the encoder-decoder model is not the most suitable for OCTA vessel segmentation.

To address these problems, we start with a simple full-resolution network(FRNet-base). As shown in figure 2(a), FRNet-base consists of convolutional blocks without any downsampling or upsampling modules. The structure of these convolutional blocks is the same as the BasicBlock in ResNet[16], that is, a residual link is added after two convolutions. FRNet-base contains 6 such convolution blocks, and their number of channels is 32.

The benefits of this design are: First, the total number of convolution channels is greatly reduced, which leads to a significant decrease in the number of parameters. Second, it avoids the loss of information of small vessels during downsampling, so that high accuracy can be achieved.

We take inspiration from ConvNeXt[15] to further improve FRNet. Based on ConvNeXt Block, we set convolutional channels to 32. In order to increase the receptive field, we replace the 1x1 pixelwise convolution with a 3x3 convolution. Furthermore, we apply the idea of recurrent convolution in this module. Recurrent convolution means that the input will be looped through the convolutional layer R times. It is proven to be quite effective for vessel segmentation in [9]. In our model we set R=2. The structure of the Recurrent ConvNeXt Block is shown in Figure 3. It is used to build FRNet, which improves the Dice score by 0.24%-0.32% compared to FRNet-base.

Figure 2: (a) FRNet-base. (b) The final designed FRNet, mainly composed of 7x7 depthwise separable convolutions, each followed by two 3x3 recurrent convolutions
### Dataset

Vessel annotation is a labor-intensive task. Unlike regular object datasets (e.g. COCO), vessel annotations cannot be drawn in the form of polygons but must be drawn pixel by pixel. From our experience, pixel-by-pixel annotation of vessels in an OCTA image usually takes a researcher 10-30 minutes and consumes a lot of mental energy. This is an important reason why there are so few OCTA vessel segmentation datasets.

In 2023, Facebook released their Segment Anything Model (SAM)[17], which can output accurate pixel-level masks by inputting a small number of point prompts. This can greatly save annotation time.

The original weights of SAM cannot be directly applied to OCTA vessel annotation because it was not trained on similar datasets. In order to apply SAM to OCTA vessel annotation, we first manually annotated 300 OCTA vessel images (NO.1-NO.300), and then used these data to fine-tune SAM. Finally, using fine-tuned SAM, we were able to annotate a vessel with just a simple click of prompt, as shown in Figure 4. Although sometimes images annotated by SAM require a small amount of manual correction, overall the time to annotate an image has dropped to about 2 minutes. In this study, we used SAM to annotate 618 images (NO.301-NO.918).

Since a large amount of data is semi-automatically annotated using SAM, we named the dataset ROSSA (Retinal OCTA Segmentation dataset with Semi-automatic Annotations). We divide ROSSA into a training set (NO.1-NO.100 & NO.301-NO.918), a validation set (NO.101-NO.200) and a test set (NO.201-NO.300).

## 4 Experiments

### Datasets and Experimental Settings

Experiments are conducted on OCTA-500 and ROSSA datasets. OCTA-500 has two subsets: OCTA_6M and OCTA_3M, which contain 300 and 200 images respectively. For OCTA-500, the division of training set, validation set, and test set is the same as [7]. For ROSSA, please refer to 3.2 for the division of training set, validation set, and test set. We use the training set to train network parameters, use the validation set to select the best model and use the test set for evaluation.

Our methods are implemented with Pytorch using an NVIDIA A100 Tensor Core GPU. We use the Adam optimizer with a learning rate of \(1\times 10^{-4}\) and train the network for a total of 300 epochs. The batch size is set to 2. The loss function is the Dice loss, which is defined as follows:

\[DiceLoss=1-\frac{2|X\cap Y|}{|X|+|Y|} \tag{1}\]

The Dice score is used as the evaluation metric to choose the best model, which is defined as follows:

\[Dice=\frac{2|X\cap Y|}{|X|+|Y|} \tag{2}\]

where X is the predicted vessel mask and Y is the ground truth vessel mask.

### Results

All methods are evaluated using Dice(%) and Acc(%). We take the mean and standard deviation (\(mean\pm std\)) of 5 experiments. We compare our proposed network with UNet[11], UNet++[18], ResUNet[19], OVS-Net[8] and FARGO[5].

The results are tabulated in Table 1. As can be seen from the table, our proposed method achieves higher mean values on Dice and Acc scores for most of the datasets. Although

Figure 4: An example of using SAM to annotate vessels. Green represents positive prompts, red represents negative prompts, and yellow represents the output vessel mask. (a) A prompt. (b) Added another prompt. (c) The final annotation with all prompts.

Figure 3: The original ConvNext Block and our designed Recurrent ConvNeXt Block
FARGO[5] sometimes achieves better Dice scores, its fluctuations (standard deviation) are significantly larger, which means that its results are unstable. In contrast, the standard deviation of our proposed method is very small, which makes it stable in training and easy to reproduce. We believe this is a benefit due to the simplicity of our proposed architecture.

We can see that the number of parameters of FRNet and FRNet-base is more than two orders of magnitude lower than the opponent (e.g. FRNet's 0.13M vs. FARGO's 17.52M). And their inference speed is also faster than that of their opponents. This proves that our proposed method is more efficient. We expect that they will be more suitable for industrial applications.

### Ablation Study

#### 4.3.1 Contribution of Components in FRNet

In Table 2 we investigate the contributions of different components to FRNet's performance. Experiments are conducted on the ROSSA dataset. The first line represents only using Residual Block[16], which is the same as FRNet-base. The second line represents using ConvNeXt Block[15] to replace the Residual Block. The reduction in the number of parameters is due to the use of depthwise separable convolutions in ConvNeXt. The third line represents the use of 3x3 convolution to replace the 1x1 convolution in the ConvNeXt Block. As the number of parameters increases, the accuracy also increases. The fourth line represents the application of recurrent convolution, which achieves the best accuracy. And recurrent convolution will not increase the number of parameters, but will increase the inference time.

## 5 Conclution

In this work, we propose an accurate and efficient neural network(FRNet) for retinal vessel segmentation in OCTA images. By applying the modified Recurrent ConvNeXt Block to a full resolution convolutional network, the proposed model, with very tiny model size, can run faster and more accurate than opponents. Besides, we create a new dataset(ROSSA) containing 918 OCTA images and their corresponding vessel annotations. We use Segment Anything Model (SAM) to semi-automatically annotate images, which greatly speeds up the annotation work. The datasets and new annotation pipelines we provide can help solve the problem of lack of data in the medical field.

## Acknowledgement

This work is supported by the Chongqing Technology Innovation \(\&\) Application Development Key Project (cstc2020jscx; dkwtBX0055; cstb2022tiad-kpx0148).
