Mobile phone vein imaging method based on deep learning
Vein imaging is realized on mobile phones through deep learning and convolutional neural networks, which solves the problems of device dependence and high noise in the existing technology, and improves portability and imaging effects.
Patent Information
- Application Number
- CN202110796882.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-14
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-07-14
AI Technical Summary
Existing venipuncture auxiliary equipment relies on specific external equipment, has poor portability and high noise in imaging results, making it difficult to accurately determine the location of veins in a sealed protective clothing environment.
Using a deep learning-based mobile phone vein imaging method, by preprocessing and data enhancement of visible and near-infrared images, a convolutional neural network is constructed for vein feature extraction and visualization, and depth separable convolution is combined to lightweight the model. And use the NCNN framework to deploy the vein imaging algorithm on the mobile phone.
It achieves efficient and accurate vein imaging on the mobile phone, reducing dependence on external equipment. The imaging results have improved clarity and reduced noise, solving the problems of portability and noise.
Smart Images

Figure CN113643238B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing and deep learning technology, and in particular to a mobile phone-side vein imaging method based on deep learning. Background Art
[0002] In the medical field, venipuncture is an indispensable operation in today's medical treatment and nursing, and is used for clinical drug infusion and blood transfusion. The prerequisite for venipuncture is to determine the location of the vein. Usually, experienced medical staff determine the location of the patient's vein by eye observation and finger touch. Due to the high infectiousness of the virus, medical staff must wear protective gloves, protective clothing and goggles when treating infected patients. The airtight protective clothing makes it impossible to eliminate the heat generated by the body, and the water vapor generated by breathing adheres to the inner surface of the goggles, which greatly affects the vision. At the same time, protective gloves reduce the sensitivity of touch, which greatly increases the difficulty for medical staff to determine the location of the vein and then perform venipuncture.
[0003] In order to reduce the difficulty of venipuncture and improve the success rate of venipuncture, many venipuncture auxiliary devices or methods have appeared before, including imaging methods based on near-infrared light characteristics, imaging methods based on ultrasonic characteristics and imaging methods based on optical imaging principles. The venous imaging method based on near-infrared light characteristics mainly uses the characteristic that hemoglobin in the blood has a higher absorption rate of near-infrared light in the wavelength range of 780nm to 960nm than other body tissues. When irradiated with near-infrared light of the same intensity, with the help of a near-infrared camera, it can be observed that the location of the vein is darker than other skin areas, thereby determining the location of the vein. The imaging method based on ultrasonic characteristics uses the difference in acoustic characteristics between venous tissue and other body tissues, and the different reflection intensity of ultrasound waves to distinguish veins from other body tissues. Usually, ultrasonic venous imaging methods are also used in combination with ultrasonic contrast agents to improve the clarity and accuracy of imaging. The venous imaging method based on optical imaging principles uses KM theory to simulate the optical behavior of the skin, and combines a large number of biophysical parameters, spectral information of digital camera sensors and light source information that illuminates the skin to simulate the formation of skin color. This process is used as a forward model. A series of skin parameters, including melanin concentration, hemoglobin concentration and dermal depth, are input into the forward model to obtain the corresponding visible light image RGB values, and then these correspondences are used to train a shallow forward neural network, which uses RGB values as input to predict skin parameters. The output predicted skin parameters are collected to form three distribution maps: the spatial distribution of melanin and hemoglobin and the change in dermal depth. Finally, the texture information of subepidermal veins can be extracted through these distribution maps. The imaging method based on the characteristics of near-infrared light and ultrasonic characteristics needs to rely on specific external devices such as near-infrared light sources and ultrasonic transmitters, and is not portable. The imaging method based on the principle of optical imaging has the problem of large noise in the final imaging result due to single-pixel calculation. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention adopts a mobile phone-based vein imaging method based on deep learning. The method is based on the deep learning method and a mobile phone-based open source neural network reasoning framework. The method overcomes the problems of the existing vein imaging method relying on specific external equipment, poor portability and high noise in the imaging results.
[0005] The present invention is achieved in that:
[0006] Step 1: Processing of vein image datasets: Deep learning methods require real data as training sets to train network models. For the same-frame visible light images and near-infrared images obtained by original acquisition, certain preprocessing operations need to be performed on them, including the following:
[0007] 1) Contrast-limited adaptive histogram equalization (CLAHE) is performed on near-infrared images to enhance the contrast of near-infrared images and strengthen the vein information in the images;
[0008] 2) Perform median filtering on the near-infrared image after contrast-limited adaptive histogram equalization to remove the small amount of noise introduced by CLAHE in the previous step; the median filter replaces the value of the central pixel with the median of the pixel grayscale contained in the image area surrounded by the filter, as shown in formula (1):
[0009]
[0010] in is the median gray level of the pixels in the area. xy is the image area surrounded by the filter, and g(m,n) is the pixel value in the filter area;
[0011] 3) Data enhancement of image datasets: random chromaticity changes are performed on visible light images to simulate the differences in skin color between different people; visible light images are randomly rotated 15° to 45° counterclockwise, and horizontal and vertical flips are performed to simulate changes in shooting angles. In addition to chromaticity changes, the spatial changes made to the visible light images must also be made to the near-infrared images of the same frame to ensure that each pixel between a pair of images in the same frame is always one-to-one corresponding;
[0012] 4) Normalize the image data, count the pixel distribution of each image in the training set, select an image with a pixel value close to the mean as the reference image, and normalize the histogram of all images in the training set to avoid the difficulty of model training to converge due to the large difference in pixel data distribution between images;
[0013] 5) The original image is cut into image blocks of 192*128 size as training set data. This can remove useless background information outside the skin area, i.e., the area to be imaged. It can also reduce the problem of insufficient video memory when setting a larger batch processing value.
[0014] Step 2: Construction and training of vein imaging network; Convolutional neural network can preserve the positional relationship between pixels when processing images, and has a high degree of invariance to image rotation, translation and scaling, which is suitable for feature extraction of two-dimensional images. Convolutional neural network is selected as the basic neural network architecture to construct vein imaging network. The contents of network construction and training are as follows:
[0015] 1) The network is mainly divided into three parts: feature extractor part, joint upsampling part and upsampling restoration part. The feature extractor part performs convolution operation on the input image to extract the image feature map, in which some convolution layers will downsample the image to generate feature maps of different scales; the joint upsampling part upsamples the feature maps of different sizes obtained by the feature extractor part to the same size for splicing, and uses dilated convolution to extract features from the spliced feature maps again, in the hope that features of different sizes can be fused to obtain the scale and shape information of the vein; the upsampling restoration part upsamples the feature map output by the joint upsampling part so that the final output result map is the same size as the input image.
[0016] 2) The expected output result is an image with the same size as the input image showing vein information, so the imaging network adopts a fully convolutional structure and directly uses the feature map of the last convolutional layer as the output; and the output image should be as close to the value of the near-infrared image as possible, so the near-infrared image corresponding to the input image is used as the true image during network training, and the mean square error loss is used as the loss function to measure the difference between the output result and the true image. The loss function is divided into two parts. The first part is the mean square error loss between the network output result and the true image, denoted as A; the second part is to use the VGG16 network to extract feature maps of the network output result image and the true image, and perform mean square error loss on the feature maps of both, denoted as B. Finally, the loss function is determined as: Loss = 0.8*A+0.2*B.
[0017] 3) Training uses 5-fold cross validation. 90% of the images in the training set are divided into the training set, and 10% are divided into the validation set; the learning rate is denoted as lr, the total number of training rounds is epochs, the current training round is epo, and the learning rate is changed as shown in formula (2):
[0018]
[0019] Step 3: Lightweight the network model. The training of the venous imaging network is performed on the server side, but the memory and computing performance of the mobile phone are obviously not comparable to those of the server. In order to enable the final model to run normally on the mobile phone and shorten the forward calculation time of the network to a certain extent, the network model trained on the server side is lightweighted to reduce the number of network parameters and the amount of calculation.
[0020] Using depth-separable convolution instead of ordinary convolution in the original network model can reduce the number of network parameters and computation, and play a role in lightweighting the model. Assume that the number of input channels is M and the output feature map size is: D F *D F *N, the convolution kernel size is: D K *DK *M, a convolution layer filter contains N convolution kernels. The number of parameters of ordinary convolution is D K *D K *M*N, the number of parameters of depth-wise separable convolution is the number of parameters of grouped convolution plus the number of parameters of point-by-point convolution. The number of parameters of grouped convolution is D K *D K *M, the number of parameters for point-by-point convolution is M*N, so the total number of parameters for depth-separable convolution is (D K *D K +N)*M. The computational complexity of ordinary convolution is D K *D K *M*D F *D F *N, the computational cost of depth-wise separable convolution includes the computational cost of grouped convolution and the computational cost of point-by-point convolution. The computational cost of grouped convolution is: D K *D K *M*D F * D F *1, the computational complexity of point-by-point convolution is 1*1*M*D F *D F *N, so the total computational effort of depth-wise separable convolution is D F *D F *M*(D K *D K +N). The ratio of the number of parameters and the amount of computation for ordinary convolution and depthwise separable convolution is shown in equations (3) and (4):
[0021]
[0022]
[0023] In the convolutional layer, N is often large, taking the common convolution kernel size D K =3, we can see that after using depthwise separable convolution to replace ordinary convolution, the number of parameters of the convolution layer is about 1 / 9 of the previous one. In actual operation, not all convolution layers in the original imaging network are replaced by depthwise separable convolution, and after replacing the convolution layer with depthwise separable convolution, a set of pointwise convolution is added before the grouped convolution to increase the dimension of the input feature map, expand the width of the convolution layer, and generate more feature maps. However, thanks to the subsequent depthwise separable convolution, the number of parameters and the amount of calculation of the network model can still be well compressed.
[0024] Step 4: Deploy the network model on the mobile phone: In order to solve the problem of insufficient portability in vein imaging applications, the best way is to deploy the vein imaging algorithm on the mobile phone. Smartphones are almost inseparable from everyone nowadays, and using mobile phones to realize vein imaging will not cause any additional carrying costs.
[0025] We chose a smartphone with an Android system and an ARM-based CPU as the hardware platform in the deployment example. Due to the different chip architectures, the server-side neural network training framework cannot be deployed to the mobile phone. Therefore, we chose Tencent's open source mobile neural network inference framework NCNN as the mobile phone inference framework. In addition, to facilitate the processing of image data, the computer vision open source library OpenCV was configured.
[0026] 1) Network model file conversion: Since the server uses the PyTorch framework to train the network model, and the NCNN framework and the PyTorch framework require different weight file formats, it is necessary to convert the parameter weight file saved in the PyTorch framework to a format that can be loaded by the NCNN framework. You can call the torch.onnx.export() method to convert the original PyTorch model weight file to the ONNX format, and then to the format required by NCNN;
[0027] 2) Application project construction: Use Android Studio as the development environment, build a project with the converted model weight file and the compiled NCNN_Android and OpenCV_Android libraries, and deploy the vein imaging algorithm to the mobile phone in the form of an APP.
[0028] The beneficial effects of the present invention compared with the prior art are:
[0029] The present invention is based on a combination of deep learning methods, semantic segmentation, and mobile terminals. Deep learning methods have achieved great success in the field of computer vision, and semantic segmentation is a common task in this field. Semantic segmentation assigns a predefined label representing its semantic category to each pixel in the image, detects object information of a certain category in the image and segments it out, which can be used to extract specific information in the image. Venous imaging can be understood as a semantic segmentation task to a certain extent, which segments the vein patterns from the skin image to increase its visualization. In addition, smart phones are now popular and are almost inseparable from people. The deep learning-based vein imaging method is deployed on the mobile phone for implementation. Therefore, the present invention can well solve the portability problem in the vein imaging problem;
[0030] The present invention builds a lightweight imaging network model and deploys it to the mobile phone for operation, which effectively solves the problem of vein imaging's dependence on external devices, such as near-infrared light sources and even embedded development boards. Since smartphones have become people's daily necessities, there is almost no carrying cost. At the same time, compared with the imaging method based on optical principles, the obtained vein imaging results are smoother and the noise is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is the original near-infrared image collected in the embodiment of the present invention;
[0032] Figure 2 is a near-infrared image processed by contrast-limited histogram equalization (CLAHE) in an embodiment of the present invention;
[0033] Figure 3 is a CLAHE enhanced image after median filtering in an embodiment of the present invention;
[0034] Figure 4 is a schematic diagram of the imaging network structure in an embodiment of the present invention;
[0035] Figure 5 is a schematic diagram of the structure of a joint upsampling module in an imaging network in an embodiment of the present invention;
[0036] Figure 6 This is the first set of examples of the display network of the present invention running on a computer, where (a) is a visible light image, and (b) is the display result corresponding to (a);
[0037] Figure 7 is a second set of examples of the display network of the present invention running on a computer, wherein (a) is a visible light image, and (b) is the display result corresponding to (a);
[0038] Figure 8 is a comparison diagram of ordinary convolution and depthwise separable convolution in an embodiment of the present invention;
[0039] Fig. 9 It is a schematic diagram of the basic module structure after ordinary convolution is converted into depth-separable convolution in an embodiment of the present invention;
[0040] Fig.10 1 is a first set of mobile phone operation display result diagrams in an embodiment of the present invention; (a) is a visible light image selection interface, and (b) is a display result interface corresponding to the visible light image selected in (a);
[0041] Fig.11 This is the second set of mobile phone operation display result diagrams in an embodiment of the present invention; wherein (a) is the visible light image selection interface, and (b) is the display result interface corresponding to the visible light image selected in (a). DETAILED DESCRIPTION
[0042] The present invention is further described below in conjunction with the accompanying drawings. The following examples are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention. In the description of the patent of the present invention, it should be noted that the term "includes", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, in addition to including those listed elements, it may also include other elements that are not explicitly listed.
[0043] The mobile phone vein imaging method based on deep learning of the present invention includes four parts: vein image data set processing, vein imaging network construction and training, network model lightweight and network model mobile phone deployment. The specific implementation steps are as follows:
[0044] Step 1: Processing of vein image data set; The vein imaging algorithm in the present invention is a method based on deep learning. Deep learning cannot be separated from the support of real data, so the first thing to do is to collect data related to the task requirements as real data for the deep network to "learn" its intrinsic characteristics, and then generalize to the same type of problems. Considering that the veins in the arm area are often relatively abundant and daily medical infusions are mostly in the hand area, the arm area is selected as the image acquisition area. During the specific acquisition, the dual CCD camera JAI-AD080CL is used to capture the arm image. The camera has a built-in spectroscopic prism that can send the incident light into two separate channels at the same time-the visible light channel (400nm to 700nm) and the near-infrared channel (750nm to 920nm), providing synchronous images of different spectra. In this way, visible light images and near-infrared images that completely correspond to the arm area can be collected. The original near-infrared image collected is as shown in the figure. Figure 1 The original image is not suitable to be used as training data directly, so the collected original data is preprocessed.
[0045] (1) The location of veins can be seen in the original near-infrared image, but the veins in some images are relatively shallow. In order to highlight these less obvious veins, the original near-infrared image is subjected to contrast-constrained histogram equalization (CLAHE) to enhance the contrast between the veins and the skin and highlight the location of the veins. Figure 2 As shown;
[0046] (2) After CLAHE processing, some salt and pepper noise will appear in the images. Applying median filtering to these images can effectively suppress this noise, such as Figure 3 As shown;
[0047] (3) Cut the aforementioned near-infrared image and its corresponding visible light image into 192*128 image blocks to exclude irrelevant background and reduce the size of the input training image;
[0048] (4) Perform data augmentation on image patches, including random chromaticity transformation, random rotation from 15° to 45° counterclockwise, and horizontal and vertical flipping to expand the dataset;
[0049] (5) Data normalization is a very important operation in deep learning. The pixel distribution patterns of images taken by different cameras are different. When the pixel distribution patterns of different images are too different, it will make it difficult for the model to converge. To this end, the pixel averages of each channel of the visible light image in the data set are calculated, and a visible light image closest to the average value and its corresponding near-infrared image are selected as the reference image. The other images in the data set are histogram-normalized so that the pixel distribution patterns of other images are similar to the reference image.
[0050] Step 2: Construction and training of the imaging network:
[0051] (1) Convolutional neural network is selected as the basic neural network architecture. The network structure diagram is as follows Figure 4 As shown. The network is divided into a feature extractor part, a joint upsampling part and an upsampling restoration part. Considering that the final network model will be deployed on the mobile phone, the network model should avoid too many parameters and too much calculation. The network scale should be controlled at the beginning of network design to avoid over-reliance on the subsequent model lightweighting. Therefore, the feature extractor part does not directly use the currently widely used network models such as VGG16 and ResNet50. Instead, a shallow feature extractor is built based on convolution operations. The feature extractor part contains three downsampling operations to extract feature maps of different sizes. The joint upsampling part upsamples the three different sizes of feature maps obtained by the feature extractor part to a uniform size and then splices them, and further performs dilated convolution on the spliced feature map, and uses the feature map after the dilated convolution as the output of this part, as shown Figure 5 As shown. The upsampling restoration part upsamples and further convolves the output feature map of the previous part, so that the final output result map has the same size as the input image. The batch normalization layer is used after the convolution layer to speed up the training convergence speed and suppress the gradient disappearance. The activation function is PReLU, which is defined as shown in formula (5):
[0052]
[0053] The initial value of a is usually a positive number less than 1, such as a=0.25, and the value of a can be updated during training. PReLU does not discard all negative axis information but gives it a smaller weight, which can improve the nonlinear factor to a certain extent.
[0054] (2) Network training was performed on a server with an Intel Xeon CPU and an NVIDIA Titan X plus (TITANXp) graphics processing unit. Python 3.6 was used to build the training environment. With the help of opencv-python, numpy and other tool libraries for image processing and matrix operations, the efficiency of loading and processing image data was improved. PyTorch was used as the deep neural network training framework. 5-fold cross validation was used for training. 90% of the 1200 image blocks obtained after cropping and enhancement were divided into training sets and 10% into validation sets; batch size was set to 4 and the total number of training rounds was set to 100. The initial learning rate was set to 4×10 during network training. -4 After 10 rounds of training, the learning rate decays to 2×10 -4 After 20 rounds of training, the learning rate decays to 1×10 -4 After 30 rounds of training, the learning rate decays exponentially, and the learning rate of each round decays to 0.9 of the learning rate of the previous round. The loss function uses the mean square error loss function, which includes two main parts: the first part is the pixel-by-pixel loss of the result image output by the network and the true value image, denoted as A; the second part is to use the VGG16 network to extract features from the result image output by the network and the true value image, and then perform pixel-by-pixel loss on the feature maps extracted from the two, denoted as B. The total loss function can be recorded as Loss = 0.8 × A + 0.2 × B. The network imaging results are shown in Figure 6 and Figure 7 shown.
[0055] Step 3: Lightweight imaging network
[0056] Using depth-wise separable convolution to replace some convolutional layers in the visualization network can reduce the number of network parameters and the amount of calculation. The schematic diagram of ordinary convolution and depth-wise separable convolution is as follows: Figure 8 As shown in Figure 1. Before group convolution, point-by-point convolution is used to increase the dimension of the feature map, expand the width of the corresponding convolution layer, and generate more feature maps. The basic module structure diagram after replacing ordinary convolution with depth-separable convolution is shown in Figure 1. Fig. 9 shown.
[0057] Step 4: Deploy the network model on mobile phone
[0058] (1) Compile and install NCNN, NCNN_Android, and OpenCV_Android on Windows;
[0059] (2) Convert the network weight file obtained from PyTorch training to the format required for loading by the NCNN framework. Calling the torch.onnx.export() method can convert the previously saved Pytorch model to the Open Neural Network Exchange (ONNX) format. The ONNX format uses the protobuf binary format to serialize the model. It is a multi-framework compatible model exchange format that can serve as a bridge for format conversion of multiple framework models. After converting the ONNX format model, use the Windows-side NCNN tool obtained by compilation to convert the ONNX format model into a weight storage format for NCNN to load and call, and obtain a network structure file with the suffix .param and a network weight file with the suffix .bin.
[0060] (3) Build the project in the Android Studio development environment. Use C++ language to call the relevant NCNN framework interface functions, load the network model for forward reasoning of the model, and realize the vein imaging of visible light images. Use Java language to build the main activities of the application, including reading and displaying images, and use the Java Native Interface (Java NativeInterface, JNI) to call the C++ files containing model loading and reasoning to realize the full functionality of the application. When creating a project, select Native C++ as the project template. Two cpp and java directories will appear under the src / main path of the new project folder. The cpp folder contains CMakeLists.txt and native-lib.cpp files, which are the project's build file and source file respectively. The source file contains the function of calling the forward calculation of the NCNN framework. The java folder contains the MainActivity.java file, which is used to build the main activities of the application, including reading images, calling the imaging function, and displaying the result image. After the project is built, you can select an image in the mobile phone album and then click the imaging button to get the imaging result image. The result of running the vein imaging algorithm on the mobile phone is as follows: Fig.10 and Fig.11 In this embodiment Fig.10 and Fig.11 These are two sets of display examples running on mobile phones. Fig.10 (a) with Figure 6 (a) is the same visible light image, Fig.11 (a) with Figure 7 (a) is the same visible light image, which is used to compare with the computer running example, indicating that the running result on the mobile phone is the same as that on the computer. Fig.10 (a) and Fig.11 (a) is the interface for selecting visible light images on the mobile phone. Fig.10 (b) and Fig.11 (b) respectively correspond to Fig.10 (a) and Fig.11 (a) The mobile phone display result interface of the selected visible light image.
[0061] After comparing the above-mentioned multiple groups of pictures, the imaging results on the mobile phone are completely consistent with those on the server, proving that the vein imaging method can be deployed and run normally on the mobile phone.
[0062] The above description is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements without departing from the principle of the present invention, and these improvements should also be regarded as within the protection scope of the present invention.
Claims
1. A mobile phone vein imaging method based on deep learning, characterized in that: The method described is: Step 1: Processing of vein image dataset; specifically: 1.
1. Perform contrast-limited adaptive histogram equalization on the same-frame visible light image and near-infrared image obtained by original acquisition to improve the contrast of the near-infrared image and enhance the vein information in the image; 1.2, median filtering is performed on the near-infrared image after contrast-limited adaptive histogram equalization processing; the median filter replaces the value of the central pixel with the median value of the pixel grayscale contained in the image area surrounded by the filter, as shown in formula (1): in S is the calculated median gray level of the pixels in the area. xy is the image area surrounded by the filter, and g(m,n) is the pixel value in the filter area; 1.3, Image dataset data enhancement: Random chromaticity changes are made to visible light images to simulate the differences in skin color between different people; visible light images are randomly rotated 15° to 45° counterclockwise, and horizontal and vertical flips are performed to simulate changes in shooting angles. In addition to chromaticity changes, the spatial changes made to the visible light images also require the same changes to be made to the near-infrared images of the same frame; 1.4, normalize the image data, count the pixel distribution of each image in the training set, select an image with a pixel value close to the mean as the reference image, and perform histogram regulation on all images in the training set; Cut the original image into 192*128 image blocks as training set data; Step 2: Construction and training of venous imaging network; specifically: 2.1, the network is mainly divided into three parts: feature extractor part, joint upsampling part and upsampling restoration part; the feature extractor part performs convolution operation on the input image to extract the image feature map, in which some convolution layers will downsample the image to generate feature maps of different scales; the joint upsampling part upsamples the feature maps of different sizes obtained by the feature extractor part to the same size for splicing, and uses dilated convolution to extract features from the spliced feature maps again, in the hope that features of different sizes can be fused to obtain the scale and shape information of the vein; the upsampling restoration part upsamples the feature map output by the joint upsampling part so that the final output result map is the same size as the input image; 2.2, the imaging network adopts a fully convolutional structure, directly using the feature map of the last convolutional layer as output; During network training, the near-infrared image corresponding to the input image is used as the true image, and the mean square error loss is used as the loss function to measure the difference between the output result and the true image. The loss function is divided into two parts. The first part is the mean square error loss between the network output result and the true image, denoted as A. The second part is to use the VGG16 network to extract feature maps of the network output result image and the true image, and perform mean square error loss on the feature maps of the two, denoted as B. Finally, the loss function is determined as: Loss = 0.8*A+0.2*B. 2.3, training adopts five-fold cross validation; 90% of the images in the training set are divided into training set, and 10% are divided into validation set; the learning rate is denoted as lr, the total number of training rounds is epochs, the current training round is epo, and the learning rate is changed as shown in formula (2): Step 3: Lightweighting of the venous imaging network; specifically: Using depth-wise separable convolution instead of ordinary convolution in the original network model can reduce the number of network parameters and computation, thus making the model lightweight. Assume that the number of input channels is M and the size of the output feature map is D. F *D F *N, the convolution kernel size is: D K *D K *M, the filter of a convolution layer contains N convolution kernels in total; The number of parameters of ordinary convolution is D K *D K *M*N, the number of parameters of depth-wise separable convolution is the number of parameters of grouped convolution plus the number of parameters of point-by-point convolution; the number of parameters of grouped convolution is D K *D K *M, the number of parameters for point-by-point convolution is M*N, so the total number of parameters for depth-separable convolution is (D K *D K +N)*M; the computational complexity of ordinary convolution is D K *D K *M*D F *D F *N, the computational cost of depth-wise separable convolution includes the computational cost of grouped convolution and the computational cost of point-by-point convolution; the computational cost of grouped convolution is: D K *D K *M*D F *D F *1, the computational complexity of point-by-point convolution is 1*1*M*D F *D F *N, so the total computational effort of depth-wise separable convolution is D F *D F *M*(D K *D K +N); The ratio of the number of parameters and the amount of computation between ordinary convolution and depth-wise separable convolution is shown in equations (3) and (4): In the convolution layer, take the common convolution kernel size D K =3, it can be seen that after using depthwise separable convolution instead of ordinary convolution, the number of parameters of the convolution layer is about 1 / 9 of the previous one; Step 4: Deploy the network model on mobile phones.
2. According to the deep learning-based mobile phone vein imaging method of claim 1, it is characterized in that: In the step 4, a mobile phone with an Android system is selected, and a smartphone with a CPU based on an ARM architecture is used as the hardware platform in the deployment instance; the NCNN framework is used as the inference framework for the mobile phone, and the computer vision open source library OpenCV is used to process the image data; that is, AndroidStudio is used as the development environment, and the project is built with the converted model weight file and the compiled NCNN_Android and OpenCV_Android libraries, and the vein imaging algorithm is deployed to the mobile phone in the form of an APP.
