Русский Українська
DonNTU Masters' portal

Maxim Kazantsev

Faculty of computer science and technology (CST)

Department of automated control systems

Speciality Information systems and technology in engineering and business

Three-dimensional images parallel segmentation tools development using swarm intelligence methods

Scientific adviser: CES, Assoc. Prof. Maxim Privalov

Abstract

Content

Introduction

The processing of digital images is an extremely important process that has a wide range of applications, ranging from determining the number of the participant's car to the detection of malignant neoplasms in the human body [1].

Segmentation is the process of dividing something into constituent parts, between which there are certain differences. In the case of digital images, segmentation is the process of distributing image pixels to groups within which a certain criterion for the similarity of elements remains. In turn, there is a certain difference between these groups.

Segmentation is one of the most important and difficult tasks in the field of digital image processing. To date, there are a significant number of methods and algorithms for segmentation; each of them has its own strengths and weaknesses. The main principles [2], on which algorithms of image segmentation are built are:

  1. Clustering
  2. Thresholds
  3. Region growing
  4. Graph partitioning

However, despite the diversity, there is no universal approach. Each field of application has its own specifics, because of which the requirements for the segmentation algorithm vary considerably.

1. Theme urgency

The current level of technology development in the field of computer diagnostics makes it possible to provide digitized high-resolution visual information.

Increasing the degree of detail of the image allows you to capture a greater amount of information, which in some areas will have a critical value. Proportional to the volume of information, the volume of images grows. This leads to the fact that existing methods of processing significantly lose efficiency. This situation contributes to the fact that the task of improving the speed and efficiency of image segmentation algorithms is becoming more relevant.

There is a need to find a solution that would provide a significant increase in the productivity of image segmentation methods.

The final qualification work is devoted to solving the problem of increasing the efficiency and productivity of image segmentation algorithms. To find the solution, we propose the use of roving algorithms on the hardware base of modern GPGPUs [3]. As a software platform, the standard of parallel computing OpenCL [4] is chosen, as well as cross-platform object-oriented high level programming language Java [5].

2. Goal and tasks of the research

The purpose of the research is to develop tools for the parallel segmentation of three-dimensional images using the methods of swarm intelligence. The main objectives of the research:

  1. Examine existing methods and algorithms for image segmentation, including based on the model of swarm intelligence behavior.
  2. To formalize the problem of three-dimensional medical images segmentation using swarm intelligence methods.
  3. Explore existing hardware and software platforms for parallel computing.
  4. Create and test the swarm segmentation algorithms parallelized using GPGPU-calculations.

Research object: methods for digital images segmentation.

Research subject: parallel image segmentation using swarm algorithms.

As part of the completion of the qualification master's work, receiving theoretical results in the following areas is supposed:

  1. Definition of the perspective variant of algorithmic basis of the developed tool.
  2. Finding the optimal method of image segmentation.
  3. Searching for the most appropriate software platform for parallelizing.
  4. Modification of the segmentation method in accordance with the requirements of the algorithmic and program basis.

To obtain an experimental evaluation of the theoretical results, it is necessary to develop segmentation tools. The development includes the following steps:

  1. Sequential image segmentation algorithm implementation using the graph partitioning method on the Java platform.
  2. Parallelization of the implemented segmentation algorithm using the OpenCL standard.
  3. Modification of the obtained algorithm program for the needs of three-dimensional images segmentation.

3. Three-dimensional images parallel segmentation based on the graph partitioning algorithm with the use of the swarm intelligence

The basis of the method [6] is the representation of the image in the form of a graph in which the vertices are the pixels of the image. The length of edges between vertices is defined by difference between characteristics of two neighboring pixels, on the basis of which segmentation is performed. The value of the edge length is calculated by the formula (1):

(1)

where Vi, Vj - i-th and j-th vertices, respectively, I(Pj) - characteristic of Pj pixel, on the basis of which segmentation is carried out.

The initial stage of the algorithm involves comparing the pixels with 4 (north, south, west, east) or 8 neighbors (intermediate ones are added) . This approach allows you to make a choice in favor of productivity or the quality of the final result. After passing this stage, a large number of disparate segments will be obtained. Further, according to criterion (2), these segments merge:

(2)

where Diff(C1, C2) - the least long edge between two compared segments, MInt(C1, C2) - the smallest of the maximum differences in segmentation characteristics within the segments. Schematically, the segments merge can be represented as follows (Figure 1):

Fig. 1. Segments merging

In practice, considering program implementation of this algorithm, a more effective approach is to process the array of graph edges, sorted by non-decreasing edge weight. Each edge is checked for the possibility of merging the segments it connects. It should be understood, that at the initial stage, each pixel represents its own segment.

This algorithm is well scalable and allows you to determine the final result, based on current priorities in the direction of improving quality and, as a result, complexity, or in the direction of increasing productivity while maintaining the minimum acceptable quality of the segmentation result.

In addition to the already mentioned possibility of adjusting the number of edges in the graph, there is a method for modifying the calculated formula for the pixels difference (3):

(3)

In the formula: xi, yi, zi - pixel coordinates, ri, gi, bi - its indicators for each of the color components of the RGB model . Such a calculation method will allow determining more accurately the image disparate areas, which belong to the same object.

The variables in this formula are determined by the fact that the values of the RGB color model are taken as the estimated pixel characteristics for segmentation. In addition to them, the coordinates of the pixel in three planes (we are talking about three-dimensional images) are added to the formula.

This is just one of the variants of the calculation formula structure. The flexibility of the chosen algorithm provides an opportunity to select the optimal characteristics of pixels that will allow performing high-quality segmentation based on the estimation of the parameters of the original image. Consequently, it is possible to use additional models that will allow an effective evaluation of the original image and on its basis determine the values to be used for segmentation.

At the current stage of the final qualification work implementation it is expected [7] to use the swarm algorithm to efficiently distribute the power of the selected hardware base.

The nature of the bee colony algorithm implies its outstanding level of efficiency when performing the task of distributing available labor resources, which in this case are computing elements of a graphic accelerator capable of performing various tasks in parallel.

Optimization of load distribution using the bee colony algorithm requires a preliminary estimate of the volume and some other criteria for input information.

The basis of the sending approach is the distribution of pixels initial image into a number of blocks on a particular criterion. For each such a block, according to the formula (4), the quantity in the allocated computing elements will be calculated:

(4)

where bi - the number of block computational elements, B - the global number of computational elements of the current hardware platform, f(xi) - the value of the objective function of the block, which depends on its size, min(F(X)) and max(F(X)) - the minimum and maximum values of the objective function among all the blocks, respectively.

Within each block, the allocated elements should be divided into actual working groups, the size of which is determined by the specifications of the chosen software platform of parallelization, as well as the physical structure of the current hardware base.

Key point s image segmentation method described can be schematically represented as follows (Figure 2):


Fig. 2. Segmentation algorithm (Animation: 133 kb, 8 frames, unlim. repeatings number)

It is assumed that the software basis for parallelizing the presented algorithm will be the universal cross-platform standard for parallel computing OpenCL. Among all leading standarts in parallel calculations (CUDA, OpenCL, OpenMP, etc.), the selected one is cross-platform and easily integrated into various systems, the lag in performance from the primary competitor in the face of CUDA is insignificant and with the release of new versions of the standard is becoming even less [8].

To date, a sequential version of the algorithm has been implemented. It is able to segment two-dimensional medical images of MRI, 512 by 512 pixels in size. The program implementation is provided by the Java platform.

During the experiment, image segmentation was carried out by multiple versions of algorithm (using 4-connected and 8-connected graph) for different values of the argument k. The results of time measurements are shown in Table 1.


Table 1. Results of the experiment
Connectedness of a graph k Time elapsed, sec
1 4 300 31,188
2 4 3000 27,438
3 4 30000 30,971
4 8 300 35,094
5 8 3000 34,693
6 8 30000 35,024

The experimental results indicate that, at this stage of the algorithm, the use of 4-connected graph does not give major execution speed advantages. At the same time, from a subjective point of view, the 8-connected graph provides a higher level of quality of the final result. Fig. 3 shows the original image used in the experiment.


Fig. 3 Original image

Figures 4(a) and 4(b) show the results of image segmentation at a value of k = 3000.


a) Using a 4-connected graph
b) Using a 8-connected graph

Fig. 4. Segmentation results

Conclusion

Final qualifying master’s work is devoted to the research of methods for image segmentation and parallel segmentation tools development, which in the end would reduce the complexity of developing systems, which have medical digital image processing modules as their cores.

At current stage of work performance, the following objectives were achieved:

  1. The research of image segmentation existing methods and algorithms, in particular, based on modern hardware and software platforms were carried out.
  2. The use of heuristic algorithms in tasks of images segmentation was researched.
  3. Promising version of the algorithm, which is able to be the core of the developed tool was identified.
  4. Software and hardware platforms meeting the requirements for future research were chosen.
  5. Mathematical formulation of image segmentation problem using graph partition algorithm, as well as methods of artificial bee colony swarm intelligence was made.
  6. The initial version of the sequential algorithm presented for the needs of two-dimensional image segmentation was implemented.
  7. We obtained the first practical results of research and development.

A further area of research and development will be:

  1. Searching for the optimal set of characteristics of the image that will form the basis of the calculation formula of the pixels difference. Involvement of additional models and algorithms for the determination of such a set is possible.
  2. Modification of the obtained algorithm with purpose of enabling segmentation of three-dimensional images.
  3. Implementation of working prototype of the parallel image segmentation module based on the selected software platform.

Work is not completed yet. Completion is scheduled for May 2018. The full text and materials on the topic can be obtained from a student or his supervisor only after the specified date.

References

  1. Сегментация (обработка изображений) [электронный ресурс]. / Материал из Википедии, свободной энциклопедии. Режим доступа: https://ru.wikipedia.org/wiki/...
  2. Сегментация изображений [электронный ресурс]. Режим доступа: https://habrahabr.ru/post/...
  3. CUDA: Как работает GPU [электронный ресурс]. Режим доступа: https://habrahabr.ru/post/...
  4. OpenCL: Что это такое и зачем он нужен [электронный ресурс]. Режим доступа: https://habrahabr.ru/post/...
  5. Java [электронный ресурс]. / Материал из Википедии, свободной энциклопедии. Режим доступа: https://ru.wikipedia.org/wiki/...
  6. Эффективная сегментация изображений на графах [электронный ресурс]. Режим доступа: https://habrahabr.ru/post/...
  7. М.А. Казанцев Параллельная сегментация трехмерных изображений на основе алгоритма разбиения графа с применением роевого интеллекта / М.А. Казанцев, М.В. Привалов // Сборник статей студенческой научно-технической конференции «В мире компьютерных технологий» – Севастополь, 2017 – С.43-47.
  8. K. Karimi A Performance Comparison of CUDA and OpenCL / K. Karimi, N. G. Dickson, F. Hamze – D-Wave Systems Inc., Canada, 2010.