Downhole Track Detection via Multiscale Conditional Generative Adversarial Nets

04/17/2019 ∙ by Jia Li, et al. ∙ Hefei University of Technology 2

Frequent mine disasters cause a large number of casualties and property losses. Autonomous driving is a fundamental measure for solving this problem, and track detection is one of the key technologies for computer vision to achieve downhole automatic driving. The track detection result based on the traditional convolutional neural network (CNN) algorithm lacks the detailed and unique description of the object and relies too much on visual postprocessing technology. Therefore, this paper proposes a track detection algorithm based on a multiscale conditional generative adversarial network (CGAN). The generator is decomposed into global and local parts using a multigranularity structure in the generator network. A multiscale shared convolution structure is adopted in the discriminator network to further supervise training the generator. Finally, the Monte Carlo search technique is introduced to search the intermediate state of the generator, and the result is sent to the discriminator for comparison. Compared with the existing work, our model achieved 82.43% pixel accuracy and an average intersection-over-union (IOU) of 0.6218, and the detection of the track reached 95.01% accuracy in the downhole roadway scene test set.



There are no comments yet.


page 1

page 3

page 4

page 6

page 7

Code Repositories


Partial data set for the paper "Downhole Track Detection via Multi-Scale Conditional Generative Adversarial Nets"

view repo
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

In recent years, the frequent occurrence of large-scale mine accidents has caused a large number of casualties and property losses. The production and transportation in mining need to be developed in an unmanned and intelligent direction. Track detection is one of the key technologies in computer vision for underground automatic driving. Track detection refers to recognizing the track area in a video or image by image processing technology, which shows the specific position of the track line. It can assist in the detection of pedestrians and obstacles and further improve the driving safety of underground locomotives. However, underground track detection is easily affected by complex environmental factors, such as light changes, water cover and cable interference; thus, in recent years, track detection has become a challenging task in studying computer vision.

Track detection algorithms based on traditional image processing can be roughly divided into two categories: feature-based methods and model-based methods. Feature-based track detection technology [1, 2] mainly uses feature information such as track edge, texture, color, geometry and gray value to distinguish the track area from the surrounding environment. However, this method relies too much on the underlying features of the image and the surrounding environment easily interferes. The basic principle of the model-based track detection method [3] is to transform the track detection problem into a problem of solving the track model parameters. According to the track pattern in the local area, the fitting of the track line is achieved by using a segmentation line to describe the model. However, the algorithm lacks the robustness and flexibility for any road shape.

Recently, the deep convolution neural network (DCNN) has been successfully applied to many different computer vision tasks. The problem of track line detection is solved as an image segmentation task [4, 5]

. The network predicts the pixels at the position of the track, then combines the pixels of the same track, and finally displays the position of the track line in the target image. However, the problem of downhole track detection scenes is not a direct classification task for track line pixels. Moreover, the prediction of the track line needs to preserve the structure or quality of the equivalent track, that is, the fineness and uniqueness of the track line. In addition, in the process of training, it is necessary to manually design a complex loss function that is suitable for improving the final detection effect.

Another method for solving the above problem is to use a generative adversarial network (GAN) [6]. The GAN contains two opposing models: a generative model G for fitting the sample data distribution and a discriminative model D for judging the true and false data. However, one of the disadvantages of GANs is that data generated are uncontrollable. The conditional generative adversarial network (CGAN) [7] adds an additional conditional y to generator and discriminator on the basis of a GAN. The generator must generate a sample that matches the condition y. The discriminator must determine not only whether the image is true but also whether the image and the condition match. Some scholars have achieved good results in image generation via CGANs. Isola et al. [9]

proposed a network called the pix2pix framework for paired image transformation based on a CGAN. This method has achieved good results. However, the model is limited to generating low-resolution images. Chen and Koltun

[10] used modified perceptual loss [11, 12, 13] to generate images. Although models can generate high-resolution images, generated images often lack fine detail and realistic texture.

In view of the shortcomings of previous works, this paper proposes a downhole track line detection model based on a CGAN. We use the method of adversarial learning to solve the problem of artificially designing complex loss functions and introduce a Monte Carlo search to solve the problem of generating image distortion and lack of precision. In summary, the paper makes the following contributions:

  • This paper introduces the method of adversarial learning in the field of track line detection for the first time and proposes generator and discriminator networks based on a multiscale structure so that the generator obtains sufficient global and local information in the process of generation.

  • To strengthen the constraints in the image generation process, this paper introduces the Monte Carlo search technology to the generator and solves the problem of image distortion and lack of detail.

  • To promote the fusion of global and local information, this paper introduces a multitask learning strategy based on parameter sharing in the discriminator network, which indirectly expands the storage capacity of the discriminator model and accelerates the model convergence.

  • The experiments prove that compared with the previous work, the accuracy of the track recognition of the proposed model reaches 95.01%, an image with resolution up to 2K can be generated, and the details and texture of the images are greatly improved.

The structure of the rest of the paper is as follows. The second section introduces the proposed model. The third section shows the experiment preparation. The fourth section analyzes the experimental results, and the fifth section gives the conclusions and future work.

Ii Related Work

Ii-a Image-to-image translation

Many researchers have leveraged adversarial learning for image-to-image translation [9], which translates an input image from one domain to another domain given input-output image pairs as training data. CGANs aim to model the conditional distribution of real images given the input semantic label maps via the following minimax game:

where the objective function is given by:

Adversarial loss has become a popular choice for many image translation tasks because the discriminator can learn the trainable loss function and automatically adapt to the differences between the generated and real images in the target domain. For the purpose of this paper, the goal is to input an image containing a downhole track line, and generator G generates an image that marks the existing track line. In other words, the training dataset is given as a set of pairs of corresponding images ,where is a semantic label map, and is the corresponding natural image. However, in the application of downhole roadway scenes, the results generated by pix2pix are limited to low-resolution images. The generated image still has a large gap from the real sample, and the image still lacks texture and details.

Ii-B Track line detection

We also discuss other related methods for track detection. In the feature-based approach, Quach et al. [1] proposed color and depth information recorded using a single RGB-D camera to better handle unfavorable factors such as lighting conditions. However, since this method relies on the underlying features of the image, environmental factors easily interfere, making the algorithm less robust. Model-based methods, such as Bente et al. [3] proposed a lane detection method using the Hough transform and contour detection. They determine the corresponding model parameters by analyzing the target information in the road image. However, a road model often cannot adapt to multiple road conditions at the same time.

Additionally, some scholars have proposed using DCNNs to detect lane lines. In [4], Pan trained a spatial convolutional neural network (CNN) for specific problems and added postprocessing techniques that rely on handcrafting. Another recent example is the work of Neven et al. [5], which first used a segmentation network to obtain a lane marker prediction map. The second network was then trained to perform a constrained perspective transformation, and finally, the network used curve fitting to obtain the final result. However, their method relies on more postprocessing techniques, which increases the complexity of the actual application of the model.

Iii Multi-dimensional Generative Adversarial Model

Iii-a Multi-granularity generator

Referring to the hierarchical reinforcement learning in

[20], we decompose the generator into two sub-generators and , where is the global generator, is the local generator, and the overall structure of the generator is shown in Fig. 1. The global generator is mainly used for the overall information construction of images. The local generator can effectively improve the resolution of the generated image.

Fig. 1: Multigranularity generator network structure

The global generator of the model proposed in this paper is designed based on the work in [13]. It consists of 3 components: a convolutional frontend , a set of residual blocks , and a transposed convolutional backend . A semantic label map of resolution 1024*512 is passed through the 3 components sequentially to output an image of resolution 1024*512. The local enhancer network also consists of 3 components: a convolutional frontend , a set of residual blocks , and a transposed convolutional backend . The resolution of the input image to is 2048*1024. Different from the global generator network, the input to the residual block is the elementwise sum of two feature maps: the output feature map of and the last feature map of the backend of the global generator network , which helps to integrate the global information from to .

Iii-B Multi-scale shared convolution discriminator

Fig. 2: Multiscale shared convolution discriminator structure

To differentiate high-resolution real and synthesized images, we propose multiscale discriminators. We use 3 discriminators that have an identical network structure but operate at different image scales and the overall structure of the discriminators is shown in Fig. 2. To promote the learning of each discriminator, the model introduces a multitask learning strategy based on parameter sharing [21]. We first extract the images and generate the primary features of the images through a shared convolutional layer and obtain the corresponding feature map. Then, the feature samples of the real sample and the generated sample are downsampled using 2 and 4 as sampling factors, respectively. The three discriminators , , and , are also used to process these three different scale images. A discriminator with a large input scale has a more global perception of the image and can guide the global generation of the image. A discriminator with a smaller input scale is better at guiding the details of the generated image to further improve the overall image. In addition, the introduced multitask learning strategy greatly increases the storage capacity of the discriminator, so that the discriminator has more memory for learning how to discriminate the image and accelerate the convergence of the model. The specific process is as follows:

where represents one of the three discriminators.

Iii-C Optimization algorithm based on a Monte Carlo search

We note that such a multiresolution pipeline is a well-established practice in computer vision [22, 23], and a two-scale pipeline is often enough. The experimental results show that although the performance improved, the generated images have the disadvantages of blurring and ghosting. Thus, this paper introduces the Monte Carlo search technology to the model so that the generator can obtain guidance information rapidly when generating images. By searching the intermediate state of the generator multiple times and then sending the search results to the discriminator to calculate the penalty values, the generator constraints in the generation process are strengthened, and the quality of the generated image is further improved. The search process is shown in Fig. 1. First, the model uses G to perform a Monte Carlo search on the intermediate state of the generator. The specific process is as follows:

where N represents the number of searches. represents the state of the simulation using the Monte Carlo search. represents another generator virtualized by the Monte Carlo search technology, which has the same parameters as the actual generator. represents the intermediate state to be sampled. represents the final state obtained after sampling. After obtaining the N sampling results, the final states are sent to the discriminator, and the corresponding loss value is calculated by equation (1). The specific process is as follows:

where represents one of the three discriminators. To further strengthen the constraint, we refer to the perceptual loss in [11, 12, 13] and propose a feature matching loss. The model extracts features from different layers of the discriminator and learns to match these intermediate states. Here, is defined to represent the i-th layer feature extractor of discriminator ; then, the feature matching loss can be expressed as:

where T represents the number of network layers and represents the number of elements per layer. In summary, the final loss function is:

where represents the manually set weighting factor. It is worth noting that in feature matching loss, is used as a feature extractor and does not maximize loss.

Iv Experiments Preparation

Iv-a Datasets

Since there are currently no public datasets containing downhole track lines, we use video cameras fixed on mine locomotives to collect video data. The datasets include different scenarios from multiple mines. In actual data processing, we use data enhancement technology to expand the datasets. The specific transformations include image rotation transformation, mirror transformation, flip image transformation and other methods to effectively expand the datasets. We finally obtained approximately 2,500 pictures. The training set and the validation set are then divided in an 8:2 manner. More data can be obtained at

Iv-B Metrics

The experiments use the official indicators on the ground [24], namely, (accuracy), (false positive), and (false negative), which are defined as follows:

where is the number of correct prediction points generated during the test, and is the number of ground truths. When the distance between the predicted point and the real point is less than the set threshold (here, the threshold is set to 3), the point is considered correct.

where is the erroneously predicted track line, is the track line that needs to be predicted, is the track line that is mistaken for the ground truth, and is the number of all track lines.

Iv-C Training Details

All the networks are trained from scratch using the Adam solver and a learning rate of 0.05. We keep the same learning rate for the first 100 epochs and linearly decay the rate to zero over the next 100 epochs. Weights are initialized from a Gaussian distribution with a mean of 0 and a standard deviation of 0.02. The number of Monte Carlo searches N is set to 5, and the specific gravity

between the control feature matching loss and the discriminator loss function is set to 10. The implementation of our model is based on the PyTorch deep learning framework.

V Experiments

V-a Automatic Evaluation

To compare the model proposed in this paper with the existing ground lane detection algorithm, we transplant the existing ground lane detection algorithm to the underground for detecting the track line. The models involved in the contrast experiment are pix2pix in [9], spatial CNN (SCNN) in [4], LaneNet in [5], and segmentally switchable curves (SSC) in [26]. The average value of the multiple experiments is shown in Table 2.

Method Accuracy(%) FP FN
SCNN 93.26 0.0598 0.0269
LaneNet 92.87 0.0620 0.0312
SSC 89.64 0.0643 0.0393
pix2pix 92.89 0.0535 0.0297
Ours 95.01 0.0401 0.0186
TABLE I: Scores for testing our datasets using different methods

As shown in Table I, the model proposed in this paper obviously exceeds the previously existing models for this type of problem, both in terms of accuracy, FP and FN, which proves the superiority of the algorithm in this paper.

To verify the validity of the Monte Carlo search, we compare the model proposed in this paper with the model with the Monte Carlo search removed and explore the impact of the number of searches on the Monte Carlo search on the performance of the model where without MC represents the model with the Monte Carlo search removed, and N represents the number of Monte Carlo searches.

Method Accuracy(%) FP FN Average Time(s)
Without MC 90.25 0.1031 0.1002 0.2567
N=1 92.87 0.0901 0.0912 0.2678
N=3 93.09 0.0765 0.0703 0.2806
N=5 95.01 0.0401 0.0186 0.2962
N=7 95.68 0.0399 0.0176 0.3465
N=9 95.96 0.0365 0.0170 0.4031
TABLE II: Scores for testing our datasets using different methods

As shown in Table II, it can be seen that the introduction of the Monte Carlo search obviously significantly improves the accuracy, FP and FN of the final generated results. We found that with the increase in the number of searches, when N=5, both time-consumption and accuracy achieve better results. As N continues to increase, the accuracy, FP, and FN improve, but the increase is not large, and the average generation time of each image increased considerably because as the number of searches increases, the number of calculations required to generate each image gradually increases, and the increase is nonlinear, so the number of Monte Carlo searches is set to 5 by default.

To verify the effect of multiscale discriminator and multitask learning, we conduct a comparative experiment on the model proposed in this paper, the model with a multiscale discriminator network but no multitask learning and the network using only a single-scale discriminator. The generator and loss functions are fixed during this experiment. The experimental results are shown in Table 3. To avoid the contingency of the experiment, we repeat the experiment several times, and the data in the table are the average of the experimental data.

Single D Multiscale Ds Ours
Pixel accuracy 80.08 81.43 82.68
IOU 0.5125 0.5818 0.6351
TABLE III: Scores for testing our datasets using different methods

From Table III , we find that multiscale discriminator and multitask learning strategy can significantly improve the accuracy of the generated pixels because the multiscale discriminator makes the judgment of the generated pixel points stricter during the network training. The multitasking learning strategy allows the discriminator to learn more features, giving the generator more accurate guidance.

V-B Manual Evaluation

To further evaluate the model proposed in this paper, we adopt the method of manual evaluation. The existing platform for manual evaluation is MTurk (Amazon Mechanical Turk), so we use a similar method to publish the results of the experiment online to a website and send them to volunteers through social platforms.

For this task, based on the same input image, we use the CRN model and the model proposed in this paper to generate two images and participate in the comparison with the real image. To better reflect fairness, we sent two of the three images to volunteers almost simultaneously. The volunteers are required to select the most accurate and texture-clear images within a limited time. The limited time is from 125 ms to 8000 ms. The comparison results are shown in Fig. 3.

Fig. 3: Preference-time fluctuation graph
Fig. 4: Comparison of our model and SCNN network test results

It can be seen from Fig. 3 that as the limited time increases, the difference between the three images becomes more apparent. The final result shows that the model in this paper is obviously better than the CRN model, and the gap with the real images becomes increasingly smaller.

Fig. 5: The test result of our model in the complex scenes

Vi Conclusion and Future Work

Vi-a Case Study and Error Analysis

We conducted a comparative analysis experiment with the SCNN in the downhole roadway scenario. Fig. 4 shows some of the test cases. It can be seen that the images generated by our model are very detailed, and high-quality images can be generated for all the above scenarios. Our model can still accurately detect the tracks that are not marked in the training images, which fully demonstrates that the model has excellent robustness. The application of SCNN to the downhole scene also obtains good recognition results, but the robustness of the model is poor. In addition, the SCNN algorithm requires more postprocessing techniques, which improves the complexity of the visualization operation, and the detected results are not real. It can be seen from the above comparison experiments that our model has great advantages.

However, in the experiment, it is also found that if the scene in the image is very complicated (for example, more than four track lines and track lines are occluded), the result of our model will be affected. Because the track line recognition in complex scenes requires more adequate and accurate guidance information, but the repetitive search method for intermediate states does not effectively constrain the generation of generators for some complex scenes. The experimental results are shown in Fig. 5.

This paper proposes a downhole track line detection model based on a conditional adversarial generation network. The model realizes the generation of high-resolution downhole track line detection images by decomposing the generator into global and local generators. Then, the multiscale shared convolution structure is used in the discriminator network to further improve the overall image. The model uses Monte Carlo search technology to further improves the quality of the generated images. The experiments show that compared with traditional neural network detection models, the proposed model has better performance in terms of accuracy and other aspects and does not depend on cumbersome postprocessing techniques. In the future, we will focus on the detection of track lines in complex scenes and further improve the speed and robustness of the model.


  • [1] Quach C H , Tran V L , Nguyen D H, Real-time lane marker detection using template matching with RGB-D camera, IEEE 2018 2nd International Conference on Recent Advances in Signal Processing, Telecommunications and Computing, 2018.
  • [2] Li J Y, Jin L Z, Fei S M, et al, Urban Road Detection Based on Multi-scale Feature Representation, Journal of Electronics and Information Technology, 2014.
  • [3] Bente T F, Szeghalmy S, Fazekas A, Detection of lanes and traffic signs painted on road using on-board camera, IEEE International Conference on Future Iot Technologies, 2018.
  • [4] Pan X, Shi J, Luo P, et al,

    Spatial As Deep: Spatial CNN for Traffic Scene Understanding

    , AAAI Conference on Artificial Intelligence, 2018.
  • [5] Neven D, De Brabandere B, Georgoulis S, et al, Towards End-to-End Lane Detection: an Instance Segmentation Approach, 2018 IEEE Intelligent Vehicles Symposium, 2018.
  • [6] Goodfellow I J, Pouget-Abadie J, Mirza M, et al, Generative Adversarial Nets, Advances in Neural Information Processing Systems, 2014.
  • [7] Mirza M, Osindero S, Conditional Generative Adversarial Nets, arXiv preprint, 2014.
  • [8] Cao Y J, Jia L L, Chen Y X, et al, Review of computer vision based on generative adversarial networks, Journal of Image and Graphics, 2018.
  • [9] Isola P, Zhu J Y, Z T H, Efros A A,

    Image-To-Image Translation With Conditional Adversarial Networks

    ,The IEEE Conference on Computer Vision and Pattern Recognitio, 2017.
  • [10] Chen Q and Koltun V, Photographic image synthesis with cascaded refinement networks, 2017 IEEE International Conference on Computer Vision, 2017.
  • [11] Dosovitskiy A, Brox T, Generating images with perceptual similarity metrics based on deep network, In Advances in Neural Information Processing Systems, 2016.
  • [12] Gatys L A, Ecker A S, and Bethge T, Image style transfer using convolutional neural networks

    , 2016 IEEE Conference on Computer Vision and Pattern Recognition, 2016.

  • [13] Johnson A A, Lee F F,

    Perceptual losses for real-time style transfer and super-resolution

    , In European Conference on Computer Vision, 2016.
  • [14] Cameron B. Browne, Edward Powley, et al., A Survey of Monte Carlo Tree Search Methods, IEEE TRANSACTIONS ON COMPUTATIONAL INTELLIGENCE AND AI IN GAMES, 2012.
  • [15] Yu L, Zhang W, Wang J, et al., SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient, The AAAI Conference on Artificial Intelligence, 2016.
  • [16] Wang K, Wan X J, SentiGAN: Generating Sentimental Texts via Mixture Adversarial Networks, International Joint Conferences on Artificial Intelligence Organization, 2018.
  • [17] Sajjadi, M.S., Scholkopf, B., Hirsch, M, EnhanceNet: Single image super-resolution through automated texture synthesis, IEEE Conference on Computer Vision and Pattern Recognition, 2017.
  • [18] Dosovitskiy, A., Brox, T, Generating Images with Perceptual Similarity Metrics based on Deep Networks, Advances in Neural Information Processing Systems, 2016.
  • [19] Masashi Sugiyama and Qiang Yang, Perceptual Losses for Real-time Style Transfer and Superresolution,In: ECCV: European Conference on Computer Vision, 2016.
  • [20] Vezhnevets, A. S.; Osindero, S.; Schaul, T. et al, Feudal networks for hierarchical reinforcement learning,arXiv preprint, 2017.
  • [21] Zhang Y , Yang Q, A Survey on Multi-Task Learning, arXiv preprint, 2004.
  • [22] H. Dong, S. Yu, C. Wu, and Y. Guo, Semantic image synthesis via adversarial learning, In IEEE International Conference on Computer Vision, 2017.
  • [23] J. T. Guibas, T. S. Virdi, and P. S. Li, Synthetic medical images from dual generative adversarial networks,arXiv preprint, 2017.
  • [24] Davy Neven, Bert De Brabandere, Stamatios Georgoulis, et al, Towards End-to-End Lane Detection: an Instance Segmentation Approach,arXiv preprint, 2014.
  • [25] H.-Y. F. Tung, A. W. Harley, W. Seto,et al, Adversarial inverse graphics networks: Learning 2D-to-3D lifting and image-to-image translation from unpaired supervision, In IEEE International Conference on Computer Vision, 2017.
  • [26] Guo B; Dong Y, Railway track detection algorithm based on piecewise curve model,Journal of Railway Science and Engineering, 2016.