Jinqing Liang
Instructor: Prof. Ergun Simsek
Instructor: Prof. Ergun Simsek
An aneurysm is an enlarged part or a bulge on an artery due to the weakness of the arterial wall. An aneurysm is a potential threaten to life but can be easily ignored because there are no symptoms before the rupture. A ruptured aneurysm usually leads to fatal complications including life-threatening internal bleeding. One in fifty people in the United States has an unruptured brain aneurysm. There are 30,000 people in the United States each year suffer from the fatal outcomes of a ruptured aneurysm in brain. The brain aneurysms cause 500,000 deaths worldwide each year. The early detection of unruptured aneurysms is critical to save thousands of lives. The emerging of deep learning and its application in medical imaging field inspires me to detect aneurysm by neural networks [1-2].
Data resourse: IntrA.zip and geo.zip
The Dataset, IntrA includes three kinds of files, Generated, Annotated and Complete [3].
Generated files: Total 1694 .ad files. and corresponding 1694 .obj files - These are the generated blood vessels.
Generated aneurysm has total 215 .ad files and corresponding 215 .obj files.
Annotated files: Total 116 .ad files and corresponding 116.obj files - These are the blood vessels with annotations.
Complete files: Total 103 .obj files - These files include complete brain blood vessels.
Neural Network Training - PointNet
The traditional way of aneurysm detection is based on 2-D convolution neural network using a series of 2-D images [4-8]. However, the detection of an aneurysm heavily relies on its 3D structures. In this study, the 3D models of blood vessels are adopted for better representation of its 3D structural features. The 3D modeling of an object includes Polygonal mesh, Voxel(Volumetric pixel), Point Cloud. There are several neural networks tailored for 3D datasets [9-12].
Polygonal mesh is a collection of vertices, edges, and faces which define the shape of the polyhedral object [13].
Voxel(Volumetric pixel) only represents a value for a regular grid in 3-D spaces. For 2-D images, pixels do not typically have their position which is explicitly encoded with their value. its' position in the data structure always makes up a single volumetric image by rendering system [14].
Point Cloud is a set of data points in space which represent the 3-D shape of an object. Each point has its set of X, Y, and Z coordinates. which is generally produced by 3-D scanners or photogrammetry software, which measures many points on the external surfaces of objects around them. As the output of 3-D scanning processes, point clouds are used for computer-aided design models or for multiple visualizations, animation, and rendering applications [15].
Point cloud created by sampling points on the mesh surface in Annotated aneurysm.
The first version of the training pipeline.
Data Preparation ( I will use the Generated file, 1694 vessel samples, and 215 aneurysm samples)
Sampling: 2D neural networks requires the training images have the same dimensions. This is also the same for 3D PointNet. But the "dimension" here refers to the number of points in an object, not the size. The 3D model of blood vessel are different in two aspects, first, the volume of blood vessel; second, the density of dots/points. To make the samples have the same points, random sampling was conducted to get the same number of points from the point cloud model. To make the sampling reflects the density of points in different regions of blood vessels, the sampling is based on the density of triangle mesh. If there are more triangles (which means more complex structure), more points are extracted from that region.
Data Normalization
The data normalization is to normalize the coordinates of points: X, Y, Z to [-1, 1].
Data Augmentation
Data augmentation is commonly used for increasing sample size and reduce the overfitting of neural networks. The Data augmentation involves the rotation of the 3D object and random Noise. 3D rotation is to rotate the point cloud along the Z axis to a random degree. Adding random noise is to add random numbers (0, 0.02) to all the X, Y, Z coordinates of the point cloud. Therefore the total number of points in the point cloud will not be changed.
Neural Network Modification
The neural network architecture of PointNet was constructed using Pytorch. The parameters like input size and output size are adjusted according to the blood vessel point cloud.
Training
I did some basic hyperparameter tuning. The epoch number is now set to 15. the initial learning rate is set to 0.001. Now I am using Adam as the optimizer which will change the learning rate adaptively.
Validation
Sample show with 250 points Sample show with 500 points
Rotation 2. Adding Noise 3. OverSampling
Loss function: NLLoss - Negative Log-Likelihood
optimizer: torch.optim.Adam
Learning rate: 0.001
Epoch: 160~
Transformers were first introduced by Goolge in 2017 for natural language processing [17]. Now, transformers have become a de-facto standard for NLP. Recently, transformers have been used as a deep learning model to bridge two domains - natural language processing and computer vision [18]. Vision transformer demonstrates excellent results compared to convolutional networks in image classification while requiring less computational resources.
Unlike the typical 2D images, the 3D point clouds can not take advantage of the traditional convolutional network because of its unstructured dataset with irregular domain and lack of order. The permutation invariant nature of transformers makes them more suitable for 3D point clouds. Guo et al. has developed Point Cloud Transformer (PCT), which introduced coordinate-based embedding, offset-attention and neighbor embedding. PCT achieves excellent performance on shape classification [19-20].
Although PCT has been applied in classification tasks of 3D point clouds, its application in 3D medical imaging has not been investigated. I have used PointNet to conduct aneurysm detections. Here I used a transformer, PCT for aneurysm detection and would like to see if the performance can be improved.
PCT follows the fundamental architecture of a typical transformer, which includes three main modules: Input or (word embedding), Positional or(order) encoding, Self-attention. Some novel features have been built into PCT to better accommodate the characteristics of point cloud datasets, for example, the positional embedding is discarded in PCT since the point’s coordinates already contain this information. These novel features are embedded in the following modules, Coordinate-based input embedding module, Optimized offset attention module, and Neighbor embedding module.
The PCT has three pipelines - encoder, classification, and segmentation/normal estimation. I focused on the classification in my project. The PCT transforms the input points into a new dimensional feature space, which characterizes the semantic affinities between points as a basis for the various point cloud processing tasks. Then, the embedded features are fed into 4 stacked attention modules (offset attention) to learn a semantically rich and discriminative representative for each point, followed by several linear layers to generate the output features [26].
Laplacian matrix L = D-E to replace the adjacency matrix E, D is the diagonal degree matrix [21-22].
Offset attention sharpens the attention weights and reduces the influence of noise, which is beneficial for downstream tasks.
Neighbor Embedding
To retrieve local geometric information, Neighbor Embedding is adopted in PCT, which enables the attention module to consider local groups of points containing semantic information instead of individual points [19, 23-25].
•Soft cross-entropy loss function
•Batch size 32
•Epochs: 150
•Stochastic gradient descent(SGD) optimizer with momentum 0.9
•Leaning rate (Initial learning rate 0.01 with cosine annealing schedule to adjust learning rate at each epoch)
[1] Aneurysm: Causes, symptoms, and treatments. (n.d.). Retrieved February 6, 2021, from https://www.medicalnewstoday.com/articles/156993#types
[2] Withers, K., Carolan-Rees, G., & Dale, M. (2013). PipelineTM embolization device for the treatment of complex intracranial aneurysms: A NICE medical technology guidance. In Applied Health Economics and Health Policy (Vol. 11, Issue 1, pp. 5–13). https://doi.org/10.1007/s40258-012-0005-x
[3] Yang, X., Xia, D., Kin, T., & Igarashi, T. (n.d.). IntrA: 3D Intracranial Aneurysm Dataset for Deep Learning. Retrieved February 6, 2021, from https://github.com/intra3d2019/IntrA.
[4] (No Title). (n.d.). Retrieved February 6, 2021, from https://sdbif.org/index/wp-content/uploads/2020/02/Differences-Between-Different-Head-Scan-Types.pdf
[5] Xu, Y., Fan, T., Xu, M., Zeng, L., & Qiao, Y. (n.d.). SpiderCNN: Deep Learning on Point Sets with Parameterized Convolutional Filters.
[6] Wang, Y., Bronstein, M. M., Solomon, J. M., Sun, Y., Liu, Z., & Sarma, S. E. (2019). Dynamic Graph CNN for Learning on Point Clouds. ACM Trans. Graph. 1, 1, Article, 1(1), 13. https://doi.org/10.1145/3326362
[7] Li, Y., Bu, R., Sun, M., Wu, W., Di, X., & Chen, B. (n.d.). PointCNN: Convolution On X-Transformed Points.
[8] Duan, H., Huang, Y., Liu, L., Dai, H., Chen, L., & Zhou, L. (2019). Automatic detection on intracranial aneurysm from digital subtraction angiography with cascade convolutional neural networks. BioMedical Engineering Online, 18(1), 110. https://doi.org/10.1186/s12938-019-0726-2
[9] Li, C. R. Q., Hao, Y., Leonidas, S., & Guibas, J. (n.d.). PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space.
[10] Qi, C. R., Su, H., Mo, K., & Guibas, L. J. (n.d.). PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation.
[11] Li, J., Gim, B. M. C., & Lee, H. (n.d.). SO-Net: Self-Organizing Network for Point Cloud Analysis. Retrieved February 6, 2021, from https://github.com/lijx10/SO-Net
[13] https://en.wikipedia.org/wiki/Polygon_mesh
[14] https://en.wikipedia.org/wiki/Voxel
[15] https://en.wikipedia.org/wiki/Point_cloud
[16] https://plotly.com/python/3d-mesh/
[17] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., ... & Polosukhin, I. (2017). Attention is all you need. arXiv preprint arXiv:1706.03762.
[18] Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., ... & Houlsby, N. (2020). An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929.
[19] Guo, M. H., Cai, J. X., Liu, Z. N., Mu, T. J., Martin, R. R., & Hu, S. M. (2020). PCT: Point Cloud Transformer. arXiv preprint arXiv:2012.09688.
[20] https://github.com/Strawberry-Eat-Mango/PCT_Pytorch
[21] https://en.wikipedia.org/wiki/Laplacian_matrix
[22] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E. Sarma, Michael M. Bronstein, and Justin M. Solomon. Dynamic graph CNN for learning on point clouds. ACM Transactions on Graphics, 38(5):146:1–146:12, 2019.
[23] https://discuss.pytorch.org/t/contigious-vs-non-contigious-tensor/30107/7
[24] https://pytorch.org/vision/stable/index.html
[25] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J. Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in Neural Information Processing Systems, pages 5099–5108, 2017.