WO2022151755A1 - Target detection method and apparatus, and electronic device, storage medium, computer program product and computer program - Google Patents

Target detection method and apparatus, and electronic device, storage medium, computer program product and computer program Download PDF

Info

Publication number
WO2022151755A1
WO2022151755A1 PCT/CN2021/119982 CN2021119982W WO2022151755A1 WO 2022151755 A1 WO2022151755 A1 WO 2022151755A1 CN 2021119982 W CN2021119982 W CN 2021119982W WO 2022151755 A1 WO2022151755 A1 WO 2022151755A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
image
bounding box
training
positive
Prior art date
Application number
PCT/CN2021/119982
Other languages
French (fr)
Chinese (zh)
Inventor
王娜
宋涛
刘星龙
黄宁
张少霆
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2022151755A1 publication Critical patent/WO2022151755A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10081Computed x-ray tomography [CT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30061Lung
    • G06T2207/30064Lung nodule
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Definitions

  • the present disclosure relates to, but is not limited to, the field of computer technology, and in particular, to a target detection method and apparatus, electronic equipment, storage medium, computer program product, and computer program.
  • Pulmonary nodules are a common lesion, and the characteristics of nodules often indicate the nature of lung disease.
  • the detection of pulmonary nodules is of great significance to determine whether the lesion is lung cancer.
  • the early detection, diagnosis and treatment of pulmonary nodules are beneficial to the early diagnosis and treatment of lung cancer and the key to reducing the mortality of lung cancer.
  • Pulmonary nodules can be detected based on Computed Tomography (CT) images.
  • CT Computed Tomography
  • the embodiments of the present disclosure provide a target detection method and apparatus, electronic equipment, storage medium, computer program product and computer program, which not only improve the sensitivity of target detection, but also improve the accuracy of target detection.
  • An embodiment of the present disclosure provides a target detection method, including: performing feature extraction on a first image to be detected to obtain first feature maps of multiple scales of the first image; The first feature maps of multiple scales of the first image are processed to obtain the position of the first object of the target category existing in the first image; wherein, the target detection network is trained in a recursive manner; the target The detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, the classification sub-network is used to determine whether the first object exists in the first image, and the regression sub-network is used to determine the first image The bounding box of the first object existing in the first image, the segmentation sub-network is used to determine the outline of the first object existing in the first image.
  • the training of the target detection network is performed based on the multi-task learning of classification, regression and segmentation, and the correlation between tasks is used to improve the recognition ability of objects of the target category;
  • the recursive phased training strategy is used to train the target detection network, which not only improves the sensitivity of target detection, but also improves the accuracy of target detection.
  • the method further includes: training the target detection network according to a first training set to obtain a target detection network in a first state, where the first training set includes a plurality of sample images and the The first annotation information of the sample image, the first annotation information includes the real position of the second object in the sample image; the sample image is processed through the target detection network in the first state to obtain the sample image The predicted position of the second object in the sample image; according to the predicted position and real position of the second object, determine the false positive area, false negative area and true positive area in the sample image; A target detection network in one state is trained to obtain a trained target detection network.
  • the second training set includes a plurality of sample images and second annotation information of the sample images, and the second annotation information includes the sample images. False positive regions, false negative regions, and true positive regions.
  • the training process of the target detection network is divided into two stages.
  • the focus is on sensitivity, so that the target detection network can obtain as many suspected first objects as possible; in the second stage, the focus is on accuracy, so that the target detection network can obtain relatively high sensitivity based on high sensitivity. high accuracy.
  • the plurality of sample images include positive sample images and negative sample images
  • the method further includes: cropping the marked second image to obtain a positive sample image and a negative sample image of a preset size,
  • the positive sample image includes at least one second object, and the negative sample image does not include the second object.
  • the real position of the second object includes a bounding box of the second object
  • the target detection network is trained according to a first training set to obtain a target detection network in a first state
  • the method includes: performing feature extraction on the sample image to obtain second feature maps of multiple scales of the sample image; determining the sample according to the second feature maps of multiple scales and a plurality of preset anchor frames A plurality of first reference frames in the image; according to the bounding box of the second object in the sample image, a preset number of training samples are determined from the plurality of first reference frames, and the training samples include label information as The positive samples belonging to the target category and the negative samples not belonging to the target category are marked with information; the classification sub-network is trained according to the training samples.
  • determining a preset number of training samples from the plurality of first reference frames according to the bounding box of the second object in the sample image includes: converting the boundary in the sample image The frame is divided into multiple bounding box sets, and the size of the bounding box in each bounding box set is within a preset size interval; for any bounding box set, removing from the multiple first reference frames has been determined as training The first reference frame of the sample, to obtain a reference frame set corresponding to the bounding box set; for any bounding box in the bounding box set, according to the bounding box and each first reference in the corresponding reference frame set The intersection ratio between the boxes determines the positive samples and negative samples corresponding to the bounding box, and the number of positive samples is negatively correlated with the size interval of the bounding box set; according to the order of the size interval from small to large Each bounding box set is processed to obtain the preset number of training samples.
  • the second object with a larger size and the second object with a smaller size can be taken into consideration.
  • the training of the classification sub-network according to the training sample includes: cropping the second feature map to obtain a third feature map corresponding to the training sample;
  • the feature map is input to the classification sub-network, and the first probability that the training sample belongs to the target category is obtained; according to the first probability that the training sample belongs to the target category and the label information of the training sample, the classification sub-network is determined.
  • the first loss according to the first loss, adjust the network parameters of the classification sub-network.
  • the real position of the second object includes a bounding box of the second object
  • the target detection network is trained according to a first training set to obtain a target detection network in a first state
  • the method includes: performing feature extraction on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image; multiple second reference frames in the positive sample image; for any bounding box of the second object in the sample image: determine the intersection ratio of the bounding frame and the multiple second reference frames, The second reference frame with the largest sum ratio is determined as the matching frame corresponding to the bounding box; the fifth feature map corresponding to the matching frame is input into the regression sub-network to obtain the prediction frame of the matching frame; according to the The difference between the bounding box and the prediction box determines the second loss of the regression sub-network; according to the second loss, the network parameters of the regression sub-network are adjusted.
  • the determining the second loss of the regression sub-network according to the difference between the bounding box and the prediction box includes: according to the coordinates between the bounding box and the prediction box Offset and intersection ratio, determine the first regression loss of the matching box; determine the second regression loss of the matching box according to the intersection, union and minimum closed area between the bounding box and the prediction box loss; according to the first regression loss and the second regression loss, determine the second loss of the regression sub-network.
  • the real position of the second object includes the outline of the second object
  • the target detection network is trained according to the first training set to obtain the target detection network in the first state, including : perform feature extraction on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image; input the fourth feature maps of multiple scales into the segmentation sub-network to obtain the positive sample
  • the second probability that each pixel of the image belongs to the target category the segmentation is determined according to the number of pixels in the positive sample image, the contour of the second object in the positive sample image, and the second probability that each pixel belongs to the target category
  • the third loss of the sub-network according to the third loss, the network parameters of the segmentation sub-network are adjusted.
  • the training of the target detection network in the first state according to the second training set to obtain the trained target detection network includes: according to the second label information, performing training on the sample image The second feature maps of multiple scales of the The third probability that the false negative area and the true positive area belong to the target category; according to the third probability that the false positive area, the false negative area and the true positive area belong to the target category, and the true category of the false positive area, the false negative area and the true positive area , determine the fourth loss of the classification sub-network; adjust the network parameters of the classification sub-network according to the fourth loss.
  • the training of the target detection network in the first state according to the second training set to obtain the trained target detection network includes: according to the second label information, performing training on the sample image
  • the second feature maps of multiple scales are cropped to obtain the sixth feature map corresponding to the true positive area and the false negative area; determine the bounding box matching the true positive area and the false negative area;
  • Input the regression sub-network to obtain the prediction frame of the true positive area and the false negative area; determine the regression sub-network according to the difference between the prediction frame of the true positive area and the false negative area and the corresponding bounding box
  • the fifth loss according to the fifth loss, adjust the network parameters of the regression sub-network.
  • the training of the target detection network in the first state according to the second training set to obtain the trained target detection network includes: assigning the first state corresponding to the true positive area and the false negative area
  • the six feature maps are input into the segmentation sub-network to obtain the fourth probability that each pixel in the true positive area and the false negative area belongs to the target category; according to the number of pixels in the true positive area and the false negative area, the true positive area
  • the outline of the second object in the positive area and the false negative area and the fourth probability that each pixel belongs to the target category determines the sixth loss of the segmentation sub-network; according to the sixth loss, adjust the network of the segmentation sub-network parameter.
  • the first image includes a 2D medical image and/or a 3D medical image
  • the target category includes a nodule and/or a cyst.
  • An embodiment of the present disclosure provides a target detection device, comprising: an extraction part, configured to perform feature extraction on a first image to be detected to obtain first feature maps of multiple scales of the first image; a first processing part, is configured to process the first feature maps of multiple scales of the first image through the trained target detection network to obtain the position of the first object of the target category existing in the first image; wherein, the target The detection network is trained in a recursive manner; the target detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, and the classification sub-network is used to determine whether the first object, the The regression sub-network is used to determine the bounding box of the first object existing in the first image, and the segmentation sub-network is used to determine the outline of the first object existing in the first image.
  • An embodiment of the present disclosure provides an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • Embodiments of the present disclosure provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • Embodiments of the present disclosure provide a computer program product, including computer-readable codes.
  • a processor in the device executes the video detection method for implementing any of the embodiments of the present disclosure. some or all of the steps.
  • An embodiment of the present disclosure provides a computer program configured to store computer-readable instructions, which, when executed, cause a computer to execute part or all of the steps of the video detection method in any of the embodiments of the present disclosure.
  • FIG. 1 is a schematic diagram of an implementation flowchart of a target detection method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of the composition and structure of a residual attention network according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of the composition and structure of a feature pyramid network provided by an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of the composition structure of a target detection architecture provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a prediction frame of a lung nodule when the target detection network shown in FIG. 4 is the target detection network in the first state;
  • FIG. 6 is a schematic diagram of a prediction frame of a lung nodule when the target detection network shown in FIG. 4 is a trained target detection network;
  • FIG. 7 is a schematic diagram of the composition and structure of a target detection device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of the composition and structure of an electronic device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic diagram of an implementation flowchart of a target detection method provided by an embodiment of the present disclosure. As shown in FIG. 1 , the method may include:
  • Step S11 perform feature extraction on the first image to be detected, and obtain first feature maps of multiple scales of the first image.
  • Step S12 processing the first feature maps of multiple scales of the first image through the trained target detection network to obtain the position of the first object of the target category in the first image.
  • the target detection network is trained in a recursive manner; the target detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, and the classification sub-network is used to determine whether the first image has the The first object and the regression sub-network are used for determining the bounding box of the first object existing in the first image, and the segmentation sub-network is used for determining the outline of the first object existing in the first image.
  • the training of the target detection network is performed based on the multi-task learning of classification, regression and segmentation, and the correlation between tasks is used to improve the recognition ability of objects of the target category;
  • the recursive phased training strategy is used to train the target detection network, which not only improves the sensitivity of target detection, but also improves the accuracy of target detection.
  • the target detection method may be performed by an electronic device such as a terminal device or a server
  • the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal For digital processing (Personal Digital Assistant, PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
  • the method can be implemented by the processor calling the computer-readable instructions stored in the memory.
  • the method may be performed by a server.
  • the first object may represent an object of a target category.
  • the target categories may include nodules (eg, lung nodules, breast nodules, etc.), cysts, and the like.
  • the first image may represent an image to be subjected to the first object detection.
  • the first image may include 2D medical images (eg, X-ray films, etc.) and/or 3D medical images (eg, CT images and MRI images, etc.). This embodiment of the present disclosure does not limit the first image and the target category.
  • the target detection method provided by the embodiment of the present disclosure, whether there is a first object in the first image can be detected, and the position of the first object in the first image can be obtained.
  • the network parameters of the target detection network can be initialized by using the public lung nodule data set LUNA to reduce problems such as long network training time and disappearance of gradients.
  • step S11 it is considered that the size difference between different first subjects may be large (eg, the diameter of the lung nodules is distributed between 3 millimeters (mm) to 30 mm).
  • the size difference between different first subjects may be large (eg, the diameter of the lung nodules is distributed between 3 millimeters (mm) to 30 mm).
  • low-level feature information at high resolution ie, a feature map with a smaller scale
  • high-order feature information under a large receptive field ie, a feature map with a larger scale. Therefore, in order to take into account the first objects of different sizes and improve the accuracy of target detection, in this step, first feature maps of multiple scales may be extracted from the first image.
  • the first feature map may be used to represent a feature map obtained by performing feature extraction on the first image.
  • the scales of the extracted first feature maps of multiple scales may include 48*48*48, 24*24*24, 12*12*12, 6*6*6, etc.
  • the scales of the extracted first feature maps of multiple scales may include 48*48, 24*24, 12*12, 6*6, and so on.
  • a three-dimensional first image is used as an example for description, and the processing process of the two-dimensional first image may refer to the three-dimensional first image.
  • feature extraction may be performed on the first image through a feature extraction network to obtain first feature maps of multiple scales of the first image.
  • the feature extraction network can be any network capable of multi-scale feature extraction.
  • the feature extraction network can be trained on a large number of images in the visualization database ImageNet.
  • the feature extraction network in the embodiment of the present disclosure may include a basic network and a feature pyramid network (Feature Pyramid Networks, FPN).
  • the basic network can be used to extract the basic feature map of the first image.
  • the base network may include a residual network (Residual Network, ResNet), such as ResNet18.
  • ResNet residual Network
  • the convolution parameters of each layer in the backbone network of the residual network can be set as: the convolution kernel size K is 3*3*3, the step size S is 1, the expansion P is 1, and a batch is connected after each layer of convolution Normalization (Batch Normalization, BN) layer and linear rectification unit (Rectified Linear Unit, ReLU).
  • the basic network may include a Residual Attention Network (Residual Attention Network) formed by combining a residual network and an attention model (Attention Model).
  • the residual network usually extracts features on the entire image range
  • the local features of the first object are more valuable than the regional features far away from the first object. Therefore, the introduction of an attention model into the basic network can enable the basic network to focus on extracting and learning feature information with more reference value (ie, local features of the first object). That is to say, using the residual attention network as the basic network to extract the basic feature map can make the extracted basic feature map more representative of the local features of the first object, thereby improving the accuracy of target detection.
  • FIG. 2 is a schematic diagram of the composition and structure of a residual attention network provided by an embodiment of the present disclosure.
  • the residual attention network includes: a residual network 10 and an attention model 20 .
  • the backbone feature map of the first image 31 can be obtained through the residual network, and the attention feature map of the first image can be obtained through the attention model (it should be noted that the scale of the attention feature map is the same as the scale of the backbone feature map),
  • the basic feature map 32 of the first image can be obtained by combining the backbone feature map and the attention feature map.
  • the base feature map of the first image (1+attention feature map)*backbone feature map.
  • the attention model may include a global mean pooling unit 21 , a fully connected modified linear unit 22 and a fully connected activation unit 23 .
  • FPN includes downsampling processing and upsampling processing.
  • the downsampling process can reduce the scale of the feature map and expand the receptive field, but it will lose the feature information of the first object with a small size
  • the upsampling process can increase the scale of the feature map and retain the features of the first object with a small size information, but narrows the receptive field.
  • FIG. 3 is a schematic diagram of the composition and structure of an FPN provided by an embodiment of the present disclosure.
  • C1 may be used to represent a basic feature map of a first image acquired through a basic network. Since the first feature maps of four scales are finally required, in the embodiment of the present disclosure, C1 is sequentially downsampled four times to obtain C2, C3, C4, and C5, respectively.
  • the basic feature map extracted by the basic network is converted into a multi-scale feature map through FPN, so that the first object of various sizes can be detected, and the amount of calculation can be basically not increased by changing the simple network connection. In the case of , the performance of detecting the first object of small size can be effectively improved.
  • step S12 the first feature maps of multiple scales of the first image may be processed by the trained target detection network, so as to obtain the position of the first object existing in the first image.
  • the position of the first object may be represented by the bounding box of the first object and the outline of the first object.
  • the target detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, wherein the classification sub-network can be used to determine whether the first object exists in the first image, and the regression sub-network can be used to determine whether the first object exists in the first image.
  • the bounding box of the first object, the segmentation sub-network may be used to determine the outline of the first object present in the first image. It is obtained through the joint training of multiple tasks of classification, regression and segmentation, and the ability to recognize the first object can be improved by using the correlation between tasks.
  • the above-mentioned target detection network including the classification sub-network, the regression sub-network and the segmentation sub-network is trained in a recursive manner. On the basis of improving the sensitivity of target detection, the target detection can be improved. accuracy.
  • a trained target detection network is obtained based on multi-task learning and recursive training.
  • the target detection network in the case of maintaining high sensitivity, there is a problem of low accuracy (that is, a large number of objects are misclassified); in the case of maintaining high accuracy, there is a problem of high sensitivity. low (that is, there are a large number of objects of the target class that are not detected). For example: when the sensitivity reaches more than 95%, there are a large number of false positive sample images (about 32%); when the false positive sample images are controlled below 3%, the sensitivity is low (about 32%). 20% of objects are not detected).
  • the training process of the target detection network is divided into two stages.
  • the focus is on sensitivity, so that the target detection network can obtain as many suspected first objects as possible;
  • the focus is on accuracy, so that the target detection network can obtain relatively high sensitivity based on high sensitivity. high accuracy.
  • the method further includes: training the target detection network according to the first training set to obtain the target detection network in the first state; and training the target detection network in the first state according to the second training set , to get the trained object detection network.
  • the training process of the target detection network is divided into two stages: in the training of the first stage, the target detection network is trained according to the first training set, and the target of the first state is obtained.
  • the detection network is the training of the first stage; in the training of the second stage, the target detection network in the first state is trained to obtain the trained target detection network.
  • the first training set is used to train the target detection network.
  • the first training set includes a plurality of sample images and first annotation information of the sample images, where the first annotation information includes the real position of the second object in the sample image.
  • the plurality of sample images include positive sample images and negative sample images.
  • the positive sample image includes at least one second object, and the negative sample image does not include the second object.
  • the second object may represent an object of the target category existing in the training sample image, and the second object may refer to the first object, which will not be repeated here.
  • the method further includes: cropping the marked second image to obtain a positive sample image and a negative sample image of a preset size.
  • the second image may be used to represent the annotated image.
  • the second image may be an annotated medical image.
  • the annotation information of the second image may be used to indicate the real position (including the bounding box and outline) of each second object in the second image.
  • the bounding box of the second object may be represented by a binarized cuboid.
  • the bounding box of the second object may be represented by a binarized sphere. It can be understood that the center point of the binarized sphere is the same as the center point of the second object, and the radius of the binarized sphere is a radius set as required.
  • the contour of the second object may be represented by whether each pixel in the second image is a target category.
  • the default size can be set as required, for example, the default size can be 96*96*96 (unit: pixel*pixel*pixel).
  • a positive sample image and a negative sample image of a preset size may be acquired from the second image according to the label information of the second image.
  • the position (center point, bounding box, etc.) of each second object in the second image may be determined according to the label information of the second image. Then, according to the position of the second object (eg, centered on the second object), an image block with a size of a preset size and including the second object is cropped from the second image, and an image block with a size of a preset size and not including the second object is cropped from the second image.
  • the cropped image block including the second object may be used as a positive sample image, and the cropped image block not including the second object may be used as a negative sample image.
  • data augmentation is performed on the cropped image blocks including the second object and the image blocks not including the second object through operations such as rotation, translation, mirroring, and scaling, so as to implement data expansion and increase the data including the second object. , and increase the number of image blocks that do not include the second object.
  • These image blocks including the second object obtained through data augmentation can also be used as positive sample images, and these image blocks obtained through data augmentation without including the second object can also be used as negative sample images.
  • the same number of positive sample images and negative sample images are acquired.
  • the positive and negative sample images can be effectively balanced, thereby reducing overfitting.
  • a positive sample image and a negative sample image of a preset size may be obtained by first preprocessing the marked second image, and then cropping the preprocessed second image.
  • Preprocessing of the second image may include one or more of resampling, cropping, normalization, and the like.
  • the preprocessing process of the second image will be described.
  • lung CT images are 3D images
  • the thickness of CT images obtained by different CT instruments may be different (for example, the thickness of lung CT images may be 4 mm, 2.5 mm, 1.25 mm, 1 mm, and 0.7 mm, etc.).
  • the thickness difference between the lung CT images can be effectively eliminated.
  • the area where the lung parenchyma is located can be cropped out. In this way, both the positive sample image and the negative sample image can be made of tissue in the lung area, which can reduce the interference of other organs on the training target detection network.
  • the value of each pixel (also called voxel) in the cropped area can be normalized to a value range of 0-1 to obtain the preprocessed lung CT image. This can effectively reduce the amount of subsequent calculations.
  • the method of cropping the positive sample image and the negative sample image of the preset size from the preprocessed second image may refer to the method of directly cropping the positive sample image and the negative sample image of the preset size from the second image. .
  • the position of each second object in the second image can be determined. Therefore, according to the annotation information of the second image, the annotation information of each positive sample image and the annotation information of each negative sample image can be determined, that is, the first annotation information of each sample image in the first training set is determined.
  • the sample images in the first training set are obtained, and the first label information of each sample image is determined. That is, the acquisition of the first training set is completed.
  • the following describes the process of using the first training set to train the target detection network to obtain the target detection network in the first state.
  • the training of the target detection network according to the first training set to obtain the target detection network in the first state includes the classification, regression and segmentation of the target detection network according to the first training set.
  • the network is trained.
  • the training of the target detection network is performed based on the multi-task learning of classification, regression and segmentation, and the ability to recognize objects of the target category is improved by utilizing the correlation between the tasks.
  • the sample images to be used include: the original image and the negative sample image
  • the label information to be used includes: the bounding box of the second object.
  • the training of the classification sub-network of the target detection network according to the first training set may include steps S21 to S24.
  • step S21 feature extraction is performed on the sample image to obtain second feature maps of multiple scales of the sample image.
  • the second feature map may represent a feature map extracted from the sample image.
  • the process of performing feature extraction on the sample image may refer to the process of performing feature extraction on the first image.
  • the scale of the second feature map may include 6*6**6, 12*12*12, 24*24*24, 48*48*48, and so on.
  • step S22 a plurality of first reference frames in the sample image are determined according to the second feature maps of the plurality of scales and a plurality of preset anchor frames.
  • the preset anchor frame may be used to indicate the size of the first reference frame.
  • the preset anchor boxes can be preset as needed.
  • the size of the lung nodule is 3 mm to 30 mm, so the area of the preset anchor frame can be set to 4, 8, 16, and 32 (unit: pixel*pixel), etc.
  • the shape of the preset anchor frame may include: 1*4, 2*2 and 4*1 (unit: pixel*pixel).
  • the shapes of the preset anchor frame may include: 1*8, 2*4, 4*2 and 8*1.
  • the area and shape of the preset anchor frame can be set in advance as required, and the embodiment of the present disclosure does not limit the area and shape of the preset anchor frame.
  • the center points of a plurality of first reference frames may be determined in the sample image. For example, assuming that the scale of the feature map of a certain scale of the sample image is 3*3*3, the sample image is divided into 9 areas on average, and the center point of each area is the center point of a first reference frame. . For a center point of a first reference frame and a preset anchor frame, a first reference frame may be determined.
  • step S23 a preset number of training samples are determined from the plurality of first reference frames according to the bounding frame of the second object in the sample image.
  • the training samples include positive samples and negative samples, the label information of positive samples belongs to the target category, and the label information of negative samples does not belong to the target category.
  • the gap between the first reference frame and the bounding box of the second object can be determined, so as to determine whether the label of the first reference frame is a target category or a non-target category .
  • the label of the first reference frame may be the target category.
  • the reference frame can be used as a positive sample for the classification sub-network.
  • the first reference frame may be a non-target category, and the first reference frame can be used as a classification Negative samples for the subnetworks.
  • step S23 may include: dividing the bounding box in the sample image into multiple bounding box sets, and the size of the bounding box in each bounding box set is within a preset size interval; A frame set, removing the first reference frame that has been determined as a training sample from the plurality of first reference frames, to obtain a reference frame set corresponding to the bounding box set; for any boundary in the bounding box set frame, according to the intersection ratio between the bounding box and each first reference frame in the corresponding reference frame set, determine the positive samples and negative samples corresponding to the bounding box, and the number of the positive samples is the same as that of the The size intervals of the bounding box sets are negatively correlated; each bounding box set is sequentially processed according to the order of the size intervals from small to large, to obtain the preset number of training samples.
  • the bounding box in the sample image may be divided into multiple bounding box sets according to the size, and then each bounding box set is divided into multiple bounding box sets. to be processed.
  • a size interval can be preset for each bounding box set.
  • the bounding box can be divided into the bounding box set. In this way, the size of the bounding boxes in each bounding box set is within a preset size range for the bounding box set.
  • the size interval preset for the bounding box set may be set as required (for example, according to the size of the second object), and the embodiment of the present disclosure does not limit the size interval.
  • a pulmonary nodule is taken as an example of the second object for description.
  • the size of pulmonary nodules is between 3mm and 30mm. Among them, those with a size less than or equal to 6mm can be called small nodules, those with a size greater than 6mm and less than 12mm are called middle nodules, and those with a size greater than or equal to 12mm are called nodules. large nodules. Therefore, set three bounding box sets, and set a size interval for each bounding box set.
  • each bounding box set may be processed in sequence according to the order of size intervals from small to large.
  • the first bounding box set may represent any one of the divided bounding box sets.
  • the process of processing the first bounding box set includes: removing a first reference frame determined as a training sample from the plurality of first reference frames to obtain a reference frame set corresponding to the first bounding box set; Any one of the bounding boxes in the first bounding box set: according to the intersection ratio between the bounding box and each first reference frame in the reference frame set corresponding to the first bounding box set, determine the positive sample corresponding to the bounding box and negative samples.
  • the reference frame set includes a plurality of first reference frames, and the reference frame set can limit the range of selecting positive samples and negative samples. If the first bounding box set is the first processed bounding box set after sorting, it indicates that there is currently no first reference box determined as a training sample (including positive samples and negative samples). In this case, for any sample image, all the first reference frames in the sample image may be used to form a reference frame set corresponding to the first bounding frame set. If the first bounding box set is not the first processed bounding box set after sorting, it indicates that some of the first reference boxes may have been determined as training samples.
  • the first reference frame of the sample image can be determined as the first reference frame row of the training sample, and the remaining first reference frame can be used to form a first bounding box set corresponding to collection of reference frames. In this way, the number of computations of the cross-union ratio can be reduced, and the amount of computation and workload can be reduced.
  • the number of positive samples corresponding to a bounding box is negatively correlated with the size interval of the bounding box set of the bounding box. That is to say, when the size interval of the bounding box set to which a bounding box belongs is large, the number of positive samples corresponding to the bounding box is small; when the size interval of the bounding box set to which a bounding box belongs is small, The number of positive samples corresponding to the bounding box is large.
  • the number of positive samples corresponding to the bounding box set representing small nodules can be 6
  • the number of positive samples corresponding to the bounding box representing medium nodules can be 4
  • the number of positive samples representing large nodules can be 4.
  • the number of positive samples corresponding to the bounding box can be 2. Since the learning difficulty of the second object with a smaller size is higher, and the learning difficulty of the second object with a larger size is lower, in this way, more positive samples are determined for the second object with a smaller size, and more positive samples are determined for the second object with a larger size. Determining fewer positive samples for the second object can balance the difficulty of learning second objects of different sizes, thereby ensuring that the second objects of various sizes have sufficient sensitivity.
  • the The first reference frames in the reference frame set are sorted, and the first to Nth first reference frames are determined as the positive samples corresponding to the bounding frame, where N can be set as required; (It can be set as required, for example, it can be greater than 0.02 and less than 0.2)
  • the first reference frame is determined as the negative sample corresponding to the bounding box.
  • the number of positive samples corresponding to a bounding box can be the same or similar to the number of negative samples.
  • step S24 the classification sub-network is trained according to the training samples.
  • step S24 may include: cropping the second feature map to obtain a third feature map corresponding to the training sample; inputting the third feature map into the classification sub-network to obtain the The first probability that the training sample belongs to the target category; the first loss of the classification sub-network is determined according to the first probability that the training sample belongs to the target category and the label information of the training sample; Network parameters of the classification sub-network.
  • the position of the third feature map corresponding to the training sample in the second feature map corresponding to the sample image can be determined, and according to the third feature map
  • the second feature map is cropped to obtain a third feature map corresponding to the training sample. It is understandable that the second feature map has multiple scales, and the cropped third feature map also has multiple scales.
  • the third feature map of the training sample is input into the classification sub-network of the target detection network, and the first probability that the training sample belongs to the target category is output. Then, through formula 1, the first loss of the classification sub-network can be determined according to the first probability and the label information of the training sample.
  • L ft represents the first loss
  • y represents the label information of the training sample
  • y' represents the first probability of the output of the classification sub-network.
  • ⁇ and ⁇ are hyperparameters. Among them, ⁇ is mainly used to reduce the weight of the easy-to-classify training samples, so that the classification sub-network of the target detection network pays more attention to the difficult-to-classify training samples.
  • the value of ⁇ may be 2.
  • is mainly used to balance the ratio of positive samples and negative samples in training samples, effectively reducing the problem of serious imbalance in the proportion of positive and negative samples in target detection. In some embodiments, the value of ⁇ may be 0.25.
  • the first threshold and the second threshold can be set as required.
  • the first threshold may be set to a value closer to 1, for example, may be set to 0.9 or 0.95, etc.
  • the second threshold may be set to a value closer to 0, for example, may be set to 0.05 or 0.1. This embodiment of the present disclosure does not limit the settings of the first threshold and the second threshold.
  • the L ft obtained for the easily classified training samples is relatively small. That is to say, the first loss caused by the easy-to-classify training samples is relatively small, and the impact on the network parameters of the classification sub-network is relatively small. This is equivalent to reducing the weight of easily classified training samples.
  • the third threshold and the fourth threshold can be set as required.
  • the third and fourth thresholds may be set to values close to 0.5.
  • the third threshold may be set to 0.55 or 0.6, etc.
  • the fourth threshold may be set to 0.4 or 0.45, etc. This embodiment of the present disclosure does not limit the settings of the third threshold and the fourth threshold.
  • the L ft obtained for the hard-to-classify training samples is relatively large. That is to say, the first loss brought by the hard-to-classify samples is relatively large, and the impact on the network parameters of the classification sub-network is relatively large, which is equivalent to increasing the weight of the hard-to-classify training samples, making the classification sub-network pay more attention to the hard-to-classify samples. training samples.
  • a smoothing operation can be performed on the label information of the training samples, for example, the value of y can be softened from 0 and 1 to 0.1 and 0.9, so as to enhance the generalization of the target detection network performance.
  • the sample images to be used include: positive sample images
  • the label information to be used includes: the bounding box of the second object.
  • training the regression sub-network of the target detection network may include steps S31 to S36.
  • step S31 feature extraction is performed on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image.
  • the fourth feature map may represent a feature map of the positive sample image.
  • Step S31 may refer to step S21.
  • step S32 a plurality of second reference frames in the positive sample image are determined according to the fourth feature maps of the plurality of scales and a plurality of preset anchor frames.
  • Step S32 may refer to step S22.
  • step S33 for any bounding box of the second object in the sample image, determine the intersection ratio of the bounding box and the plurality of second reference frames, and determine the second reference frame with the largest intersection ratio A matching box corresponding to the bounding box is determined.
  • step S34 for any bounding box of the second object in the sample image, the fifth feature map corresponding to the matching box is input into the regression sub-network to obtain a prediction box of the matching box.
  • the fifth feature map may represent the feature map corresponding to the matching frame.
  • reference may be made to the manner of obtaining the third feature map corresponding to the training sample in step S24.
  • step S35 for any bounding box of the second object in the sample image, the second loss of the regression sub-network is determined according to the difference between the bounding box and the predicted box of the corresponding matching box.
  • step S35 may include: determining the first regression loss of the matching box according to the coordinate offset and the intersection ratio between the bounding box and the prediction box; The intersection, union and minimum closed area between the prediction frames determine the second regression loss of the matching frame; according to the first regression loss and the second regression loss, determine the first regression loss of the regression sub-network. Two losses.
  • the first regression loss can be determined by formula two:
  • W iou represents the weight of the prediction box
  • W iou (e -iou +0.4)
  • iou represents the intersection ratio between the prediction box and the corresponding bounding box
  • x represents the coordinates of the prediction box relative to the corresponding bounding box Offset.
  • the loss value of the smaller prediction box is given a larger loss value, so that when the regression sub-network is trained using the matching box corresponding to the prediction frame, the regression The parameters of the sub-network are updated more vigorously.
  • a second regression loss is introduced in the embodiment of the present disclosure to make the positioning of the second object more accurate.
  • the second regression loss can be determined by formula three;
  • L GIoU represents the second regression loss
  • a and B represent the prediction box and the corresponding bounding box respectively
  • C represents the minimum closed area of A and B
  • a ⁇ B represents the union of the prediction box and the corresponding bounding box
  • a ⁇ B represents The intersection of the predicted box and the corresponding bounding box.
  • the overlapping area and the non-overlapping area between the prediction box and the corresponding bounding box are optimized, so as to more accurately locate the area where the second object is located.
  • the weighted summation of the first regression loss and the second regression loss may be performed to obtain the second loss of the regression sub-network.
  • step S36 the network parameters of the regression sub-network are adjusted according to the second loss.
  • the sample images to be used include: positive sample images
  • the label information to be used includes: the outline of the second object.
  • training the segmentation sub-network of the target detection network may include steps S41 to S44.
  • step S41 feature extraction is performed on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image.
  • Step S41 may refer to step S31.
  • step S42 the fourth feature maps of the multiple scales are input into the segmentation sub-network to obtain the second probability that each pixel of the positive sample image belongs to the target category.
  • step S43 the third loss of the segmentation sub-network is determined according to the number of pixels in the positive sample image, the contour of the second object in the positive sample image, and the second probability that each pixel belongs to the target category.
  • the third loss of the segmentation sub-network can be determined by Equation 4:
  • L dice represents the third loss
  • N is the number of pixels in the positive sample image
  • i represents the ith pixel in the positive sample image
  • p i represents the ith pixel in the positive sample image output by the segmentation sub-network
  • the second probability that the pixels belong to the target category gi represents the true category of the ith pixel in the positive sample image, respectively, and the value of gi includes 0 and 1, where a value of 0 indicates that the ith pixel belongs to a non-target Category, a value of 1 indicates that the i-th pixel belongs to the target category.
  • g i can be determined according to the contour of each second object in the positive sample image.
  • the third loss is used in the embodiment of the present disclosure to optimize the segmentation task, which is beneficial to balance the positive and negative sample images, thereby improving the The ability to segment the second object with smaller size is improved.
  • step S44 the network parameters of the segmentation sub-network are adjusted according to the third loss.
  • the first stage of training is also completed, and the target detection network in the first state is obtained.
  • the second stage is entered.
  • the target detection network in the first state can be trained according to the second training set to obtain a trained target detection network.
  • the process of training the target detection network in the first state may be a fine-tuning process.
  • the second training set includes a plurality of sample images and second label information of the sample images, where the second label information includes false positive areas, false negative areas and true positive areas in the sample images.
  • the method further includes: processing the sample image through the target detection network in the first state to obtain a predicted position of the second object in the sample image; Predict the position and the real position, and determine the false positive area, false negative area and true positive area in the sample image.
  • the false positive (False Positive, FP) area indicates that the first label information in the sample image is displayed as not the second object, but the output result of the classification sub-network in the first state is displayed as the area of the second object; true positive (Truth Positive, TP) area indicates that the first label information in the sample image is displayed as the second object, and the classification sub-network output result of the first state is also displayed as the area of the second object; False Negative (False Negtive, FN) area indicates the sample image.
  • the first annotation information is displayed as the second object, but the output result of the classification sub-network in the first state shows the area that is not the second object; the true negative (Truth Negtive, TN) area indicates that the first annotation information in the sample image is displayed as not The second object, and the output result of the classification sub-network of the first state is also displayed as a sample image that is not the second object.
  • the negative sample images in the second training set can be determined according to the false positive regions.
  • the positive sample images in the second training set can be determined according to the true positive regions and the false negative regions.
  • all false positive regions may be used as negative sample images in the second training set; false negative regions may be triple-enhanced, and a portion (eg, 2/3) of true positive regions may be selected as Positive images in the second training set.
  • the following describes the process of training the target detection network in the first state according to the second training set.
  • the training of the target detection network in the first state according to the second training set to obtain the trained target detection network includes: according to the second training set, respectively classifying the classification sub-network, The regression sub-network and the segmentation sub-network are trained.
  • the training of the target detection network in the first state is performed based on multi-task learning of classification, regression and segmentation, and the ability to recognize objects of the target category is improved by utilizing the correlation between tasks.
  • the sample images used include: false positive area, false negative area and true positive area
  • the labeling information to be used includes: the bounding box of the second object.
  • the training of the classification sub-network of the target detection network in the first state according to the second training set may include: according to the second label information, performing the training on the first state of the sample image at multiple scales.
  • the second feature map is trimmed to determine the fifth feature map corresponding to the false positive area, the false negative area and the true positive area; the fifth feature map is input into the classification sub-network to obtain the false positive area, false negative area and true positive area
  • the third probability that the area belongs to the target category; the classifier is determined according to the third probability that the false positive area, the false negative area and the true positive area belong to the target category, and the true category of the false positive area, the false negative area and the true positive area.
  • the fourth loss of the network according to the fourth loss, the network parameters of the classification sub-network are adjusted.
  • the above process may refer to steps S21 to S24.
  • the sample images used include true positive regions and false negative regions
  • the annotation information to be used includes: the bounding box of the second object.
  • the training of the regression sub-network of the target detection network in the first state according to the second training set may include: determining bounding boxes matching the true positive regions and false negative regions;
  • the sixth feature map is input to the regression sub-network to obtain the prediction frame of the true positive area and the false negative area; according to the difference between the prediction frame of the true positive area and the false negative area and the corresponding bounding box, determine the prediction frame of the true positive area and the false negative area.
  • the fifth loss of the regression sub-network according to the fifth loss, the network parameters of the regression sub-network are adjusted.
  • the above process may refer to steps S31 to S36.
  • the sample images used include true positive regions and false negative regions
  • the annotation information to be used includes: the outline of the second object.
  • training the segmentation sub-network of the target detection network in the first state may include: inputting the sixth feature map corresponding to the true positive area and the false negative area into the Segment the sub-network to obtain the fourth probability that each pixel in the true positive area and the false negative area belongs to the target category; according to the number of pixels in the true positive area and the false negative area, the true positive area and the false negative area.
  • the contour of the second object and the fourth probability that each pixel belongs to the target category determines the sixth loss of the segmentation sub-network; and adjusts the network parameters of the segmentation sub-network according to the sixth loss.
  • the above process may refer to steps S41 to S44.
  • the coefficient of the corresponding loss (including the fourth loss) of the false positive region, the third probability of the false negative region and the true positive region may be determined according to the third probability of the false positive region It can be used as the coefficient of the corresponding losses (including the fourth loss, the fifth loss and the sixth loss) of the false negative area and the true positive area. In this way, convergence can be accelerated and training time can be saved.
  • an online-hardness-minig method may be used (for example, each iteration focuses on optimizing the 10 regions with the largest loss values),
  • the object detection network is trained as the trained object detection network. In this way, convergence can be accelerated and training time can be saved.
  • FIG. 4 is a schematic structural diagram of the composition of a target detection architecture provided by an embodiment of the present disclosure.
  • the target detection architecture includes a feature extraction network 40 and a target detection network 50 .
  • the feature extraction network 40 includes a basic network and FPN
  • the target detection network 50 includes a classification sub-network 51 , a regression sub-network 52 and a segmentation sub-network 53 .
  • the process of the target detection network for detecting lung nodules from the lung CT image shown in FIG. 4 may include: firstly, the lung CT image may be divided into image blocks of a specified size, and each image block is a first image ; Then, each first image is respectively input into the target detection network shown in FIG. 4 to obtain the bounding box and outline of the lung nodule in each first image. Finally, according to the bounding box and contour of the lung nodule in each first image, the bounding box and contour of the lung nodule in the lung CT image can be determined.
  • the first image is input into the feature extraction network shown in FIG. 4 for processing, and first feature maps of multiple scales of the first image are obtained.
  • the first feature maps of multiple scales of the first image are respectively input into the classification sub-network, regression sub-network and segmentation sub-network of the trained target detection network to obtain whether there are lung nodules in the first image, and whether each lung nodule exists in the first image.
  • the bounding box and contours of each lung nodule are respectively input into the classification sub-network, regression sub-network and segmentation sub-network of the trained target detection network to obtain whether there are lung nodules in the first image, and whether each lung nodule exists in the first image.
  • FIG. 5 is a schematic diagram of a prediction frame of a lung nodule when the target detection network shown in FIG. 4 is the target detection network in the first state.
  • the target detection network shown in FIG. 4 is the target detection network in the first state trained through the first stage, there are a large number of false positive lung nodules 61 and some false negative lung nodules 62.
  • FIG. 6 is a schematic diagram of a prediction frame of a lung nodule when the target detection network shown in FIG. 4 is a trained target detection network. As shown in Figure 6, when the target detection network shown in Figure 4 is a trained target detection network trained through the first and second stages, the number of false positive lung nodules is reduced.
  • the target detection method provided by the embodiment of the present application can be used to detect whether there is a first object in the first image, and can obtain the position of the first object in the first image.
  • the target detection method provided in this embodiment of the present application can be used to detect whether there is a lung nodule in the lung CT image, and can obtain Location of lung nodules in lung CT images.
  • the target detection method provided in this embodiment of the present application can be used in any suitable scenario that needs to detect whether there is a lung nodule in a lung CT image.
  • the target detection method can be used to screen lung nodules in the CT images of the lungs to be detected through remote cloud platforms or clinical landing equipment in hospitals, which is beneficial to improve the medical level in areas with low medical level.
  • the automatic screening of pulmonary nodules in lung CT images can be completed through the remote cloud platform or the hospital’s clinical floor equipment, which is helpful for doctors’ care. Rapid and accurate diagnosis provides auxiliary means.
  • Another example is the automatic screening of pulmonary nodules on the obtained lung CT images in the physical examination center to improve the detection level of pulmonary nodules.
  • the embodiments of the present disclosure also provide target detection devices, electronic devices, computer-readable storage media, computer programs, and computer program products, all of which can be used to implement any target detection method provided by the present disclosure, and corresponding technical solutions and descriptions See the corresponding entry in the Methods section.
  • FIG. 7 is a schematic structural diagram of a target detection apparatus provided by an embodiment of the present disclosure. As shown in FIG. 7 , the apparatus 700 includes:
  • the extraction part 701 is configured to perform feature extraction on the first image to be detected to obtain first feature maps of multiple scales of the first image;
  • the first processing part 702 is configured to perform the feature extraction on the The first feature maps of multiple scales of the first image are processed to obtain the position of the first object of the target category existing in the first image;
  • the target detection network is trained in a recursive manner;
  • the target The detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, the classification sub-network is used to determine whether the first object exists in the first image, and the regression sub-network is used to determine the first image
  • the bounding box of the first object existing in the first image, the segmentation sub-network is used to determine the contour of the first object existing in the first image.
  • the apparatus further includes:
  • the first training part is configured to train the target detection network according to a first training set to obtain a target detection network in a first state, and the first training set includes a plurality of sample images and a first sample image of the sample images. Labeling information, the first labeling information includes the real position of the second object in the sample image;
  • the second processing part is configured to process the sample image through the target detection network in the first state to obtain the predicted position of the second object in the sample image;
  • a determining part configured to determine a false positive area, a false negative area and a true positive area in the sample image according to the predicted position and the real position of the second object;
  • the second training part is configured to train the target detection network in the first state according to a second training set to obtain a trained target detection network, and the second training set includes a plurality of sample images and the sample images
  • the second annotation information includes the false positive area, the false negative area and the true positive area in the sample image.
  • the plurality of sample images include positive sample images and negative sample images
  • the apparatus further includes: a cropping part configured to crop the marked second image to obtain a positive sample image of a preset size and a negative sample image, the positive sample image includes at least one second object, and the negative sample image does not include the second object.
  • the real position of the second object includes a bounding box of the second object
  • the first training part is further configured to: perform feature extraction on the sample image to obtain multiple features of the sample image.
  • second feature maps of one scale multiple first reference frames in the sample image are determined according to the second feature maps of multiple scales and multiple preset anchor frames; according to the second feature maps in the sample image
  • the bounding box of the object, a preset number of training samples are determined from the plurality of first reference frames, and the training samples include positive samples whose annotation information belongs to the target category, and negative samples whose annotation information does not belong to the target category ; Train the classification sub-network according to the training samples.
  • the determining a preset number of training samples from the plurality of first reference frames according to the bounding box of the second object in the sample image includes: The frame is divided into multiple bounding box sets, and the size of the bounding box in each bounding box set is within a preset size interval; for any bounding box set, removing from the multiple first reference frames has been determined as training The first reference frame of the sample, to obtain a reference frame set corresponding to the bounding box set; for any bounding box in the bounding box set, according to the bounding box and each first reference in the corresponding reference frame set
  • the intersection ratio between boxes determines the positive samples and negative samples corresponding to the bounding box, and the number of positive samples is negatively correlated with the size interval of the bounding box set; according to the order of the size interval from small to large
  • Each bounding box set is processed to obtain the preset number of training samples.
  • the training of the classification sub-network according to the training sample includes: cropping the second feature map to obtain a third feature map corresponding to the training sample;
  • the feature map is input to the classification sub-network, and the first probability that the training sample belongs to the target category is obtained; according to the first probability that the training sample belongs to the target category and the label information of the training sample, the classification sub-network is determined. a first loss; according to the first loss, adjust the network parameters of the classification sub-network.
  • the real position of the second object includes a bounding box of the second object
  • the first training part is further configured to: perform feature extraction on the positive sample image to obtain the positive sample image fourth feature maps of multiple scales; according to the fourth feature maps of multiple scales and multiple preset anchor frames, determine multiple second reference frames in the positive sample image; for the sample image Any bounding box of the second object in: determine the intersection ratio of the bounding box and the plurality of second reference frames, and determine the second reference frame with the largest intersection ratio as the match corresponding to the bounding box frame; input the fifth feature map corresponding to the matching frame into the regression sub-network to obtain the prediction frame of the matching frame; determine the regression sub-network according to the difference between the bounding frame and the prediction frame The second loss; according to the second loss, adjust the network parameters of the regression sub-network.
  • the first training part is further configured to: determine the first regression loss of the matching box according to the coordinate offset and the intersection ratio between the bounding box and the prediction box; The intersection, union and minimum closed area between the bounding box and the prediction box determine the second regression loss of the matching box; according to the first regression loss and the second regression loss, determine the The second loss of the regression sub-network.
  • the real position of the second object includes the outline of the second object
  • the first training part is further configured to: perform feature extraction on the positive sample image to obtain the Fourth feature maps of multiple scales; input the fourth feature maps of multiple scales into the segmentation sub-network to obtain the second probability that each pixel of the positive sample image belongs to the target category; according to the positive sample image
  • the number of pixels in the positive sample image, the contour of the second object in the positive sample image, and the second probability that each pixel belongs to the target category determine the third loss of the segmentation sub-network; according to the third loss, adjust the segmentation Network parameters for the subnet.
  • the second training part is further configured to: according to the second label information, crop the second feature maps of multiple scales of the sample image to determine false positive areas, false negative areas and The fifth feature map corresponding to the true positive region; input the fifth feature map into the classification sub-network to obtain the third probability that the false positive region, the false negative region and the true positive region belong to the target category; The third probability that the negative area and the true positive area belong to the target category, and the true categories of the false positive area, the false negative area and the true positive area, determine the fourth loss of the classification sub-network; according to the fourth loss, adjust the Describe the network parameters of the classification sub-network.
  • the second training part is further configured to: according to the second label information, crop the second feature maps of multiple scales of the sample image to obtain the correspondence between true positive regions and false negative regions
  • the sixth feature map of determine the bounding box matching the true positive region and the false negative region; input the sixth feature map into the regression sub-network to obtain the prediction frame of the true positive region and the false negative region; Determine the fifth loss of the regression sub-network according to the difference between the prediction boxes and the corresponding bounding boxes of the true positive area and the false negative area; adjust the network parameters of the regression sub-network according to the fifth loss .
  • the second training part is further configured to: input the sixth feature map corresponding to the true positive area and the false negative area into the segmentation sub-network, to obtain the difference between the true positive area and the false negative area
  • the fourth probability that each pixel belongs to the target category according to the number of pixels in the true positive area and the false negative area, the outline of the second object in the true positive area and the false negative area, and the first probability that each pixel belongs to the target category.
  • the sixth loss of the segmentation sub-network is determined; according to the sixth loss, the network parameters of the segmentation sub-network are adjusted.
  • the first image includes a 2D medical image and/or a 3D medical image
  • the target category includes a nodule and/or a cyst.
  • the functions or included parts of the apparatus provided in the embodiments of the present disclosure may be configured to execute the methods described in the above method embodiments, and the specific implementation may refer to the descriptions in the above method embodiments.
  • a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, a unit, a module, or a non-modularity.
  • Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • Embodiments of the present disclosure also provide a computer program, including computer-readable codes.
  • the processor in the device executes the method for implementing the target detection provided in any of the above embodiments. instruction.
  • Embodiments of the present disclosure further provide a computer program product for storing computer-readable instructions, which, when executed, cause a computer to execute the steps of the target detection method provided by any of the foregoing embodiments.
  • the electronic device may be provided as a terminal, server or other form of device.
  • FIG. 8 is a schematic structural diagram of an electronic device 800 according to an embodiment of the disclosure.
  • electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
  • an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812 , sensor component 814 , and communication component 816 .
  • the processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
  • Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable) Erasable Programmable Read Only Memory, EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (Read-Only Memory) , ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM Static Random-Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • Read-Only Memory Read-Only Memory
  • Power supply assembly 806 provides power to various components of electronic device 800 .
  • Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
  • Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action.
  • multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
  • Audio component 810 is configured to output and/or input audio signals.
  • audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode.
  • the received audio signal may be stored in memory 804 or transmitted via communication component 816 .
  • audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 .
  • the sensor assembly 814 can detect the open/closed state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 814 may also include a light sensor, such as a Complementary Metal-Oxide-Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications.
  • CMOS Complementary Metal-Oxide-Semiconductor
  • CCD Charge Coupled Device
  • the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (The 2nd Generation, 2G) or a third generation mobile communication technology (The 3rd Generation, 3G), or their The combination.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a Near Field Communication (NFC) module to facilitate short-range communication.
  • the NFC module may be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (Bluetooth, BT) technology and other technology to achieve.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (Digital Signal Processing Devices) , DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation for performing the above method.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DPD Digital Signal Processing Devices
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above method.
  • a non-volatile computer-readable storage medium is also provided, such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method.
  • FIG. 9 is a schematic structural diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be implemented as a server.
  • an electronic device 1900 includes a processing component 1922, which in some embodiments may include one or more processors, and a memory resource, represented by memory 1932, for storing instructions executable by the processing component 1922, such as applications program.
  • An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server TM ), a graphical user interface based operating system (Mac OS X TM ) introduced by Apple, a multi-user multi-process computer operating system (Unix TM ), Free and Open Source Unix-like Operating System (Linux TM ), Open Source Unix-like Operating System (FreeBSD TM ) or the like.
  • Microsoft server operating system Windows Server TM
  • Mac OS X TM graphical user interface based operating system
  • Uniix TM multi-user multi-process computer operating system
  • Free and Open Source Unix-like Operating System Linux TM
  • FreeBSD TM Open Source Unix-like Operating System
  • a non-volatile computer-readable storage medium such as memory 1932 comprising computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described method.
  • Embodiments of the present disclosure may be one or more of a system, a method, a computer-readable storage medium, a computer program, or a computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling the processor to implement the target detection method provided by any of the above embodiments of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), Static Random Access Memory (SRAM), Portable Compact Disc Read-Only Memory (CD-ROM), Digital Video Disc (DVD), Memory Stick, Floppy Disk, Mechanical Encoding devices, such as punched cards or raised structures in grooves on which instructions are stored, and any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory Static Random Access Memory
  • SRAM Static Random Access Memory
  • CD-ROM Portable Compact Disc Read-Only Memory
  • DVD Digital Video Disc
  • Memory Stick Memory Stick
  • Mechanical Encoding devices such as punched cards or raised structures in grooves on which instructions are stored, and any suitable combination of the foregoing.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • the computer program instructions for performing the steps of the embodiments of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in a Source or object code written in any combination of one or more programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the "C" language or similar Programming language.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, can be connected to an external computer (e.g. use an internet service provider to connect via the internet).
  • LAN Local Area Network
  • WAN Wide Area Network
  • custom electronic circuits such as programmable logic circuits, Field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), are personalized by utilizing state information of computer readable program instructions,
  • the electronic circuit may execute computer-readable program instructions to implement embodiments of the present disclosure.
  • Embodiments of the present disclosure are described herein with reference to flowchart illustrations and/or structural diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present disclosure. It will be understood that each block of the flowcharts and/or structural diagrams, and combinations of blocks in the flowcharts and/or structural diagrams, can be implemented by computer readable program instructions.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more of the blocks in the flowcharts and/or constituent block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium storing the instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks in the flowcharts and/or constituent block diagrams.
  • each block in the flowchart or block diagram may represent a module, segment, or portion of an instruction that contains one or more logic for implementing the specified Executable instructions for the function.
  • the functions noted in the blocks may also occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the constituent block diagrams and/or flowchart illustrations, and combinations of blocks in the constituent block diagrams and/or flowchart illustrations may be implemented using special purpose hardware-based hardware that performs the specified function or action. system, or can be implemented using a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically implemented by hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in other embodiments, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
  • Embodiments of the present disclosure provide a target detection method and device, electronic equipment, storage medium, computer program product, and computer program, wherein the method includes: performing feature extraction on a first image to be detected, and obtaining a feature of the first image. First feature maps of multiple scales; processing the first feature maps of multiple scales of the first image through the trained target detection network to obtain the position of the first object of the target category in the first image. According to the embodiments of the present disclosure, the first object of the target category existing in the image to be detected can be detected, and the sensitivity and accuracy of target detection can be improved.

Abstract

A target detection method and apparatus, and an electronic device, a storage medium, a computer program product and a computer program. The method comprises: performing feature extraction on a first image to be detected, so as to obtain a first feature map for a plurality of scales of the first image (S11); and processing the first feature map for the plurality of scales of the first image by means of a trained target detection network, so as to obtain the location of a first object of a target category in the first image (S12).

Description

目标检测方法及装置、电子设备、存储介质、计算机程序产品和计算机程序Target detection method and apparatus, electronic device, storage medium, computer program product and computer program
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本公开基于申请号为202110057241.X、申请日为2021年01月15日、申请名称为“目标检测方法及装置、电子设备和存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。The present disclosure is based on the Chinese patent application with the application number of 202110057241.X, the application date of January 15, 2021, and the application name of "target detection method and device, electronic equipment and storage medium", and requires the priority of the Chinese patent application The entire content of this Chinese patent application is incorporated herein by reference.
技术领域technical field
本公开涉及但不限于计算机技术领域,尤其涉及一种目标检测方法及装置、电子设备、存储介质、计算机程序产品和计算机程序。The present disclosure relates to, but is not limited to, the field of computer technology, and in particular, to a target detection method and apparatus, electronic equipment, storage medium, computer program product, and computer program.
背景技术Background technique
肺结节是一种常见病变,结节特征往往表明肺病的性质,检测肺结节对确定病变是不是肺癌有重要意义。肺结节的早期发现、诊断、治疗有利于肺癌的早期诊治、降低肺癌死亡率的关键,可以基于电子计算机断层扫描(Computed Tomography,CT)图像对肺结节进行检测。Pulmonary nodules are a common lesion, and the characteristics of nodules often indicate the nature of lung disease. The detection of pulmonary nodules is of great significance to determine whether the lesion is lung cancer. The early detection, diagnosis and treatment of pulmonary nodules are beneficial to the early diagnosis and treatment of lung cancer and the key to reducing the mortality of lung cancer. Pulmonary nodules can be detected based on Computed Tomography (CT) images.
发明内容SUMMARY OF THE INVENTION
本公开实施例提出了一种目标检测方法及装置、电子设备、存储介质、计算机程序产品和计算机程序,既提高了目标检测的敏感性,又提高了目标检测的准确性。The embodiments of the present disclosure provide a target detection method and apparatus, electronic equipment, storage medium, computer program product and computer program, which not only improve the sensitivity of target detection, but also improve the accuracy of target detection.
本公开实施例提供了一种目标检测方法,包括:对待检测的第一图像进行特征提取,得到所述第一图像的多个尺度的第一特征图;通过已训练的目标检测网络对所述第一图像的多个尺度的第一特征图进行处理,得到所述第一图像中存在的目标类别的第一对象的位置;其中,所述目标检测网络采用递归的方式进行训练;所述目标检测网络包括分类子网络、回归子网络和分割子网络,所述分类子网络用于确定所述第一图像中是否存在所述第一对象、所述回归子网络用于确定所述第一图像中存在的第一对象的边界框,所述分割子网络用于确定所述第一图像中存在的第一对象的轮廓。An embodiment of the present disclosure provides a target detection method, including: performing feature extraction on a first image to be detected to obtain first feature maps of multiple scales of the first image; The first feature maps of multiple scales of the first image are processed to obtain the position of the first object of the target category existing in the first image; wherein, the target detection network is trained in a recursive manner; the target The detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, the classification sub-network is used to determine whether the first object exists in the first image, and the regression sub-network is used to determine the first image The bounding box of the first object existing in the first image, the segmentation sub-network is used to determine the outline of the first object existing in the first image.
在本公开实施例中,一方面,基于分类、回归和分割的多任务学习进行目标检测网络的训练,利用了任务间的关联性提升了对目标类别的对象的识别能力;另一方面,基于递归式的阶段性训练策略进行目标检测网络的训练,既提高了目标检测的敏感性,又提高了目标检测的准确性。In the embodiments of the present disclosure, on the one hand, the training of the target detection network is performed based on the multi-task learning of classification, regression and segmentation, and the correlation between tasks is used to improve the recognition ability of objects of the target category; The recursive phased training strategy is used to train the target detection network, which not only improves the sensitivity of target detection, but also improves the accuracy of target detection.
在一些实施例中,所述方法还包括:根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,所述第一训练集包括多个样本图像以及所述样本图像的第一标注信息,所述第一标注信息包括所述样本图像中第二对象的真实位置;通过所述第一状态的目标检测网络对所述样本图像进行处理,得到所述样本图像中第二对象的预测位置;根据所述第二对象的预测位置及真实位置,确定所述样本图像中的假阳性区域、假阴性区域及真阳性区域;根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,所述第二训练集包括多个样本图像以及所述样本图像的第二标注信息,所述第二标注信息包括所述样本图像中的假阳性区域、假阴性区域及真阳性区域。In some embodiments, the method further includes: training the target detection network according to a first training set to obtain a target detection network in a first state, where the first training set includes a plurality of sample images and the The first annotation information of the sample image, the first annotation information includes the real position of the second object in the sample image; the sample image is processed through the target detection network in the first state to obtain the sample image The predicted position of the second object in the sample image; according to the predicted position and real position of the second object, determine the false positive area, false negative area and true positive area in the sample image; A target detection network in one state is trained to obtain a trained target detection network. The second training set includes a plurality of sample images and second annotation information of the sample images, and the second annotation information includes the sample images. False positive regions, false negative regions, and true positive regions.
在本公开实施例中,将目标检测网络的训练过程拆分为两个阶段。在第一阶段中,重点关注敏感性,使目标检测网络尽可能获取更多的疑似第一对象;在第二阶段中,重点关注准确性,使目标检测网络在高敏感性的基础上获取较高的准确性。In the embodiment of the present disclosure, the training process of the target detection network is divided into two stages. In the first stage, the focus is on sensitivity, so that the target detection network can obtain as many suspected first objects as possible; in the second stage, the focus is on accuracy, so that the target detection network can obtain relatively high sensitivity based on high sensitivity. high accuracy.
在一些实施例中,所述多个样本图像包括正样本图像和负样本图像,所述方法还包括:对已标注的第二图像进行裁剪,得到预设尺寸的正样本图像及负样本图像,所述正样本图像中包括至少一个第二对象,所述负样本图像中不包括第二对象。In some embodiments, the plurality of sample images include positive sample images and negative sample images, and the method further includes: cropping the marked second image to obtain a positive sample image and a negative sample image of a preset size, The positive sample image includes at least one second object, and the negative sample image does not include the second object.
这样,可以改善因第二图像包含的数据量大、图像处理器(Graphics Processing Unit,GPU)的显存有限等原因而造成的GPU无法直接处理的问题。In this way, the problem that the GPU cannot be directly processed due to reasons such as the large amount of data contained in the second image and the limited video memory of a graphics processor (Graphics Processing Unit, GPU) can be improved.
在一些实施例中,所述第二对象的真实位置包括所述第二对象的边界框,所述根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,包括:对所述样本图像进行特征提 取,得到所述样本图像的多个尺度的第二特征图;根据所述多个尺度的第二特征图及预设的多个锚框,确定所述样本图像中的多个第一参考框;根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本,所述训练样本包括标注信息为属于目标类别的正样本,以及标注信息为不属于目标类别的负样本;根据所述训练样本,训练所述分类子网络。In some embodiments, the real position of the second object includes a bounding box of the second object, and the target detection network is trained according to a first training set to obtain a target detection network in a first state, The method includes: performing feature extraction on the sample image to obtain second feature maps of multiple scales of the sample image; determining the sample according to the second feature maps of multiple scales and a plurality of preset anchor frames A plurality of first reference frames in the image; according to the bounding box of the second object in the sample image, a preset number of training samples are determined from the plurality of first reference frames, and the training samples include label information as The positive samples belonging to the target category and the negative samples not belonging to the target category are marked with information; the classification sub-network is trained according to the training samples.
这样,可以平衡正负样本,避免过拟合,提高分类子网络的分类准确性。In this way, positive and negative samples can be balanced, overfitting can be avoided, and the classification accuracy of the classification sub-network can be improved.
在一些实施例中,所述根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本,包括:将所述样本图像中的边界框划分至多个边界框集合中,每个边界框集合中边界框的尺寸处于预设的尺寸区间内;针对任一边界框集合,从所述多个第一参考框中去除已被确定为训练样本的第一参考框,得到与所述边界框集合对应的参考框集合;针对所述边界框集合中的任一边界框,根据所述边界框与对应的参考框集合中的各个第一参考框之间的交并比,确定与所述边界框对应的正样本和负样本,所述正样本的数量与所述边界框集合的尺寸区间负相关;根据尺寸区间由小到大的顺序依次处理各个边界框集合,得到所述预设数量的训练样本。In some embodiments, determining a preset number of training samples from the plurality of first reference frames according to the bounding box of the second object in the sample image includes: converting the boundary in the sample image The frame is divided into multiple bounding box sets, and the size of the bounding box in each bounding box set is within a preset size interval; for any bounding box set, removing from the multiple first reference frames has been determined as training The first reference frame of the sample, to obtain a reference frame set corresponding to the bounding box set; for any bounding box in the bounding box set, according to the bounding box and each first reference in the corresponding reference frame set The intersection ratio between the boxes determines the positive samples and negative samples corresponding to the bounding box, and the number of positive samples is negatively correlated with the size interval of the bounding box set; according to the order of the size interval from small to large Each bounding box set is processed to obtain the preset number of training samples.
这样,可以兼顾尺寸较大的第二对象和尺寸较小的第二对象。In this way, the second object with a larger size and the second object with a smaller size can be taken into consideration.
在一些实施例中,所述根据所述训练样本,训练所述分类子网络,包括:对所述第二特征图进行裁剪,得到所述训练样本对应的第三特征图;将所述第三特征图输入所述分类子网络,得到所述训练样本属于目标类别的第一概率;根据所述训练样本属于目标类别的第一概率及所述训练样本的标注信息,确定所述分类子网络的第一损失;根据所述第一损失,调整所述分类子网络的网络参数。In some embodiments, the training of the classification sub-network according to the training sample includes: cropping the second feature map to obtain a third feature map corresponding to the training sample; The feature map is input to the classification sub-network, and the first probability that the training sample belongs to the target category is obtained; according to the first probability that the training sample belongs to the target category and the label information of the training sample, the classification sub-network is determined. The first loss; according to the first loss, adjust the network parameters of the classification sub-network.
这样,可以使第二对象的分类更准确。In this way, the classification of the second object can be made more accurate.
在一些实施例中,所述第二对象的真实位置包括所述第二对象的边界框,所述根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,包括:对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图;根据所述多个尺度的第四特征图及预设的多个锚框,确定所述正样本图像中的多个第二参考框;针对所述样本图像中第二对象的任一边界框:确定所述边界框与所述多个第二参考框的交并比,并将交并比最大的第二参考框确定为与所述边界框对应的匹配框;将所述匹配框对应的第五特征图输入所述回归子网络,得到所述匹配框的预测框;根据所述边界框与所述预测框之间的差异,确定所述回归子网络的第二损失;根据所述第二损失,调整所述回归子网络的网络参数。In some embodiments, the real position of the second object includes a bounding box of the second object, and the target detection network is trained according to a first training set to obtain a target detection network in a first state, The method includes: performing feature extraction on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image; multiple second reference frames in the positive sample image; for any bounding box of the second object in the sample image: determine the intersection ratio of the bounding frame and the multiple second reference frames, The second reference frame with the largest sum ratio is determined as the matching frame corresponding to the bounding box; the fifth feature map corresponding to the matching frame is input into the regression sub-network to obtain the prediction frame of the matching frame; according to the The difference between the bounding box and the prediction box determines the second loss of the regression sub-network; according to the second loss, the network parameters of the regression sub-network are adjusted.
这样,可以使第二对象的位置更准确。In this way, the position of the second object can be made more accurate.
在一些实施例中,所述根据所述边界框与所述预测框之间的差异,确定所述回归子网络的第二损失,包括:根据所述边界框与所述预测框之间的坐标偏移量及交并比,确定所述匹配框的第一回归损失;根据所述边界框与所述预测框之间的交集、并集及最小闭区域,确定所述匹配框的第二回归损失;根据所述第一回归损失及所述第二回归损失,确定所述回归子网络的第二损失。In some embodiments, the determining the second loss of the regression sub-network according to the difference between the bounding box and the prediction box includes: according to the coordinates between the bounding box and the prediction box Offset and intersection ratio, determine the first regression loss of the matching box; determine the second regression loss of the matching box according to the intersection, union and minimum closed area between the bounding box and the prediction box loss; according to the first regression loss and the second regression loss, determine the second loss of the regression sub-network.
这样,通过利用预测框和对应边界框的交并比为指导,给交并比较小的预测框更大的损失值,使采用该预测框对应的匹配框训练回归子网络的情况下,回归子网络的参数更新力度更大。In this way, by using the intersection ratio of the predicted frame and the corresponding bounding box as a guide, a larger loss value is given to the smaller predicted frame, so that when the regression sub-network is trained using the matching frame corresponding to the predicted frame, the regression sub-network will The parameters of the network are updated more vigorously.
在一些实施例中,所述第二对象的真实位置包括所述第二对象的轮廓,所述根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,包括:对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图;将所述多个尺度的第四特征图输入所述分割子网络,得到所述正样本图像各个像素点属于目标类别的第二概率;根据所述正样本图像的像素点数量、所述正样本图像中第二对象的轮廓以及各个像素点属于目标类别的第二概率,确定所述分割子网络的第三损失;根据所述第三损失,调整所述分割子网络的网络参数。In some embodiments, the real position of the second object includes the outline of the second object, and the target detection network is trained according to the first training set to obtain the target detection network in the first state, including : perform feature extraction on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image; input the fourth feature maps of multiple scales into the segmentation sub-network to obtain the positive sample The second probability that each pixel of the image belongs to the target category; the segmentation is determined according to the number of pixels in the positive sample image, the contour of the second object in the positive sample image, and the second probability that each pixel belongs to the target category The third loss of the sub-network; according to the third loss, the network parameters of the segmentation sub-network are adjusted.
这样,可以使第二对象的定位更加准确。In this way, the positioning of the second object can be made more accurate.
在一些实施例中,所述根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,包括:按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,确定假阳性区域、假阴性区域及真阳性区域对应的第五特征图;将所述第五特征图输入所述分类子网络,得到假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率;根据假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率,以及假阳性区域、假阴性区域及真阳性区域的真实类别,确定所述分类子网络的第四损失;根据所述第四损失,调整所述分类子网络的网络参数。In some embodiments, the training of the target detection network in the first state according to the second training set to obtain the trained target detection network includes: according to the second label information, performing training on the sample image The second feature maps of multiple scales of the The third probability that the false negative area and the true positive area belong to the target category; according to the third probability that the false positive area, the false negative area and the true positive area belong to the target category, and the true category of the false positive area, the false negative area and the true positive area , determine the fourth loss of the classification sub-network; adjust the network parameters of the classification sub-network according to the fourth loss.
在一些实施例中,所述根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,包括:按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,得到真阳性区域和假阴性区域对应的第六特征图;确定与所述真阳性区域和假阴性区域匹配的边界框;将所述第六特征图输入所述回归子网络,得到所述真阳性区域和假阴性区域的预测框;根据所述真阳性区域和假阴性区域的预测框和对应的边界框之间的差异,确定所述回归子网络的第五损失;根据所述第五损失,调整所述回归子网络的网络参数。In some embodiments, the training of the target detection network in the first state according to the second training set to obtain the trained target detection network includes: according to the second label information, performing training on the sample image The second feature maps of multiple scales are cropped to obtain the sixth feature map corresponding to the true positive area and the false negative area; determine the bounding box matching the true positive area and the false negative area; Input the regression sub-network to obtain the prediction frame of the true positive area and the false negative area; determine the regression sub-network according to the difference between the prediction frame of the true positive area and the false negative area and the corresponding bounding box The fifth loss; according to the fifth loss, adjust the network parameters of the regression sub-network.
在一些实施例中,所述根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,包括:将所述真阳性区域和假阴性区域对应的第六特征图输入所述分割子网络,得到所述真阳性区域和假阴性区域中各个像素点属于目标类别的第四概率;根据所述真阳性区域和假阴性区域的像素点数量、所述真阳性区域和假阴性区域中第二对象的轮廓以及各个像素点属于目标类别的第四概率,确定所述分割子网络的第六损失;根据所述第六损失,调整所述分割子网络的网络参数。In some embodiments, the training of the target detection network in the first state according to the second training set to obtain the trained target detection network includes: assigning the first state corresponding to the true positive area and the false negative area The six feature maps are input into the segmentation sub-network to obtain the fourth probability that each pixel in the true positive area and the false negative area belongs to the target category; according to the number of pixels in the true positive area and the false negative area, the true positive area The outline of the second object in the positive area and the false negative area and the fourth probability that each pixel belongs to the target category determines the sixth loss of the segmentation sub-network; according to the sixth loss, adjust the network of the segmentation sub-network parameter.
在一些实施例中,所述第一图像包括2D医学影像和/或3D医学影像,所述目标类别包括结节和/或囊肿。In some embodiments, the first image includes a 2D medical image and/or a 3D medical image, and the target category includes a nodule and/or a cyst.
本公开实施例提供了一种目标检测装置,包括:提取部分,配置为对待检测的第一图像进行特征提取,得到所述第一图像的多个尺度的第一特征图;第一处理部分,配置为通过已训练的目标检测网络对所述第一图像的多个尺度的第一特征图进行处理,得到所述第一图像中存在的目标类别的第一对象的位置;其中,所述目标检测网络采用递归的方式进行训练;所述目标检测网络包括分类子网络、回归子网络和分割子网络,所述分类子网络用于确定所述第一图像中是否存在所述第一对象、所述回归子网络用于确定所述第一图像中存在的第一对象的边界框,所述分割子网络用于确定所述第一图像中存在的第一对象的轮廓。An embodiment of the present disclosure provides a target detection device, comprising: an extraction part, configured to perform feature extraction on a first image to be detected to obtain first feature maps of multiple scales of the first image; a first processing part, is configured to process the first feature maps of multiple scales of the first image through the trained target detection network to obtain the position of the first object of the target category existing in the first image; wherein, the target The detection network is trained in a recursive manner; the target detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, and the classification sub-network is used to determine whether the first object, the The regression sub-network is used to determine the bounding box of the first object existing in the first image, and the segmentation sub-network is used to determine the outline of the first object existing in the first image.
本公开实施例提供了一种电子设备,包括:处理器;配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure provides an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。Embodiments of the present disclosure provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
本公开实施例提供一种计算机程序产品,包括计算机可读代码,在计算机可读代码在设备上运行的情况下,设备中的处理器执行用于实现本公开任一实施例中的视频检测方法的部分或全部步骤。Embodiments of the present disclosure provide a computer program product, including computer-readable codes. When the computer-readable codes are run on a device, a processor in the device executes the video detection method for implementing any of the embodiments of the present disclosure. some or all of the steps.
本公开实施例提供一种计算机程序,配置为存储计算机可读指令,所述计算机可读指令被执行时使得计算机执行本公开任一实施例中的视频检测方法的部分或全部步骤。An embodiment of the present disclosure provides a computer program configured to store computer-readable instructions, which, when executed, cause a computer to execute part or all of the steps of the video detection method in any of the embodiments of the present disclosure.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开实施例的其它特征将变得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. Other features of embodiments of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings, which are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the technical solutions of the present disclosure.
图1为本公开实施例提供的一种目标检测方法的实现流程示意图;FIG. 1 is a schematic diagram of an implementation flowchart of a target detection method provided by an embodiment of the present disclosure;
图2为本公开实施例提供的一种残差注意力网络的组成结构示意图;FIG. 2 is a schematic diagram of the composition and structure of a residual attention network according to an embodiment of the present disclosure;
图3为本公开实施例提供的一种特征金字塔网络的组成结构示意图;3 is a schematic diagram of the composition and structure of a feature pyramid network provided by an embodiment of the present disclosure;
图4为本公开实施例提供的一种目标检测架构的组成结构示意图;FIG. 4 is a schematic diagram of the composition structure of a target detection architecture provided by an embodiment of the present disclosure;
图5为在图4所示的目标检测网络为第一状态的目标检测网络的情况下肺结节的预测框的示意图;5 is a schematic diagram of a prediction frame of a lung nodule when the target detection network shown in FIG. 4 is the target detection network in the first state;
图6为在图4所示的目标检测网络为已训练的目标检测网络的情况下肺结节的预测框的示意图;6 is a schematic diagram of a prediction frame of a lung nodule when the target detection network shown in FIG. 4 is a trained target detection network;
图7为本公开实施例提供的一种目标检测装置的组成结构示意图;FIG. 7 is a schematic diagram of the composition and structure of a target detection device according to an embodiment of the present disclosure;
图8为本公开实施例提供的一种电子设备的组成结构示意图;FIG. 8 is a schematic diagram of the composition and structure of an electronic device according to an embodiment of the present disclosure;
图9为本公开实施例提供的一种电子设备的组成结构示意图。FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表 示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar function. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases. In addition, the term "at least one" herein refers to any combination of any one of the plurality or at least two of the plurality, for example, including at least one of A, B, and C, and may mean including from A, B, and C. Any one or more elements selected from the set of B and C.
另外,为了更好地说明本公开实施例,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开实施例同样可以实施。在一些实施例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开实施例的主旨。In addition, in order to better illustrate the embodiments of the present disclosure, numerous specific details are given in the following detailed description. It should be understood by those skilled in the art that the embodiments of the present disclosure may be practiced without certain specific details. In some embodiments, methods, means, components and circuits well known to those skilled in the art are not described in detail so as to highlight the gist of the embodiments of the present disclosure.
图1为本公开实施例提供的一种目标检测方法的实现流程示意图,如图1所示,所述方法可以包括:FIG. 1 is a schematic diagram of an implementation flowchart of a target detection method provided by an embodiment of the present disclosure. As shown in FIG. 1 , the method may include:
步骤S11,对待检测的第一图像进行特征提取,得到所述第一图像的多个尺度的第一特征图。Step S11, perform feature extraction on the first image to be detected, and obtain first feature maps of multiple scales of the first image.
步骤S12,通过已训练的目标检测网络对所述第一图像的多个尺度的第一特征图进行处理,得到所述第一图像中目标类别的第一对象的位置。Step S12 , processing the first feature maps of multiple scales of the first image through the trained target detection network to obtain the position of the first object of the target category in the first image.
其中,所述目标检测网络采用递归的方式进行训练;所述目标检测网络包括分类子网络、回归子网络和分割子网络,所述分类子网络用于确定所述第一图像中是否存在所述第一对象、所述回归子网络用于确定所述第一图像中存在的第一对象的边界框,所述分割子网络用于确定所述第一图像中存在的第一对象的轮廓。Wherein, the target detection network is trained in a recursive manner; the target detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, and the classification sub-network is used to determine whether the first image has the The first object and the regression sub-network are used for determining the bounding box of the first object existing in the first image, and the segmentation sub-network is used for determining the outline of the first object existing in the first image.
在本公开实施例中,一方面,基于分类、回归和分割的多任务学习进行目标检测网络的训练,利用了任务间的关联性提升了对目标类别的对象的识别能力;另一方面,基于递归式的阶段性训练策略进行目标检测网络的训练,既提高了目标检测的敏感性,又提高了目标检测的准确性。In the embodiments of the present disclosure, on the one hand, the training of the target detection network is performed based on the multi-task learning of classification, regression and segmentation, and the correlation between tasks is used to improve the recognition ability of objects of the target category; The recursive phased training strategy is used to train the target detection network, which not only improves the sensitivity of target detection, but also improves the accuracy of target detection.
在一些实施例中,所述目标检测方法可以由终端设备或服务器等电子设备执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行所述方法。In some embodiments, the target detection method may be performed by an electronic device such as a terminal device or a server, and the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal For digital processing (Personal Digital Assistant, PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc., the method can be implemented by the processor calling the computer-readable instructions stored in the memory. Alternatively, the method may be performed by a server.
在本公开实施例中,第一对象可以表示目标类别的对象。其中,目标类别可以包括结节(例如,肺结节和乳腺结节等)和囊肿等。第一图像可以表示待进行第一对象检测的图像。第一图像可以包括2D医学影像(例如,X光片等)和/或3D医学影像(例如,CT图像和核磁共振图像等)。本公开实施例对第一图像以及目标类别不做限制。根据本公开实施例提供的目标检测方法,可以对第一图像中是否存在第一对象进行检测,并可以得到第一对象在第一图像中的位置。在一些实施例中,在目标类别为肺结节的情况下,可以采用肺结节公开数据集LUNA初始化目标检测网络的网络参数,以减少网络训练时间长、梯度消失等问题。In an embodiment of the present disclosure, the first object may represent an object of a target category. The target categories may include nodules (eg, lung nodules, breast nodules, etc.), cysts, and the like. The first image may represent an image to be subjected to the first object detection. The first image may include 2D medical images (eg, X-ray films, etc.) and/or 3D medical images (eg, CT images and MRI images, etc.). This embodiment of the present disclosure does not limit the first image and the target category. According to the target detection method provided by the embodiment of the present disclosure, whether there is a first object in the first image can be detected, and the position of the first object in the first image can be obtained. In some embodiments, when the target category is pulmonary nodules, the network parameters of the target detection network can be initialized by using the public lung nodule data set LUNA to reduce problems such as long network training time and disappearance of gradients.
在步骤S11中,考虑到不同的第一对象之间的尺寸差异可能较大(例如,肺结节的直径在3毫米(mm)至30mm之间分布)。在对尺寸较小的第一对象进行目标检测的情况下,需要高分辨率下低阶特征信息(即尺度较小的特征图),在对尺寸较大的第一对象进行目标检测的情况下,需要大感受野下高阶特征信息(即尺度较大的特征图)。因此,为了兼顾不同尺寸的第一对象,提高目标检测的准确性,本步骤中可以从第一图像中提取多个尺度的第一特征图。这里,第一特征图可以用于表示对第一图像进行特征提取得到的特征图。在一个示例中,对于三维的第一图像,提取的多个尺度的第一特征图的尺度可以包括48*48*48,24*24*24,12*12*12和6*6*6等。对于二维的第一图像,提取的多个尺度的第一特征图的尺度可以包括48*48,24*24,12*12和6*6等。在本公开实施例之后的描述中,以三维的第一图像为示例进行说明,二维的第一图像的处理过程可以参照三维的第一图像。In step S11, it is considered that the size difference between different first subjects may be large (eg, the diameter of the lung nodules is distributed between 3 millimeters (mm) to 30 mm). In the case of target detection for a first object with a smaller size, low-level feature information at high resolution (ie, a feature map with a smaller scale) is required, and in the case of target detection for a first object with a larger size , requires high-order feature information under a large receptive field (ie, a feature map with a larger scale). Therefore, in order to take into account the first objects of different sizes and improve the accuracy of target detection, in this step, first feature maps of multiple scales may be extracted from the first image. Here, the first feature map may be used to represent a feature map obtained by performing feature extraction on the first image. In one example, for the three-dimensional first image, the scales of the extracted first feature maps of multiple scales may include 48*48*48, 24*24*24, 12*12*12, 6*6*6, etc. . For the two-dimensional first image, the scales of the extracted first feature maps of multiple scales may include 48*48, 24*24, 12*12, 6*6, and so on. In the following description of the embodiments of the present disclosure, a three-dimensional first image is used as an example for description, and the processing process of the two-dimensional first image may refer to the three-dimensional first image.
在实施中,可以通过特征提取网络对第一图像进行特征提取,得到第一图像的多个尺度的第一特征图。其中,特征提取网络可以为任何能够进行多尺度特征提取的网络。在一个示例中,特征提 取网络可以基于可视化数据库ImageNet中的海量图像训练得到。为了实现多尺度特征提取,本公开实施例中特征提取网络可以包括基础网络和特征金字塔网络(Feature Pyramid Networks,FPN)。In implementation, feature extraction may be performed on the first image through a feature extraction network to obtain first feature maps of multiple scales of the first image. The feature extraction network can be any network capable of multi-scale feature extraction. In one example, the feature extraction network can be trained on a large number of images in the visualization database ImageNet. In order to achieve multi-scale feature extraction, the feature extraction network in the embodiment of the present disclosure may include a basic network and a feature pyramid network (Feature Pyramid Networks, FPN).
其中,基础网络可以用于提取第一图像的基础特征图。在一些实施例中,基础网络可以包括残差网络(Residual Network,ResNet),例如ResNet18。其中,残差网络的骨干网中每层卷积参数可以设置为:卷积核大小K为3*3*3,步长S为1,扩展P为1,且每层卷积后连接一个批归一化(Batch Normalization,BN)层和线性整流单元(Rectified Linear Unit,ReLU)。在一些实施例中,基础网络可以包括残差网络和注意力模型(Attention Model)结合而成的残差注意力网络(Residual Attention Network)。考虑到残差网络通常是在整个图像范围上提取特征的,而在实际的目标检测中,第一对象的局部特征比远离第一对象的区域特征更具有参考价值。因此,基础网络中引入注意力模型可以使得基础网络能够重点地提取和学习到更具有参考价值的特征信息(即第一对象的局部特征)。也就是说,由残差注意力网络作为基础网络进行基础特征图的提取,可以使得提取到的基础特征图更能够代表第一对象的局部特征,进而提升目标检测的准确性。Wherein, the basic network can be used to extract the basic feature map of the first image. In some embodiments, the base network may include a residual network (Residual Network, ResNet), such as ResNet18. Among them, the convolution parameters of each layer in the backbone network of the residual network can be set as: the convolution kernel size K is 3*3*3, the step size S is 1, the expansion P is 1, and a batch is connected after each layer of convolution Normalization (Batch Normalization, BN) layer and linear rectification unit (Rectified Linear Unit, ReLU). In some embodiments, the basic network may include a Residual Attention Network (Residual Attention Network) formed by combining a residual network and an attention model (Attention Model). Considering that the residual network usually extracts features on the entire image range, in actual target detection, the local features of the first object are more valuable than the regional features far away from the first object. Therefore, the introduction of an attention model into the basic network can enable the basic network to focus on extracting and learning feature information with more reference value (ie, local features of the first object). That is to say, using the residual attention network as the basic network to extract the basic feature map can make the extracted basic feature map more representative of the local features of the first object, thereby improving the accuracy of target detection.
图2为本公开实施例提供的一种残差注意力网络的组成结构示意图,如图2所示,残差注意力网络包括:残差网络10和注意力模型20。通过残差网络可以获取第一图像31的主干特征图,通过注意力模型可以获取第一图像的注意力特征图(需要说明的是,注意力特征图的尺度与主干特征图的尺度相同),将主干特征图和注意力特征图相结合即可得到第一图像的基础特征图32。在一些实施例中,第一图像的基础特征图=(1+注意力特征图)*主干特征图。FIG. 2 is a schematic diagram of the composition and structure of a residual attention network provided by an embodiment of the present disclosure. As shown in FIG. 2 , the residual attention network includes: a residual network 10 and an attention model 20 . The backbone feature map of the first image 31 can be obtained through the residual network, and the attention feature map of the first image can be obtained through the attention model (it should be noted that the scale of the attention feature map is the same as the scale of the backbone feature map), The basic feature map 32 of the first image can be obtained by combining the backbone feature map and the attention feature map. In some embodiments, the base feature map of the first image=(1+attention feature map)*backbone feature map.
在一些实施例中,如图2所示,注意力模型可以包括全局均值池化单元21、全连接修正线性单元22和全连接激活单元23。In some embodiments, as shown in FIG. 2 , the attention model may include a global mean pooling unit 21 , a fully connected modified linear unit 22 and a fully connected activation unit 23 .
在获取到基础特征图之后,可以通过FPN获取第一图像的多个尺度的特征图。FPN包括下采样处理和上采样处理。其中,下采样处理可以降低特征图的尺度,扩大感受野,但是会丢失尺寸较小的第一对象的特征信息,上采样处理可以提高特征图的尺度,保留尺寸较小的第一对象的特征信息,但是会缩小感受野。After the basic feature map is acquired, feature maps of multiple scales of the first image may be acquired through FPN. FPN includes downsampling processing and upsampling processing. Among them, the downsampling process can reduce the scale of the feature map and expand the receptive field, but it will lose the feature information of the first object with a small size, and the upsampling process can increase the scale of the feature map and retain the features of the first object with a small size information, but narrows the receptive field.
以FPN从基础特征图中获取第一图像的4个尺度(包括:48*48*48,24*24*24,12*12*12和6*6*6,单位:像素)的第一特征图为例进行说明。图3为本公开实施例提供的一种FPN的组成结构示意图,如图3所示,C1可以用于表示通过基础网络获取的第一图像的基础特征图。由于最终需要4个尺度的第一特征图,因此,在本公开实施例中,对C1依次进行4次下采样,分别得到C2、C3、C4和C5。将C5与1*1*1的卷积核进行卷积,得到P5;对P5进行上采样,将C4与1*1*1的卷积核进行卷积,P5的上采样结果和C4的卷积结果相加得到P4;对P4上进行上采样,将C3与1*1*1的卷积核进行卷积,P4的上采样结果和C3的卷积结果相加得到P3;对P3进行上采样,将C2与1*1*1的卷积核进行卷积,P3的上采样结果和C2的卷积结果相加得到P2。将P5、P4、P3和P2分别与3*3*3的卷积核进行卷积,可以得到6*6*6、12*12*12、24*24*24和48*48*48的特征图,也就得到了第一图像的4个尺度的第一特征图。Obtain the first features of 4 scales (including: 48*48*48, 24*24*24, 12*12*12 and 6*6*6, unit: pixel) of the first image from the base feature map with FPN Figure as an example to illustrate. FIG. 3 is a schematic diagram of the composition and structure of an FPN provided by an embodiment of the present disclosure. As shown in FIG. 3 , C1 may be used to represent a basic feature map of a first image acquired through a basic network. Since the first feature maps of four scales are finally required, in the embodiment of the present disclosure, C1 is sequentially downsampled four times to obtain C2, C3, C4, and C5, respectively. Convolve C5 with the convolution kernel of 1*1*1 to get P5; upsample P5, convolve C4 with the convolution kernel of 1*1*1, the upsampling result of P5 and the volume of C4 Add the product results to get P4; upsample P4, convolve C3 with the 1*1*1 convolution kernel, add the upsampling result of P4 and the convolution result of C3 to get P3; perform upsampling on P3 Sampling, convolve C2 with the convolution kernel of 1*1*1, and add the upsampling result of P3 and the convolution result of C2 to obtain P2. Convolve P5, P4, P3 and P2 with 3*3*3 convolution kernels, respectively, to get 6*6*6, 12*12*12, 24*24*24 and 48*48*48 features Figure, that is, the first feature map of the four scales of the first image is obtained.
在本公开实施例中,通过FPN将基础网络提取的基础特征图转换为多尺度的特征图,可以对多种尺寸的第一对象进行检测,通过简单的网络连接改变,在基本不增加计算量的情况下,可以有效提升检测小尺寸的第一对象的性能。In the embodiment of the present disclosure, the basic feature map extracted by the basic network is converted into a multi-scale feature map through FPN, so that the first object of various sizes can be detected, and the amount of calculation can be basically not increased by changing the simple network connection. In the case of , the performance of detecting the first object of small size can be effectively improved.
在步骤S12中,可以通过已训练的目标检测网络对第一图像的多个尺度的第一特征图进行处理,从而得到第一图像中存在的第一对象的位置。In step S12, the first feature maps of multiple scales of the first image may be processed by the trained target detection network, so as to obtain the position of the first object existing in the first image.
其中,第一对象的位置可以通过第一对象边界框和第一对象的轮廓表示。目标检测网络包括分类子网络、回归子网络和分割子网络,其中,分类子网络可以用于确定第一图像中是否存在所述第一对象,回归子网络可以用于确定第一图像中存在的第一对象的边界框,分割子网络可以用于确定第一图像中存在的第一对象的轮廓。通过分类、回归和分割多个任务共同训练得到的,利用任务间的关联性可以提升对第一对象的识别能力。并且,在本公开实施例中,上述包括分类子网络、回归子网络和分割子网络的目标检测网络是采用递归的方式训练完成的,在提高目标检测的敏感性的基础上,可以提高目标检测的准确性。The position of the first object may be represented by the bounding box of the first object and the outline of the first object. The target detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, wherein the classification sub-network can be used to determine whether the first object exists in the first image, and the regression sub-network can be used to determine whether the first object exists in the first image. The bounding box of the first object, the segmentation sub-network may be used to determine the outline of the first object present in the first image. It is obtained through the joint training of multiple tasks of classification, regression and segmentation, and the ability to recognize the first object can be improved by using the correlation between tasks. Moreover, in the embodiment of the present disclosure, the above-mentioned target detection network including the classification sub-network, the regression sub-network and the segmentation sub-network is trained in a recursive manner. On the basis of improving the sensitivity of target detection, the target detection can be improved. accuracy.
在本公开实施例中,基于多任务学习和递归式训练得到了已训练的目标检测网络。考虑到对目标检测网络而言:在保持敏感性较高的情况下,存在准确性较低(即存在大量对象被错误分类)的 问题;在保持准确性较高的情况下,存在敏感性较低(即存在大量目标类别的对象未被检测出)的问题。举例来说:在敏感性到达95%以上的情况下,存在大量的假阳性样本图像(约为32%);将假阳性样本图像控制在3%以下的情况下,敏感性较低(约有20%的目标未被检测出)。In the embodiment of the present disclosure, a trained target detection network is obtained based on multi-task learning and recursive training. Considering that for the target detection network: in the case of maintaining high sensitivity, there is a problem of low accuracy (that is, a large number of objects are misclassified); in the case of maintaining high accuracy, there is a problem of high sensitivity. low (that is, there are a large number of objects of the target class that are not detected). For example: when the sensitivity reaches more than 95%, there are a large number of false positive sample images (about 32%); when the false positive sample images are controlled below 3%, the sensitivity is low (about 32%). 20% of objects are not detected).
因此,在本公开实施例中,将目标检测网络的训练过程拆分为两个阶段。在第一阶段中,重点关注敏感性,使目标检测网络尽可能获取更多的疑似第一对象;在第二阶段中,重点关注准确性,使目标检测网络在高敏感性的基础上获取较高的准确性。Therefore, in the embodiment of the present disclosure, the training process of the target detection network is divided into two stages. In the first stage, the focus is on sensitivity, so that the target detection network can obtain as many suspected first objects as possible; in the second stage, the focus is on accuracy, so that the target detection network can obtain relatively high sensitivity based on high sensitivity. high accuracy.
在一些实施例中,所述方法还包括:根据第一训练集,对目标检测网络进行训练,得到第一状态的目标检测网络;根据第二训练集,对第一状态的目标检测网络进行训练,得到已训练的目标检测网络。In some embodiments, the method further includes: training the target detection network according to the first training set to obtain the target detection network in the first state; and training the target detection network in the first state according to the second training set , to get the trained object detection network.
也就是说,在本公开实施例中将目标检测网络的训练过程拆分为两个阶段:第一阶段的训练中,根据第一训练集,对目标检测网络进行训练,得到第一状态的目标检测网络,为第一阶段的训练;在第二阶段的训练中,对第一状态的目标检测网络进行训练,得到已训练的目标检测网络。That is to say, in the embodiment of the present disclosure, the training process of the target detection network is divided into two stages: in the training of the first stage, the target detection network is trained according to the first training set, and the target of the first state is obtained. The detection network is the training of the first stage; in the training of the second stage, the target detection network in the first state is trained to obtain the trained target detection network.
在第一阶段中,采用第一训练集进行目标检测网络的训练。其中,第一训练集包括多个样本图像以及所述样本图像的第一标注信息,所述第一标注信息包括所述样本图像中第二对象的真实位置。其中,所述多个样本图像包括正样本图像和负样本图像。这里,正样本图像中包括至少一个第二对象,负样本图像中不包括第二对象。第二对象可以表示训练样本图像中存在的目标类别的对象,第二对象可以参照第一对象,这里不再赘述。In the first stage, the first training set is used to train the target detection network. The first training set includes a plurality of sample images and first annotation information of the sample images, where the first annotation information includes the real position of the second object in the sample image. Wherein, the plurality of sample images include positive sample images and negative sample images. Here, the positive sample image includes at least one second object, and the negative sample image does not include the second object. The second object may represent an object of the target category existing in the training sample image, and the second object may refer to the first object, which will not be repeated here.
下面对第一训练集的获取过程进行说明。The acquisition process of the first training set will be described below.
在一些实施中,所述方法还包括:对已标注的第二图像进行裁剪,得到预设尺寸的正样本图像及负样本图像。In some implementations, the method further includes: cropping the marked second image to obtain a positive sample image and a negative sample image of a preset size.
第二图像可以用于表示已标注的图像。在一个示例中,第二图像可以为已标注的医学影像。第二图像的标注信息可以用于指示第二图像中每个第二对象真实位置(包括边界框和轮廓)。在一些实施例中,第二对象的边界框可以采用二值化长方体表示。在一些实施例中,第二对象的边界框可以采用二值化球体表示。可以理解的是,该二值化球体的中心点与第二对象的中心点相同,该二值化球体的半径为根据需要设定的半径。第二对象的轮廓可以采用第二图像中每个像素点的是否为目标类别进行表示。预设尺寸可以根据需要设置,举例来说,预设尺寸可以为96*96*96(单位:像素*像素*像素)。The second image may be used to represent the annotated image. In one example, the second image may be an annotated medical image. The annotation information of the second image may be used to indicate the real position (including the bounding box and outline) of each second object in the second image. In some embodiments, the bounding box of the second object may be represented by a binarized cuboid. In some embodiments, the bounding box of the second object may be represented by a binarized sphere. It can be understood that the center point of the binarized sphere is the same as the center point of the second object, and the radius of the binarized sphere is a radius set as required. The contour of the second object may be represented by whether each pixel in the second image is a target category. The default size can be set as required, for example, the default size can be 96*96*96 (unit: pixel*pixel*pixel).
在实施中,可以按照第二图像的标注信息,从所述第二图像中获取预设尺寸的正样本图像和负样本图像。In implementation, a positive sample image and a negative sample image of a preset size may be acquired from the second image according to the label information of the second image.
在一些实施例中,可以按照第二图像的标注信息,确定第二图像中各第二对象的位置(中心点和边界框等)。然后根据第二对象的位置(例如,以第二对象为中心),从第二图像中裁剪出尺寸为预设尺寸且包括第二对象的图像块,以及裁剪出尺寸为预设尺寸且不包括第二对象的图像块。裁剪出的包括第二对象的图像块可以作为正样本图像,裁剪出的不包括第二对象的图像块可以作为负样本图像。In some embodiments, the position (center point, bounding box, etc.) of each second object in the second image may be determined according to the label information of the second image. Then, according to the position of the second object (eg, centered on the second object), an image block with a size of a preset size and including the second object is cropped from the second image, and an image block with a size of a preset size and not including the second object is cropped from the second image. The image block of the second object. The cropped image block including the second object may be used as a positive sample image, and the cropped image block not including the second object may be used as a negative sample image.
通过对第二图像进行裁剪获取包括第二对象的图像块和不包括第二对象的图像块,可以改善因第二图像包含的数据量大、图像处理器(Graphics Processing Unit,GPU)的显存有限等原因而造成的GPU无法直接处理的问题。通过裁剪预设尺寸的图像块可以降低第二对象所在区域与非第二对象所在区域不平衡的问题,例如肺部CT图像中肺结节区域的尺寸远小于正常组织区域的尺寸的问题。By cropping the second image to obtain image blocks including the second object and image blocks not including the second object, it is possible to improve the problems caused by the large amount of data contained in the second image and the limited video memory of the graphics processor (Graphics Processing Unit, GPU). Problems that the GPU cannot directly handle due to other reasons. By cropping an image block of a preset size, the problem of imbalance between the area where the second object is located and the area where the second object is not located can be reduced, for example, the size of the lung nodule area in the lung CT image is much smaller than the size of the normal tissue area.
在一些实施例中,对裁剪出的包括第二对象的图像块和不包括第二对象的图像块通过旋转、平移、镜像和缩放等操作进行数据增强,从而实现数据扩充,增加包括第二对象的图像块的数量,以及增加不包括第二对象的图像块的数量。这些通过数据增加得到的包括第二对象的图像块也可以作为正样本图像,这些通过数据增强得到的不包括第二对象的图像块也可以作为负样本图像。通过对裁剪出的包括第二对象的图像块和不包括第二对象的图像块进行数据增强,可以有效的扩增样本图像的数量,并提高目标检测网络的泛化能力。In some embodiments, data augmentation is performed on the cropped image blocks including the second object and the image blocks not including the second object through operations such as rotation, translation, mirroring, and scaling, so as to implement data expansion and increase the data including the second object. , and increase the number of image blocks that do not include the second object. These image blocks including the second object obtained through data augmentation can also be used as positive sample images, and these image blocks obtained through data augmentation without including the second object can also be used as negative sample images. By performing data enhancement on the cropped image blocks including the second object and the image blocks not including the second object, the number of sample images can be effectively enlarged, and the generalization ability of the target detection network can be improved.
在一些实施例中,获取的正样本图像的数量和负样本图像的数量相同。通过获取相同数量的包括第二对象的图像块和不包括第二对象的图像块,可以有效平衡正负样本图像,从而减少过拟合。In some embodiments, the same number of positive sample images and negative sample images are acquired. By acquiring the same number of image blocks including the second object and image blocks not including the second object, the positive and negative sample images can be effectively balanced, thereby reducing overfitting.
在一些实施例中,可以首先通过对已标注的第二图像进行预处理,然后对预处理后的第二图像进行裁剪,得到预设尺寸的正样本图像及负样本图像。这样,可以提升获取到的正样本图像和负样本图像的图像质量,有利于后续对目标检测网络的训练。对第二图像的预处理可以包括重采样、裁剪和归一化等中的一者或多者。In some embodiments, a positive sample image and a negative sample image of a preset size may be obtained by first preprocessing the marked second image, and then cropping the preprocessed second image. In this way, the image quality of the obtained positive sample images and negative sample images can be improved, which is beneficial to the subsequent training of the target detection network. Preprocessing of the second image may include one or more of resampling, cropping, normalization, and the like.
以肺部CT图像作为第二图像为例,对第二图像的预处理过程进行说明。考虑到肺部CT图像为3D图像,不同CT仪器拍摄得到的CT图像的厚度可能不同(例如肺部CT图像的厚度可以为4mm、2.5mm、1.25mm、1mm和0.7mm等)。通过将肺部CT图像重采样到1*1*1的分辨率下,可以有效消除肺部CT图像之间的厚度差异。在重采样之后,可以裁剪出肺部实质所在的区域。这样,可以使得正样本图像和负样本图像均为肺部区域的组织,可以减少其他器官对训练目标检测网络的干扰。在裁剪出肺部实质所在区域之后,可以将裁剪出的区域中各像素(也可以称为体素)的值归一化到0-1的值域范围内,得到预处理后的肺部CT图像。这样可以有效降低后续的计算量。Taking the lung CT image as the second image as an example, the preprocessing process of the second image will be described. Considering that lung CT images are 3D images, the thickness of CT images obtained by different CT instruments may be different (for example, the thickness of lung CT images may be 4 mm, 2.5 mm, 1.25 mm, 1 mm, and 0.7 mm, etc.). By resampling the lung CT images to a resolution of 1*1*1, the thickness difference between the lung CT images can be effectively eliminated. After resampling, the area where the lung parenchyma is located can be cropped out. In this way, both the positive sample image and the negative sample image can be made of tissue in the lung area, which can reduce the interference of other organs on the training target detection network. After cropping out the area where the lung parenchyma is located, the value of each pixel (also called voxel) in the cropped area can be normalized to a value range of 0-1 to obtain the preprocessed lung CT image. This can effectively reduce the amount of subsequent calculations.
需要说明的是,从预处理后的第二图像中裁剪预设尺寸的正样本图像和负样本图像的方式可以参照从第二图像中直接裁剪预设尺寸的正样本图像和负样本图像的方式。It should be noted that, the method of cropping the positive sample image and the negative sample image of the preset size from the preprocessed second image may refer to the method of directly cropping the positive sample image and the negative sample image of the preset size from the second image. .
至此,完成了正样本图像和负样本图像的获取,也就是完成了第一训练集中样本图像的获取。So far, the acquisition of positive sample images and negative sample images is completed, that is, the acquisition of sample images in the first training set is completed.
可以理解的是,按照第二图像的标注信息,可以确定出第二图像中每个第二对象的位置。因此,按照所述第二图像的标注信息,可以确定每个正样本图像的标注信息以及每个负样本图像的标注信息,也就是确定了第一训练集中每个样本图像的第一标注信息。It can be understood that, according to the label information of the second image, the position of each second object in the second image can be determined. Therefore, according to the annotation information of the second image, the annotation information of each positive sample image and the annotation information of each negative sample image can be determined, that is, the first annotation information of each sample image in the first training set is determined.
至此,获取了第一训练集中的样本图像,确定了每个样本图像的第一标注信息。也就是说,完成了第一训练集的获取。下面对采用该第一训练集,对目标检测网络进行训练,得到第一状态的目标检测网络的过程进行说明。So far, the sample images in the first training set are obtained, and the first label information of each sample image is determined. That is, the acquisition of the first training set is completed. The following describes the process of using the first training set to train the target detection network to obtain the target detection network in the first state.
所述根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络包括所述根据第一训练集,分别对目标检测网络的分类子网络、回归子网络和分割子网络进行训练。在本公开实施例中,基于分类、回归和分割的多任务学习进行目标检测网络的训练,利用了任务间的关联性提升了对目标类别的对象的识别能力。The training of the target detection network according to the first training set to obtain the target detection network in the first state includes the classification, regression and segmentation of the target detection network according to the first training set. The network is trained. In the embodiment of the present disclosure, the training of the target detection network is performed based on the multi-task learning of classification, regression and segmentation, and the ability to recognize objects of the target category is improved by utilizing the correlation between the tasks.
在进行分类子网络的训练时,需要使用的样本图像包括:正本图像和负样本图像,需要使用的标注信息包括:第二对象的边界框。When training the classification sub-network, the sample images to be used include: the original image and the negative sample image, and the label information to be used includes: the bounding box of the second object.
在一些实施例中,所述根据所述第一训练集,对目标检测网络的分类子网络进行训练可以包括:步骤S21至步骤S24。In some embodiments, the training of the classification sub-network of the target detection network according to the first training set may include steps S21 to S24.
在步骤S21中,对所述样本图像进行特征提取,得到所述样本图像的多个尺度的第二特征图。In step S21, feature extraction is performed on the sample image to obtain second feature maps of multiple scales of the sample image.
其中,第二特征图可以表示从样本图像中提取的特征图。对样本图像进行特征提取的过程可以参照通过对第一图像进行特征提取的过程。举例来说,第二特征图的尺度可以包括6*6**6、12*12*12、24*24*24和48*48*48等。Wherein, the second feature map may represent a feature map extracted from the sample image. The process of performing feature extraction on the sample image may refer to the process of performing feature extraction on the first image. For example, the scale of the second feature map may include 6*6**6, 12*12*12, 24*24*24, 48*48*48, and so on.
在步骤S22中,根据所述多个尺度的第二特征图及预设的多个锚框,确定所述样本图像中的多个第一参考框。In step S22, a plurality of first reference frames in the sample image are determined according to the second feature maps of the plurality of scales and a plurality of preset anchor frames.
其中,预设的锚框可以用于指示第一参考框的大小。预设的锚框可以根据需要进行预先设置。在一些实施例中,肺结节的大小为3mm到30mm,因此预设的锚框的面积可以设置为4、8、16和32(单位:像素*像素)等。预设的同一面积的锚框的形状可以有多个。以预设的锚框的面积为4来说,预设的锚框的形状可以包括:1*4、2*2和4*1(单位:像素*像素)。以预设的锚框的面积为8来说,预设的锚框的形状可以包括:1*8、2*4、4*2和8*1。本公开实施例中,预设的锚框的面积和形状均可以预先根据需要进行设置,本公开实施例对预设的锚框的面积和形状不做限制。The preset anchor frame may be used to indicate the size of the first reference frame. The preset anchor boxes can be preset as needed. In some embodiments, the size of the lung nodule is 3 mm to 30 mm, so the area of the preset anchor frame can be set to 4, 8, 16, and 32 (unit: pixel*pixel), etc. There can be multiple preset anchor boxes with the same area. Assuming that the area of the preset anchor frame is 4, the shape of the preset anchor frame may include: 1*4, 2*2 and 4*1 (unit: pixel*pixel). Assuming that the area of the preset anchor frame is 8, the shapes of the preset anchor frame may include: 1*8, 2*4, 4*2 and 8*1. In the embodiment of the present disclosure, the area and shape of the preset anchor frame can be set in advance as required, and the embodiment of the present disclosure does not limit the area and shape of the preset anchor frame.
针对样本图像的一个尺度的第二特征图,可以在样本图像中确定出多个第一参考框的中心点。举例来说,假设样本图像的某个尺度的特征图的尺度为3*3*3,则将样本图像平均分为9个区域,每个区域的中心点即为一个第一参考框的中心点。针对一个第一参考框的中心点和一个预设的锚框,可以确定出一个第一参考框。For the second feature map of one scale of the sample image, the center points of a plurality of first reference frames may be determined in the sample image. For example, assuming that the scale of the feature map of a certain scale of the sample image is 3*3*3, the sample image is divided into 9 areas on average, and the center point of each area is the center point of a first reference frame. . For a center point of a first reference frame and a preset anchor frame, a first reference frame may be determined.
在步骤S23中,根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本。In step S23, a preset number of training samples are determined from the plurality of first reference frames according to the bounding frame of the second object in the sample image.
其中,训练样本包括正样本和负样本,正样本的标注信息为属于目标类别,负样本的标注信息 为不属于目标类别。Among them, the training samples include positive samples and negative samples, the label information of positive samples belongs to the target category, and the label information of negative samples does not belong to the target category.
根据第一参考框和第二对象的边界框的交并比,可以确定第一参考框与第二对象的边界框的差距,从而确定出该第一参考框的标签是目标类别还是非目标类别。在一个第一参考框与一个第二对象的边界框的交并比较大的情况下,表明两者之间的差距较小,此时该第一参考框的标签可能为目标类别,该第一参考框可以作为分类子网络的正样本。在一个第一参考框与一个边界框的交并比较小的情况下,表明两者之间的差距较大,此时该第一参考框可能为非目标类别,该第一参考框可以作为分类子网络的负样本。According to the intersection ratio of the first reference frame and the bounding box of the second object, the gap between the first reference frame and the bounding box of the second object can be determined, so as to determine whether the label of the first reference frame is a target category or a non-target category . In the case where the intersection of a first reference frame and a bounding box of a second object is relatively large, it indicates that the gap between the two is small. At this time, the label of the first reference frame may be the target category. The reference frame can be used as a positive sample for the classification sub-network. In the case where the intersection of a first reference frame and a bounding box is relatively small, it indicates that the gap between the two is large. At this time, the first reference frame may be a non-target category, and the first reference frame can be used as a classification Negative samples for the subnetworks.
在一些实施例中,步骤S23可以包括:将所述样本图像中的边界框划分至多个边界框集合中,每个边界框集合中边界框的尺寸处于预设的尺寸区间内;针对任一边界框集合,从所述多个第一参考框中去除已被确定为训练样本的第一参考框,得到与所述边界框集合对应的参考框集合;针对所述边界框集合中的任一边界框,根据所述边界框与对应的参考框集合中的各个第一参考框之间的交并比,确定与所述边界框对应的正样本和负样本,所述正样本的数量与所述边界框集合的尺寸区间负相关;根据尺寸区间由小到大的顺序依次处理各个边界框集合,得到所述预设数量的训练样本。In some embodiments, step S23 may include: dividing the bounding box in the sample image into multiple bounding box sets, and the size of the bounding box in each bounding box set is within a preset size interval; A frame set, removing the first reference frame that has been determined as a training sample from the plurality of first reference frames, to obtain a reference frame set corresponding to the bounding box set; for any boundary in the bounding box set frame, according to the intersection ratio between the bounding box and each first reference frame in the corresponding reference frame set, determine the positive samples and negative samples corresponding to the bounding box, and the number of the positive samples is the same as that of the The size intervals of the bounding box sets are negatively correlated; each bounding box set is sequentially processed according to the order of the size intervals from small to large, to obtain the preset number of training samples.
由于第二对象之间的尺寸差距较大,因此,第二对象的边界框之间的尺寸差距也较大。为了兼顾尺寸较大的第二对象和尺寸较小的第二对象,在本公开实施例中,可以按照尺寸将样本图像中的边界框划分至多个边界框集合中,然后对各个边界框集合分别进行处理。Since the size gap between the second objects is large, the size gap between the bounding boxes of the second objects is also large. In order to take into account the second object with a larger size and the second object with a smaller size, in this embodiment of the present disclosure, the bounding box in the sample image may be divided into multiple bounding box sets according to the size, and then each bounding box set is divided into multiple bounding box sets. to be processed.
在实施中,可以为每个边界框集合预设一个尺寸区间。在一个边界框的尺寸在某个边界框集对应的尺寸区间内的情况下,该边界框即可划分到该边界框集合中。这样,每个边界框集合中边界框的尺寸都是处于为该边界框集合预设的尺寸区间内。In implementation, a size interval can be preset for each bounding box set. When the size of a bounding box is within a size range corresponding to a bounding box set, the bounding box can be divided into the bounding box set. In this way, the size of the bounding boxes in each bounding box set is within a preset size range for the bounding box set.
为边界框集合预设的尺寸区间可以根据需要(例如根据第二对象的大小)进行设置,本公开实施例对尺寸区间不做限制。以肺结节作为第二对象为例进行说明。肺结节的大小在3mm至30mm之间,其中,尺寸小于或者等于6mm的可以称为小结节,尺寸大于6mm且小于12mm之间的称为中结节,尺寸大于或者等于12mm的称为大结节。因此,设置三个边界框集合,并为每个边界框集合设置一个尺寸区间。The size interval preset for the bounding box set may be set as required (for example, according to the size of the second object), and the embodiment of the present disclosure does not limit the size interval. A pulmonary nodule is taken as an example of the second object for description. The size of pulmonary nodules is between 3mm and 30mm. Among them, those with a size less than or equal to 6mm can be called small nodules, those with a size greater than 6mm and less than 12mm are called middle nodules, and those with a size greater than or equal to 12mm are called nodules. large nodules. Therefore, set three bounding box sets, and set a size interval for each bounding box set.
在完成边界框集合的划分之后,可以按照尺寸区间由小到大的顺序,依次处理各个边界框集合。After the division of the bounding box set is completed, each bounding box set may be processed in sequence according to the order of size intervals from small to large.
第一边界框集合可以表示划分出的多个边界框集合中的任意一个。处理其他边界框集合的过程可以参考处理第一边界框集合的过程。处理第一边界框集合的过程包括:从所述多个第一参考框中去除已被确定为训练样本的第一参考框,得到所述第一边界框集合对应的参考框集合;针对所述第一边界框集合中任意一个边界框:根据该边界框与所述第一边界框集合对应的参考框集合中的各个第一参考框之间的交并比,确定该边界框对应的正样本和负样本。The first bounding box set may represent any one of the divided bounding box sets. For the process of processing other bounding box sets, refer to the process of processing the first bounding box set. The process of processing the first bounding box set includes: removing a first reference frame determined as a training sample from the plurality of first reference frames to obtain a reference frame set corresponding to the first bounding box set; Any one of the bounding boxes in the first bounding box set: according to the intersection ratio between the bounding box and each first reference frame in the reference frame set corresponding to the first bounding box set, determine the positive sample corresponding to the bounding box and negative samples.
参考框集合中包括多个第一参考框,参考框集合可以限制选取正样本和负样本的范围。在第一边界框集合为排序后第一个被处理的边界框集合的情况下,表明当前不存在被确定为训练样本(包括正样本和负样本)的第一参考框。在该情况下,可以针对任意一个样本图像,使用该样本图像中所有的第一参考框组成第一边界框集合对应的参考框集合。在第一边界框集合为排序后非第一个被处理的边界框集合的情况下,表明部分第一参考框可能已经被确定为了训练样本。在该情况下,针对任意一个样本图像,可以将该样本图像的第一参考框中被确定为了训练样本的第一参考框行剔除,使用剩余的第一参考框中组成第一边界框集合对应的参考框集合。这样,可以减少交并比计算次数,降低计算量和工作量。The reference frame set includes a plurality of first reference frames, and the reference frame set can limit the range of selecting positive samples and negative samples. If the first bounding box set is the first processed bounding box set after sorting, it indicates that there is currently no first reference box determined as a training sample (including positive samples and negative samples). In this case, for any sample image, all the first reference frames in the sample image may be used to form a reference frame set corresponding to the first bounding frame set. If the first bounding box set is not the first processed bounding box set after sorting, it indicates that some of the first reference boxes may have been determined as training samples. In this case, for any sample image, the first reference frame of the sample image can be determined as the first reference frame row of the training sample, and the remaining first reference frame can be used to form a first bounding box set corresponding to collection of reference frames. In this way, the number of computations of the cross-union ratio can be reduced, and the amount of computation and workload can be reduced.
在本公开实施例中,一个边界框对应的正样本的数量与该边界框所述边界框集合的尺寸区间负相关。也就是说,在一个边界框所属边界框集合的尺寸区间较大的情况下,该边界框对应的正样本的数量较少;在一个边界框所属边界框集合的尺寸区间较小的情况下,该边界框对应的正样本的数量较多。以肺结节作为第二对象为例进行说明,代表小结节边界框集合对应正样本的数量可以为6,代表中结节的边界框对应正样本的数量可以为4,代表大结节的边界框对应正样本的数量可以为2。由于尺寸较小的第二对象的学习难度较高,尺寸较大的第二对象的学习难度较低,这样,给尺寸较小的第二对象确定较多的正样本,给尺寸较大的第二对象确定较少的正样本,可以平衡学习不同尺寸的第二对象的难易程度,从而可以确保各种尺寸的第二对象都有足够的敏感性。In the embodiment of the present disclosure, the number of positive samples corresponding to a bounding box is negatively correlated with the size interval of the bounding box set of the bounding box. That is to say, when the size interval of the bounding box set to which a bounding box belongs is large, the number of positive samples corresponding to the bounding box is small; when the size interval of the bounding box set to which a bounding box belongs is small, The number of positive samples corresponding to the bounding box is large. Taking lung nodules as the second object for illustration, the number of positive samples corresponding to the bounding box set representing small nodules can be 6, the number of positive samples corresponding to the bounding box representing medium nodules can be 4, and the number of positive samples representing large nodules can be 4. The number of positive samples corresponding to the bounding box can be 2. Since the learning difficulty of the second object with a smaller size is higher, and the learning difficulty of the second object with a larger size is lower, in this way, more positive samples are determined for the second object with a smaller size, and more positive samples are determined for the second object with a larger size. Determining fewer positive samples for the second object can balance the difficulty of learning second objects of different sizes, thereby ensuring that the second objects of various sizes have sufficient sensitivity.
在一些实施例中,针对所述第一边界框集合中每个边界框,可以按照对应的参考框集合中各第 一参考框与该边界框的交并比由小到大的顺序,对该参考框集合中各第一参考框进行排序,将第一个至第N个第一参考框确定为该边界框对应的正样本,其中,N可以根据需要进行设置;将交并比在指定阈值(可以根据需要进行设置,例如可以为大于0.02且小于0.2)内的第一参考框确定为该边界框对应的负样本。并且,为了减少过拟合,可以使一个边界框对应的正样本的数量和负样本的数量相同或相近。In some embodiments, for each bounding box in the first bounding box set, in the order of the intersection ratio of each first reference box in the corresponding reference frame set and the bounding box from small to large, the The first reference frames in the reference frame set are sorted, and the first to Nth first reference frames are determined as the positive samples corresponding to the bounding frame, where N can be set as required; (It can be set as required, for example, it can be greater than 0.02 and less than 0.2) The first reference frame is determined as the negative sample corresponding to the bounding box. And, in order to reduce over-fitting, the number of positive samples corresponding to a bounding box can be the same or similar to the number of negative samples.
在步骤S24中,根据所述训练样本,训练所述分类子网络。In step S24, the classification sub-network is trained according to the training samples.
在一些实施例中,步骤S24可以包括:对所述第二特征图进行裁剪,得到所述训练样本对应的第三特征图;将所述第三特征图输入所述分类子网络,得到所述训练样本属于目标类别的第一概率;根据所述训练样本属于目标类别的第一概率及所述训练样本的标注信息,确定所述分类子网络的第一损失;根据所述第一损失,调整所述分类子网络的网络参数。In some embodiments, step S24 may include: cropping the second feature map to obtain a third feature map corresponding to the training sample; inputting the third feature map into the classification sub-network to obtain the The first probability that the training sample belongs to the target category; the first loss of the classification sub-network is determined according to the first probability that the training sample belongs to the target category and the label information of the training sample; Network parameters of the classification sub-network.
在实施中,针对每个训练样本:可以根据该训练样本在样本图像中的位置,确定该训练样本对应的第三特征图在样本图像对应的第二特征图中的位置,根据第三特征图在第二特征图中的位置,对第二特征图进行裁剪,得到该训练样本对应的第三特征图。可以理解的是,第二特征图有多个尺度,裁剪出来的第三特征图也是多个尺度的。In implementation, for each training sample: according to the position of the training sample in the sample image, the position of the third feature map corresponding to the training sample in the second feature map corresponding to the sample image can be determined, and according to the third feature map At the position of the second feature map, the second feature map is cropped to obtain a third feature map corresponding to the training sample. It is understandable that the second feature map has multiple scales, and the cropped third feature map also has multiple scales.
将训练样本的第三特征图输入目标检测网络的分类子网络中,输出训练样本属于目标类别的第一概率。然后通过公式一,根据第一概率和训练样本的标注信息,可以确定分类子网络的第一损失。The third feature map of the training sample is input into the classification sub-network of the target detection network, and the first probability that the training sample belongs to the target category is output. Then, through formula 1, the first loss of the classification sub-network can be determined according to the first probability and the label information of the training sample.
Figure PCTCN2021119982-appb-000001
Figure PCTCN2021119982-appb-000001
其中,L ft表示第一损失,y表示训练样本的标注信息,y=1表示训练样本属于目标类别,y=0表示训练样本不属于目标类别。y′表示分类子网络输出的第一概率。γ和α为超参数。其中,γ主要用于减少易分类训练样本的权重,使得目标检测网络的分类子网络更注重于难分类的训练样本。在一些实施例中,γ的取值可以为2。α主要用于平衡训练样本中正样本和负样本的比例,有效减少目标检测中正负样本比例严重失衡的问题。在一些实施例中,α的取值可以为0.25。 Among them, L ft represents the first loss, y represents the label information of the training sample, y=1 represents that the training sample belongs to the target category, and y=0 represents that the training sample does not belong to the target category. y' represents the first probability of the output of the classification sub-network. γ and α are hyperparameters. Among them, γ is mainly used to reduce the weight of the easy-to-classify training samples, so that the classification sub-network of the target detection network pays more attention to the difficult-to-classify training samples. In some embodiments, the value of γ may be 2. α is mainly used to balance the ratio of positive samples and negative samples in training samples, effectively reducing the problem of serious imbalance in the proportion of positive and negative samples in target detection. In some embodiments, the value of α may be 0.25.
在一个训练样本属于目标类别且该训练样本的第一概率大于第一阈值的情况下,可以认为该训练样本属于易分类训练样本。在一个训练样本属于非目标类别且该训练样本的第一概率小于第二阈值的情况下,可以认为该训练样本属于易分类训练样本。其中,第一阈值和第二阈值可以根据需要进行设置。第一阈值可以设置为一个较为接近1的值,例如可以设置为0.9或者0.95等。第二阈值可以设置为一个较为接近0的值,例如可以设置为0.05或者0.1等。本公开实施例对第一阈值和第二阈值的设置不做限制。根据公式一可见,针对易分类训练样本得到的L ft相对较小。也就是说,易分类训练样本带来的第一损失也就比较小,对分类子网络的网络参数的影响比较小。这相当于减少了易分类训练样本的权重。 When a training sample belongs to the target category and the first probability of the training sample is greater than the first threshold, it can be considered that the training sample belongs to the easy-to-classify training sample. In the case that a training sample belongs to a non-target category and the first probability of the training sample is less than the second threshold, it can be considered that the training sample belongs to the easy-to-classify training sample. Wherein, the first threshold and the second threshold can be set as required. The first threshold may be set to a value closer to 1, for example, may be set to 0.9 or 0.95, etc. The second threshold may be set to a value closer to 0, for example, may be set to 0.05 or 0.1. This embodiment of the present disclosure does not limit the settings of the first threshold and the second threshold. It can be seen from formula 1 that the L ft obtained for the easily classified training samples is relatively small. That is to say, the first loss caused by the easy-to-classify training samples is relatively small, and the impact on the network parameters of the classification sub-network is relatively small. This is equivalent to reducing the weight of easily classified training samples.
在一个训练样本属于目标类别且该训练样本的第一概率小于第三阈值的情况下,可以认为该训练样本属于难分类训练样本。在一个训练样本属于非目标类别,该训练样本的第一概率大于第四阈值的情况下,可以认为该训练样本属于难分类训练样本。其中,第三阈值和第四阈值可以根据需要进行设置。第三阈值和第四阈值可以设置为接近0.5的值。例如,第三阈值可以设置为0.55或者0.6等,第四阈值可以设置为0.4或者0.45等。本公开实施例对第三阈值和第四阈值的设置不做限制。根据公式一可见,针对难分类训练样本得到的L ft相对较大。也就是说,难分类样本带来的第一损失比较大,对分类子网络的网络参数的影响比较大,这就相当于增加了难分类训练样本的权重,使得分类子网络更注重于难分类的训练样本。 In the case that a training sample belongs to the target category and the first probability of the training sample is smaller than the third threshold, it can be considered that the training sample belongs to the difficult-to-classify training sample. When a training sample belongs to a non-target category, and the first probability of the training sample is greater than the fourth threshold, it can be considered that the training sample belongs to a difficult-to-classify training sample. Wherein, the third threshold and the fourth threshold can be set as required. The third and fourth thresholds may be set to values close to 0.5. For example, the third threshold may be set to 0.55 or 0.6, etc., and the fourth threshold may be set to 0.4 or 0.45, etc. This embodiment of the present disclosure does not limit the settings of the third threshold and the fourth threshold. According to formula 1, the L ft obtained for the hard-to-classify training samples is relatively large. That is to say, the first loss brought by the hard-to-classify samples is relatively large, and the impact on the network parameters of the classification sub-network is relatively large, which is equivalent to increasing the weight of the hard-to-classify training samples, making the classification sub-network pay more attention to the hard-to-classify samples. training samples.
需要说明的是,在确定分类损失之前,可以首先对训练样本的标注信息进行的平滑操作,例如可以将y的取值由0和1软化为0.1和0.9,以此增强目标检测网络的泛化性能。It should be noted that, before determining the classification loss, a smoothing operation can be performed on the label information of the training samples, for example, the value of y can be softened from 0 and 1 to 0.1 and 0.9, so as to enhance the generalization of the target detection network performance.
至此完成了根据第一训练集对目标检测网络的分类子网络的训练。So far, the training of the classification sub-network of the target detection network according to the first training set is completed.
在进行回归子网络的训练时,需要使用的样本图像包括:正样本图像,需要使用的标注信息包括:第二对象的边界框。When training the regression sub-network, the sample images to be used include: positive sample images, and the label information to be used includes: the bounding box of the second object.
在一些实施例中,根据所述第一训练集,对所述目标检测网络的回归子网络进行训练可以包括:步骤S31至步骤S36。In some embodiments, according to the first training set, training the regression sub-network of the target detection network may include steps S31 to S36.
在步骤S31中,对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特 征图。In step S31, feature extraction is performed on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image.
第四特征图可以表示正样本图像的特征图。步骤S31可以参照步骤S21。The fourth feature map may represent a feature map of the positive sample image. Step S31 may refer to step S21.
在步骤S32中,根据所述多个尺度的第四特征图及预设的多个锚框,确定所述正样本图像中的多个第二参考框。In step S32, a plurality of second reference frames in the positive sample image are determined according to the fourth feature maps of the plurality of scales and a plurality of preset anchor frames.
步骤S32可以参照步骤S22。Step S32 may refer to step S22.
在步骤S33中,针对所述样本图像中第二对象的任一边界框,确定所述边界框与所述多个第二参考框的交并比,并将交并比最大的第二参考框确定为与所述边界框对应的匹配框。In step S33, for any bounding box of the second object in the sample image, determine the intersection ratio of the bounding box and the plurality of second reference frames, and determine the second reference frame with the largest intersection ratio A matching box corresponding to the bounding box is determined.
在步骤S34中,针对所述样本图像中第二对象的任一边界框,将所述匹配框对应的第五特征图输入所述回归子网络,得到所述匹配框的预测框。In step S34, for any bounding box of the second object in the sample image, the fifth feature map corresponding to the matching box is input into the regression sub-network to obtain a prediction box of the matching box.
第五特征图可以表示匹配框对应的特征图。获得匹配框对应的第五特征图的方式可以参照步骤S24中获得训练样本对应的第三特征图的方式。The fifth feature map may represent the feature map corresponding to the matching frame. For the manner of obtaining the fifth feature map corresponding to the matching frame, reference may be made to the manner of obtaining the third feature map corresponding to the training sample in step S24.
在步骤S35中,针对所述样本图像中第二对象的任一边界框,根据所述边界框与对应的匹配框的预测框之间的差异,确定所述回归子网络的第二损失。In step S35, for any bounding box of the second object in the sample image, the second loss of the regression sub-network is determined according to the difference between the bounding box and the predicted box of the corresponding matching box.
在一些实施例中,步骤S35可以包括:根据所述边界框与所述预测框之间的坐标偏移量及交并比,确定所述匹配框的第一回归损失;根据所述边界框与所述预测框之间的交集、并集及最小闭区域,确定所述匹配框的第二回归损失;根据所述第一回归损失及所述第二回归损失,确定所述回归子网络的第二损失。In some embodiments, step S35 may include: determining the first regression loss of the matching box according to the coordinate offset and the intersection ratio between the bounding box and the prediction box; The intersection, union and minimum closed area between the prediction frames determine the second regression loss of the matching frame; according to the first regression loss and the second regression loss, determine the first regression loss of the regression sub-network. Two losses.
在一些实施例中,可以通过公式二确定第一回归损失:In some embodiments, the first regression loss can be determined by formula two:
Figure PCTCN2021119982-appb-000002
Figure PCTCN2021119982-appb-000002
其中,
Figure PCTCN2021119982-appb-000003
可以表示第一回归损失,W iou表示预测框的权重,W iou=(e -iou+0.4),iou表示预测框和对应边界框的交并比,x表示预测框相对于对应边界框的坐标偏移量。
in,
Figure PCTCN2021119982-appb-000003
Can represent the first regression loss, W iou represents the weight of the prediction box, W iou = (e -iou +0.4), iou represents the intersection ratio between the prediction box and the corresponding bounding box, x represents the coordinates of the prediction box relative to the corresponding bounding box Offset.
通过利用预测框和对应边界框的交并比为指导,根据公式二给交并比较小的预测框更大的损失值,使采用该预测框对应的匹配框训练回归子网络的情况下,回归子网络的参数更新力度更大。By using the intersection ratio of the prediction box and the corresponding bounding box as a guide, according to formula 2, the loss value of the smaller prediction box is given a larger loss value, so that when the regression sub-network is trained using the matching box corresponding to the prediction frame, the regression The parameters of the sub-network are updated more vigorously.
考虑到在第一回归损失相同的情况下,不同预测框的位置有较大差异,因此,在本公开实施例中引入第二回归损失,使得第二对象的定位更加准确。Considering that the positions of different prediction frames are quite different when the first regression loss is the same, a second regression loss is introduced in the embodiment of the present disclosure to make the positioning of the second object more accurate.
在一些实施例中,可以通过公式三确定第二回归损失;In some embodiments, the second regression loss can be determined by formula three;
Figure PCTCN2021119982-appb-000004
Figure PCTCN2021119982-appb-000004
其中,L GIoU表示第二回归损失,A和B分别表示预测框和对应边界框,C表示A和B的最小闭区域,A∪B表示预测框和对应边界框的并集,A∩B表示预测框和对应边界框的交集。 Among them, L GIoU represents the second regression loss, A and B represent the prediction box and the corresponding bounding box respectively, C represents the minimum closed area of A and B, A∪B represents the union of the prediction box and the corresponding bounding box, A∩B represents The intersection of the predicted box and the corresponding bounding box.
通过引入第二回归损失作为辅助,对预测框与对应边界框的重合区域以及非重合区域进行优化,从而更加准确地定位到第二对象所在区域。By introducing the second regression loss as an aid, the overlapping area and the non-overlapping area between the prediction box and the corresponding bounding box are optimized, so as to more accurately locate the area where the second object is located.
在一些实施例中,可以将第一回归损失和第二回归损失进行加权求和,得到回归子网络的第二损失。In some embodiments, the weighted summation of the first regression loss and the second regression loss may be performed to obtain the second loss of the regression sub-network.
在步骤S36中,根据所述第二损失,调整所述回归子网络的网络参数。In step S36, the network parameters of the regression sub-network are adjusted according to the second loss.
至此完成了根据第一训练集对目标检测网络的回归子网络的训练。So far, the training of the regression sub-network of the target detection network according to the first training set is completed.
在进行分割子网络的训练时,需要使用的样本图像包括:正样本图像,需要使用的标注信息包括:第二对象的轮廓。When training the segmentation sub-network, the sample images to be used include: positive sample images, and the label information to be used includes: the outline of the second object.
在一些实施例中,根据所述第一训练集,对所述目标检测网络的分割子网络进行训练可以包括:步骤S41至步骤S44。In some embodiments, according to the first training set, training the segmentation sub-network of the target detection network may include steps S41 to S44.
在步骤S41中,对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图。In step S41, feature extraction is performed on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image.
步骤S41可以参照步骤S31。Step S41 may refer to step S31.
在步骤S42中,将所述多个尺度的第四特征图输入所述分割子网络,得到所述正样本图像各个像素点属于目标类别的第二概率。In step S42, the fourth feature maps of the multiple scales are input into the segmentation sub-network to obtain the second probability that each pixel of the positive sample image belongs to the target category.
在步骤S43中,根据所述正样本图像的像素点数量、所述正样本图像中第二对象的轮廓以及各个像素点属于目标类别的第二概率,确定所述分割子网络的第三损失。In step S43, the third loss of the segmentation sub-network is determined according to the number of pixels in the positive sample image, the contour of the second object in the positive sample image, and the second probability that each pixel belongs to the target category.
在一些实施例中,可以通过公式四确定分割子网络的第三损失:In some embodiments, the third loss of the segmentation sub-network can be determined by Equation 4:
Figure PCTCN2021119982-appb-000005
Figure PCTCN2021119982-appb-000005
其中,L dice表示第三损失,N为正样本图像的像素点数量,i表示正样本图像中第i个像素,0<i≤N,p i表示分割子网络输出的正样本图像中第i个像素属于目标类别的第二概率,g i分别表示正样本图像中第i个像素的真实类别,g i的取值包括0和1,其中,取值0表示第i个像素的属于非目标类别,取值1表示第i个像素的属于目标类别。g i可以根据正样本图像中各第二对象的轮廓确定。 Among them, L dice represents the third loss, N is the number of pixels in the positive sample image, i represents the ith pixel in the positive sample image, 0<i≤N, p i represents the ith pixel in the positive sample image output by the segmentation sub-network The second probability that the pixels belong to the target category, gi represents the true category of the ith pixel in the positive sample image, respectively, and the value of gi includes 0 and 1, where a value of 0 indicates that the ith pixel belongs to a non-target Category, a value of 1 indicates that the i-th pixel belongs to the target category. g i can be determined according to the contour of each second object in the positive sample image.
考虑到第二对象在第二图像中所占比例较小,存在一定程度的正负样本图像不平衡,本公开实施例中采用第三损失优化分割任务,有利于平衡正负样本图像,从而提升了对尺寸较小的第二对象的分割能力。Considering that the proportion of the second object in the second image is small, and there is a certain degree of imbalance between positive and negative sample images, the third loss is used in the embodiment of the present disclosure to optimize the segmentation task, which is beneficial to balance the positive and negative sample images, thereby improving the The ability to segment the second object with smaller size is improved.
在步骤S44中,根据所述第三损失,调整所述分割子网络的网络参数。In step S44, the network parameters of the segmentation sub-network are adjusted according to the third loss.
至此完成了根据第一训练集对目标检测网络的分割子网络的训练。So far, the training of the segmentation sub-network of the target detection network according to the first training set is completed.
在完成了根据第一训练集对目标检测网络的分类子网络、回归子网络和分割子网络的训练的情况下,也就完成了第一阶段的训练,得到了第一状态的目标检测网络。之后,进入第二阶段,在第二阶段中可以根据第二训练集,对第一状态的目标检测网络进行训练,得到已训练的目标检测网络。这里,对第一状态的目标检测网络进行训练的过程可以是一个微调的过程。After completing the training of the classification sub-network, regression sub-network and segmentation sub-network of the target detection network according to the first training set, the first stage of training is also completed, and the target detection network in the first state is obtained. After that, the second stage is entered. In the second stage, the target detection network in the first state can be trained according to the second training set to obtain a trained target detection network. Here, the process of training the target detection network in the first state may be a fine-tuning process.
其中,第二训练集包括多个样本图像以及所述样本图像的第二标注信息,所述第二标注信息包括所述样本图像中的假阳性区域、假阴性区域以及真阳性区域。The second training set includes a plurality of sample images and second label information of the sample images, where the second label information includes false positive areas, false negative areas and true positive areas in the sample images.
下面对第二训练集的获取过程进行说明。The acquisition process of the second training set will be described below.
在一些实施例中,所述方法还包括:通过所述第一状态的目标检测网络对所述样本图像进行处理,得到所述样本图像中第二对象的预测位置;根据所述第二对象的预测位置及真实位置,确定所述样本图像中的假阳性区域、假阴性区域及真阳性区域。In some embodiments, the method further includes: processing the sample image through the target detection network in the first state to obtain a predicted position of the second object in the sample image; Predict the position and the real position, and determine the false positive area, false negative area and true positive area in the sample image.
在实施中,假阳性(False Positive,FP)区域表示样本图像中第一标注信息显示为不是第二对象,但第一状态的分类子网络输出结果显示为第二对象的区域;真阳性(Truth Positive,TP)区域表示样本图像中第一标注信息显示为第二对象,且第一状态的分类子网络输出结果也显示为第二对象的区域;假阴性(False Negtive,FN)区域表示样本图像中第一标注信息显示为第二对象,但第一状态的分类子网络的输出结果显示不是第二对象的区域;真阴性(Truth Negtive,TN)区域表示样本图像中第一标注信息显示为不是第二对象,且第一状态的分类子网络输出结果也显示为不是第二对象的样本图像。考虑到假阳性区域实际上不是第二对象,且出现了分类错误,需要进行更正。因此,可以根据假阳性区域确定第二训练集中的负样本图像。考虑到真阳性区域和假阴性区域实际上为第二对象,因此可以根据真阳性区域和假阴性区域确定第二训练集中的正样本图像。在一些实施例中,可以将所有的假阳性区域作为第二训练集中的负样本图像;可以对假阴性区域进行三倍数据增强,并从真阳性区域中选取部分(例如选取2/3)作为第二训练集中的正样本图像。In implementation, the false positive (False Positive, FP) area indicates that the first label information in the sample image is displayed as not the second object, but the output result of the classification sub-network in the first state is displayed as the area of the second object; true positive (Truth Positive, TP) area indicates that the first label information in the sample image is displayed as the second object, and the classification sub-network output result of the first state is also displayed as the area of the second object; False Negative (False Negtive, FN) area indicates the sample image. The first annotation information is displayed as the second object, but the output result of the classification sub-network in the first state shows the area that is not the second object; the true negative (Truth Negtive, TN) area indicates that the first annotation information in the sample image is displayed as not The second object, and the output result of the classification sub-network of the first state is also displayed as a sample image that is not the second object. Considering that the false-positive area is not actually a second object, and there is a classification error, it needs to be corrected. Therefore, the negative sample images in the second training set can be determined according to the false positive regions. Considering that the true positive regions and the false negative regions are actually second objects, the positive sample images in the second training set can be determined according to the true positive regions and the false negative regions. In some embodiments, all false positive regions may be used as negative sample images in the second training set; false negative regions may be triple-enhanced, and a portion (eg, 2/3) of true positive regions may be selected as Positive images in the second training set.
下面对根据第二训练集,对第一状态的目标检测网络进行训练的过程进行说明。The following describes the process of training the target detection network in the first state according to the second training set.
所述根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络包括:根据第二训练集,分别对第一状态的目标检测网络的分类子网络、回归子网络和分割子网络进行训练。在本公开实施例中,基于分类、回归和分割的多任务学习进行第一状态的目标检测网络的训练,利用了任务间的关联性提升了对目标类别的对象的识别能力。The training of the target detection network in the first state according to the second training set to obtain the trained target detection network includes: according to the second training set, respectively classifying the classification sub-network, The regression sub-network and the segmentation sub-network are trained. In the embodiment of the present disclosure, the training of the target detection network in the first state is performed based on multi-task learning of classification, regression and segmentation, and the ability to recognize objects of the target category is improved by utilizing the correlation between tasks.
在进行分类子网络的训练时,使用的样本图像中包括:假阳性区域、假阴性区域及真阳性区域,需要使用的标注信息包括:第二对象的边界框。When training the classification sub-network, the sample images used include: false positive area, false negative area and true positive area, and the labeling information to be used includes: the bounding box of the second object.
在一些实施例中,所述根据第二训练集,对第一状态的目标检测网络的分类子网络进行训练可以包括:按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,确定假阳性区域、假阴性区域及真阳性区域对应的第五特征图;将所述第五特征图输入所述分类子网络,得到假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率;根据假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率,以及假阳性区域、假阴性区域及真阳性区域的真实类别,确定所述分类子网络的第四损失;根据所述第四损失,调整所述分类子网络的网络参数。In some embodiments, the training of the classification sub-network of the target detection network in the first state according to the second training set may include: according to the second label information, performing the training on the first state of the sample image at multiple scales. The second feature map is trimmed to determine the fifth feature map corresponding to the false positive area, the false negative area and the true positive area; the fifth feature map is input into the classification sub-network to obtain the false positive area, false negative area and true positive area The third probability that the area belongs to the target category; the classifier is determined according to the third probability that the false positive area, the false negative area and the true positive area belong to the target category, and the true category of the false positive area, the false negative area and the true positive area. The fourth loss of the network; according to the fourth loss, the network parameters of the classification sub-network are adjusted.
上述过程可以参照步骤S21至步骤S24。The above process may refer to steps S21 to S24.
在进行回归子网络的训练时,使用的样本图像中包括真阳性区域和假阴性区域,需要使用的标注信息包括:第二对象的边界框。During the training of the regression sub-network, the sample images used include true positive regions and false negative regions, and the annotation information to be used includes: the bounding box of the second object.
在一些实施例中,所述根据第二训练集,对第一状态的目标检测网络的回归子网络进行训练可以包括:确定与所述真阳性区域和假阴性区域匹配的边界框;将所述第六特征图输入所述回归子网络,得到所述真阳性区域和假阴性区域的预测框;根据所述真阳性区域和假阴性区域的预测框和对应的边界框之间的差异,确定所述回归子网络的第五损失;根据所述第五损失,调整所述回归子网络的网络参数。In some embodiments, the training of the regression sub-network of the target detection network in the first state according to the second training set may include: determining bounding boxes matching the true positive regions and false negative regions; The sixth feature map is input to the regression sub-network to obtain the prediction frame of the true positive area and the false negative area; according to the difference between the prediction frame of the true positive area and the false negative area and the corresponding bounding box, determine the prediction frame of the true positive area and the false negative area. The fifth loss of the regression sub-network; according to the fifth loss, the network parameters of the regression sub-network are adjusted.
上述过程可以参照步骤S31至步骤S36。The above process may refer to steps S31 to S36.
在进行分割子网络的训练时,使用的样本图像中包括真阳性区域和假阴性区域,需要使用的标注信息包括:第二对象的轮廓。During the training of the segmentation sub-network, the sample images used include true positive regions and false negative regions, and the annotation information to be used includes: the outline of the second object.
在一些实施例中,根据所述第二训练集,对第一状态的目标检测网络的分割子网络进行训练可以包括:将所述真阳性区域和假阴性区域对应的第六特征图输入所述分割子网络,得到所述真阳性区域和假阴性区域中各个像素点属于目标类别的第四概率;根据所述真阳性区域和假阴性区域的像素点数量、所述真阳性区域和假阴性区域中第二对象的轮廓以及各个像素点属于目标类别的第四概率,确定所述分割子网络的第六损失;根据所述第六损失,调整所述分割子网络的网络参数。In some embodiments, according to the second training set, training the segmentation sub-network of the target detection network in the first state may include: inputting the sixth feature map corresponding to the true positive area and the false negative area into the Segment the sub-network to obtain the fourth probability that each pixel in the true positive area and the false negative area belongs to the target category; according to the number of pixels in the true positive area and the false negative area, the true positive area and the false negative area The contour of the second object and the fourth probability that each pixel belongs to the target category determines the sixth loss of the segmentation sub-network; and adjusts the network parameters of the segmentation sub-network according to the sixth loss.
上述过程可以参照步骤S41至步骤S44。The above process may refer to steps S41 to S44.
在一些实施例中,在第二阶段训练过程中,可以根据假阳性区域的第三概率,确定假阳性区域对应损失(包括第四损失)的系数,假阴性区域和真阳性区域的第三概率可以作为该假阴性区域和真阳性区域对应损失(包括第四损失、第五损失和第六损失)的系数。这样,可以加快收敛,节省训练时间。In some embodiments, in the second-stage training process, the coefficient of the corresponding loss (including the fourth loss) of the false positive region, the third probability of the false negative region and the true positive region may be determined according to the third probability of the false positive region It can be used as the coefficient of the corresponding losses (including the fourth loss, the fifth loss and the sixth loss) of the false negative area and the true positive area. In this way, convergence can be accelerated and training time can be saved.
在一些实施例中,在第二阶段训练过程中,可以采用困难样本挖掘(online-hardness-minig)方法(例如,每次迭代着重优化损失值最大的10个的区域),将第一状态的目标检测网络训练为已训练的目标检测网络。这样,可以加快收敛,节省训练时间。In some embodiments, during the second-stage training process, an online-hardness-minig method may be used (for example, each iteration focuses on optimizing the 10 regions with the largest loss values), The object detection network is trained as the trained object detection network. In this way, convergence can be accelerated and training time can be saved.
需要说明的是,递归方式的训练过程与多任务学习的训练过程是紧密结合在一起的,不是单独的两个过程。在递归方式训练目标检测网络的过程的每个阶段均与多任务学习进行了结合。It should be noted that the recursive training process and the multi-task learning training process are closely integrated, not two separate processes. Each stage of the process of training an object detection network recursively is combined with multi-task learning.
图4为本公开实施例提供的一种目标检测架构的组成结构示意图,如图4所示,所述目标检测架构包括特征提取网络40和目标检测网络50。其中,特征提取网络40包括基础网络和FPN,目标检测网络50包括分类子网络51、回归子网络52和分割子网络53。FIG. 4 is a schematic structural diagram of the composition of a target detection architecture provided by an embodiment of the present disclosure. As shown in FIG. 4 , the target detection architecture includes a feature extraction network 40 and a target detection network 50 . The feature extraction network 40 includes a basic network and FPN, and the target detection network 50 includes a classification sub-network 51 , a regression sub-network 52 and a segmentation sub-network 53 .
从图4所示的肺部CT图像中检测肺结节的目标检测网络的过程可以包括:可以首先将该肺部CT图像分割成指定尺寸的图像块,每个图像块即为一个第一图像;然后,分别将各个第一图像输入图4所示的目标检测网络中,得到各个第一图像中肺结节的边界框和轮廓。最后,根据各个第一图像中肺结节的边界框和轮廓,可以确定出肺部CT图像中的肺结节的边界框和轮廓。The process of the target detection network for detecting lung nodules from the lung CT image shown in FIG. 4 may include: firstly, the lung CT image may be divided into image blocks of a specified size, and each image block is a first image ; Then, each first image is respectively input into the target detection network shown in FIG. 4 to obtain the bounding box and outline of the lung nodule in each first image. Finally, according to the bounding box and contour of the lung nodule in each first image, the bounding box and contour of the lung nodule in the lung CT image can be determined.
针对每个第一图像,将该第一图像输入图4所示的特征提取网络进行处理,获取到该第一图像的多个尺度的第一特征图。将该第一图像的多个尺度的第一特征图分别输入已训练的目标检测网络的分类子网络、回归子网络和分割子网络即可得到该第一图像中是否存在肺结节,以及每个肺结节的边界框和轮廓。For each first image, the first image is input into the feature extraction network shown in FIG. 4 for processing, and first feature maps of multiple scales of the first image are obtained. The first feature maps of multiple scales of the first image are respectively input into the classification sub-network, regression sub-network and segmentation sub-network of the trained target detection network to obtain whether there are lung nodules in the first image, and whether each lung nodule exists in the first image. The bounding box and contours of each lung nodule.
图5为在图4所示的目标检测网络为第一状态的目标检测网络的情况下肺结节的预测框的示意图。如图5所示,在图4所示的目标检测网络为通过第一阶段训练出的第一状态的目标检测网络的情况下,存在大量的假阳性肺结节61和部分假阴性肺结节62。FIG. 5 is a schematic diagram of a prediction frame of a lung nodule when the target detection network shown in FIG. 4 is the target detection network in the first state. As shown in FIG. 5 , when the target detection network shown in FIG. 4 is the target detection network in the first state trained through the first stage, there are a large number of false positive lung nodules 61 and some false negative lung nodules 62.
图6为在图4所示的目标检测网络为已训练的目标检测网络的情况下肺结节的预测框的示意图。如图6所示,在图4所示的目标检测网络为通过第一阶段和第二阶段训练出的已训练的目标检测网络的情况下,减少了假阳性肺结节的数量。FIG. 6 is a schematic diagram of a prediction frame of a lung nodule when the target detection network shown in FIG. 4 is a trained target detection network. As shown in Figure 6, when the target detection network shown in Figure 4 is a trained target detection network trained through the first and second stages, the number of false positive lung nodules is reduced.
本申请实施例提供的目标检测方法可以用于对第一图像中是否存在第一对象进行检测,并可以得到第一对象在第一图像中的位置。在第一图像为肺部CT图像,第一对象为肺结节的情况下,本申请实施例提供的目标检测方法可以用于对肺部CT图像中是否存在肺结节进行检测,并可以得到肺结节在肺部CT图像中的位置。在实施时,本申请实施例提供的目标检测方法可以用于任意合适的需要对肺部CT图像中是否存在肺结节进行检测的场景。例如,对于医疗水平较低的地区,可以 通过远程云平台或者医院临床落地设备,利用该目标检测方法对待检测的肺部CT图像进行肺结节筛查,有利于提高医疗水平较低的地区在肺结节检出方面的医疗水平。又如,对于医疗水平较高的医院,患者多,临床医生阅片工作量大,可以通过远程云平台或者医院临床落地设备完成对肺部CT图像中肺结节的自动化筛查,为医生的快速准确诊断提供辅助手段。再如,在体检中心对得到的肺部CT图像进行肺结节自动化筛查,提高肺结节发现水平。The target detection method provided by the embodiment of the present application can be used to detect whether there is a first object in the first image, and can obtain the position of the first object in the first image. When the first image is a lung CT image and the first object is a lung nodule, the target detection method provided in this embodiment of the present application can be used to detect whether there is a lung nodule in the lung CT image, and can obtain Location of lung nodules in lung CT images. During implementation, the target detection method provided in this embodiment of the present application can be used in any suitable scenario that needs to detect whether there is a lung nodule in a lung CT image. For example, for areas with low medical level, the target detection method can be used to screen lung nodules in the CT images of the lungs to be detected through remote cloud platforms or clinical landing equipment in hospitals, which is beneficial to improve the medical level in areas with low medical level. State of the art in lung nodule detection. For another example, for a hospital with a high level of medical care, with many patients and a large workload for clinicians to read images, the automatic screening of pulmonary nodules in lung CT images can be completed through the remote cloud platform or the hospital’s clinical floor equipment, which is helpful for doctors’ care. Rapid and accurate diagnosis provides auxiliary means. Another example is the automatic screening of pulmonary nodules on the obtained lung CT images in the physical examination center to improve the detection level of pulmonary nodules.
可以理解,本公开提供的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the foregoing method embodiments provided in the present disclosure can be combined with each other to form a combined embodiment without violating the principle and logic. Those skilled in the art can understand that, in the above method of the specific embodiment, the specific execution order of each step should be determined by its function and possible internal logic.
此外,本公开实施例还提供了目标检测装置、电子设备、计算机可读存储介质、计算机程序和计算机程序产品,上述均可用来实现本公开提供的任一种目标检测方法,相应技术方案和描述参见方法部分的相应记载。In addition, the embodiments of the present disclosure also provide target detection devices, electronic devices, computer-readable storage media, computer programs, and computer program products, all of which can be used to implement any target detection method provided by the present disclosure, and corresponding technical solutions and descriptions See the corresponding entry in the Methods section.
图7为本公开实施例提供的一种目标检测装置的组成结构示意图,如图7所示,所述装置700包括:FIG. 7 is a schematic structural diagram of a target detection apparatus provided by an embodiment of the present disclosure. As shown in FIG. 7 , the apparatus 700 includes:
提取部分701,配置为对待检测的第一图像进行特征提取,得到所述第一图像的多个尺度的第一特征图;第一处理部分702,配置为通过已训练的目标检测网络对所述第一图像的多个尺度的第一特征图进行处理,得到所述第一图像中存在的目标类别的第一对象的位置;其中,所述目标检测网络采用递归的方式进行训练;所述目标检测网络包括分类子网络、回归子网络和分割子网络,所述分类子网络用于确定所述第一图像中是否存在所述第一对象、所述回归子网络用于确定所述第一图像中存在的第一对象的边界框,所述分割子网络用于确定所述第一图像中存在的第一对象的轮廓。The extraction part 701 is configured to perform feature extraction on the first image to be detected to obtain first feature maps of multiple scales of the first image; the first processing part 702 is configured to perform the feature extraction on the The first feature maps of multiple scales of the first image are processed to obtain the position of the first object of the target category existing in the first image; wherein, the target detection network is trained in a recursive manner; the target The detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, the classification sub-network is used to determine whether the first object exists in the first image, and the regression sub-network is used to determine the first image The bounding box of the first object existing in the first image, the segmentation sub-network is used to determine the contour of the first object existing in the first image.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further includes:
第一训练部分,配置为根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,所述第一训练集包括多个样本图像以及所述样本图像的第一标注信息,所述第一标注信息包括所述样本图像中第二对象的真实位置;The first training part is configured to train the target detection network according to a first training set to obtain a target detection network in a first state, and the first training set includes a plurality of sample images and a first sample image of the sample images. Labeling information, the first labeling information includes the real position of the second object in the sample image;
第二处理部分,配置为通过所述第一状态的目标检测网络对所述样本图像进行处理,得到所述样本图像中第二对象的预测位置;The second processing part is configured to process the sample image through the target detection network in the first state to obtain the predicted position of the second object in the sample image;
确定部分,配置为根据所述第二对象的预测位置及真实位置,确定所述样本图像中的假阳性区域、假阴性区域及真阳性区域;a determining part, configured to determine a false positive area, a false negative area and a true positive area in the sample image according to the predicted position and the real position of the second object;
第二训练部分,配置为根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,所述第二训练集包括多个样本图像以及所述样本图像的第二标注信息,所述第二标注信息包括所述样本图像中的假阳性区域、假阴性区域及真阳性区域。The second training part is configured to train the target detection network in the first state according to a second training set to obtain a trained target detection network, and the second training set includes a plurality of sample images and the sample images The second annotation information includes the false positive area, the false negative area and the true positive area in the sample image.
在一些实施例中,所述多个样本图像包括正样本图像和负样本图像,所述装置还包括:裁剪部分,配置为对已标注的第二图像进行裁剪,得到预设尺寸的正样本图像及负样本图像,所述正样本图像中包括至少一个第二对象,所述负样本图像中不包括第二对象。In some embodiments, the plurality of sample images include positive sample images and negative sample images, and the apparatus further includes: a cropping part configured to crop the marked second image to obtain a positive sample image of a preset size and a negative sample image, the positive sample image includes at least one second object, and the negative sample image does not include the second object.
在一些实施例中,所述第二对象的真实位置包括所述第二对象的边界框,所述第一训练部分还配置为:对所述样本图像进行特征提取,得到所述样本图像的多个尺度的第二特征图;根据所述多个尺度的第二特征图及预设的多个锚框,确定所述样本图像中的多个第一参考框;根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本,所述训练样本包括标注信息为属于目标类别的正样本,以及标注信息为不属于目标类别的负样本;根据所述训练样本,训练所述分类子网络。In some embodiments, the real position of the second object includes a bounding box of the second object, and the first training part is further configured to: perform feature extraction on the sample image to obtain multiple features of the sample image. second feature maps of one scale; multiple first reference frames in the sample image are determined according to the second feature maps of multiple scales and multiple preset anchor frames; according to the second feature maps in the sample image The bounding box of the object, a preset number of training samples are determined from the plurality of first reference frames, and the training samples include positive samples whose annotation information belongs to the target category, and negative samples whose annotation information does not belong to the target category ; Train the classification sub-network according to the training samples.
在一些实施例中,所述根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本,包括:将所述样本图像中的边界框划分至多个边界框集合中,每个边界框集合中边界框的尺寸处于预设的尺寸区间内;针对任一边界框集合,从所述多个第一参考框中去除已被确定为训练样本的第一参考框,得到与所述边界框集合对应的参考框集合;针对所述边界框集合中的任一边界框,根据所述边界框与对应的参考框集合中的各个第一参考框之间的交并比,确定与所述边界框对应的正样本和负样本,所述正样本的数量与所述边界框集合的尺寸区间负相关;根据尺寸区间由小到大的顺序依次处理各个边界框集合,得到所述预设数量的训练样本。In some embodiments, the determining a preset number of training samples from the plurality of first reference frames according to the bounding box of the second object in the sample image, includes: The frame is divided into multiple bounding box sets, and the size of the bounding box in each bounding box set is within a preset size interval; for any bounding box set, removing from the multiple first reference frames has been determined as training The first reference frame of the sample, to obtain a reference frame set corresponding to the bounding box set; for any bounding box in the bounding box set, according to the bounding box and each first reference in the corresponding reference frame set The intersection ratio between boxes determines the positive samples and negative samples corresponding to the bounding box, and the number of positive samples is negatively correlated with the size interval of the bounding box set; according to the order of the size interval from small to large Each bounding box set is processed to obtain the preset number of training samples.
在一些实施例中,所述根据所述训练样本,训练所述分类子网络,包括:对所述第二特征图进 行裁剪,得到所述训练样本对应的第三特征图;将所述第三特征图输入所述分类子网络,得到所述训练样本属于目标类别的第一概率;根据所述训练样本属于目标类别的第一概率及所述训练样本的标注信息,确定所述分类子网络的第一损失;根据所述第一损失,调整所述分类子网络的网络参数。In some embodiments, the training of the classification sub-network according to the training sample includes: cropping the second feature map to obtain a third feature map corresponding to the training sample; The feature map is input to the classification sub-network, and the first probability that the training sample belongs to the target category is obtained; according to the first probability that the training sample belongs to the target category and the label information of the training sample, the classification sub-network is determined. a first loss; according to the first loss, adjust the network parameters of the classification sub-network.
在一些实施例中,所述第二对象的真实位置包括所述第二对象的边界框,所述第一训练部分还配置为:对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图;根据所述多个尺度的第四特征图及预设的多个锚框,确定所述正样本图像中的多个第二参考框;针对所述样本图像中第二对象的任一边界框:确定所述边界框与所述多个第二参考框的交并比,并将交并比最大的第二参考框确定为与所述边界框对应的匹配框;将所述匹配框对应的第五特征图输入所述回归子网络,得到所述匹配框的预测框;根据所述边界框与所述预测框之间的差异,确定所述回归子网络的第二损失;根据所述第二损失,调整所述回归子网络的网络参数。In some embodiments, the real position of the second object includes a bounding box of the second object, and the first training part is further configured to: perform feature extraction on the positive sample image to obtain the positive sample image fourth feature maps of multiple scales; according to the fourth feature maps of multiple scales and multiple preset anchor frames, determine multiple second reference frames in the positive sample image; for the sample image Any bounding box of the second object in: determine the intersection ratio of the bounding box and the plurality of second reference frames, and determine the second reference frame with the largest intersection ratio as the match corresponding to the bounding box frame; input the fifth feature map corresponding to the matching frame into the regression sub-network to obtain the prediction frame of the matching frame; determine the regression sub-network according to the difference between the bounding frame and the prediction frame The second loss; according to the second loss, adjust the network parameters of the regression sub-network.
在一些实施例中,所述第一训练部分还配置为:根据所述边界框与所述预测框之间的坐标偏移量及交并比,确定所述匹配框的第一回归损失;根据所述边界框与所述预测框之间的交集、并集及最小闭区域,确定所述匹配框的第二回归损失;根据所述第一回归损失及所述第二回归损失,确定所述回归子网络的第二损失。In some embodiments, the first training part is further configured to: determine the first regression loss of the matching box according to the coordinate offset and the intersection ratio between the bounding box and the prediction box; The intersection, union and minimum closed area between the bounding box and the prediction box determine the second regression loss of the matching box; according to the first regression loss and the second regression loss, determine the The second loss of the regression sub-network.
在一些实施例中,所述第二对象的真实位置包括所述第二对象的轮廓,所述第一训练部分还配置为:对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图;将所述多个尺度的第四特征图输入所述分割子网络,得到所述正样本图像各个像素点属于目标类别的第二概率;根据所述正样本图像的像素点数量、所述正样本图像中第二对象的轮廓以及各个像素点属于目标类别的第二概率,确定所述分割子网络的第三损失;根据所述第三损失,调整所述分割子网络的网络参数。In some embodiments, the real position of the second object includes the outline of the second object, and the first training part is further configured to: perform feature extraction on the positive sample image to obtain the Fourth feature maps of multiple scales; input the fourth feature maps of multiple scales into the segmentation sub-network to obtain the second probability that each pixel of the positive sample image belongs to the target category; according to the positive sample image The number of pixels in the positive sample image, the contour of the second object in the positive sample image, and the second probability that each pixel belongs to the target category, determine the third loss of the segmentation sub-network; according to the third loss, adjust the segmentation Network parameters for the subnet.
在一些实施例中,所述第二训练部分还配置为:按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,确定假阳性区域、假阴性区域及真阳性区域对应的第五特征图;将所述第五特征图输入所述分类子网络,得到假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率;根据假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率,以及假阳性区域、假阴性区域及真阳性区域的真实类别,确定所述分类子网络的第四损失;根据所述第四损失,调整所述分类子网络的网络参数。In some embodiments, the second training part is further configured to: according to the second label information, crop the second feature maps of multiple scales of the sample image to determine false positive areas, false negative areas and The fifth feature map corresponding to the true positive region; input the fifth feature map into the classification sub-network to obtain the third probability that the false positive region, the false negative region and the true positive region belong to the target category; The third probability that the negative area and the true positive area belong to the target category, and the true categories of the false positive area, the false negative area and the true positive area, determine the fourth loss of the classification sub-network; according to the fourth loss, adjust the Describe the network parameters of the classification sub-network.
在一些实施例中,所述第二训练部分还配置为:按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,得到真阳性区域和假阴性区域对应的第六特征图;确定与所述真阳性区域和假阴性区域匹配的边界框;将所述第六特征图输入所述回归子网络,得到所述真阳性区域和假阴性区域的预测框;根据所述真阳性区域和假阴性区域的预测框和对应的边界框之间的差异,确定所述回归子网络的第五损失;根据所述第五损失,调整所述回归子网络的网络参数。In some embodiments, the second training part is further configured to: according to the second label information, crop the second feature maps of multiple scales of the sample image to obtain the correspondence between true positive regions and false negative regions The sixth feature map of ; determine the bounding box matching the true positive region and the false negative region; input the sixth feature map into the regression sub-network to obtain the prediction frame of the true positive region and the false negative region; Determine the fifth loss of the regression sub-network according to the difference between the prediction boxes and the corresponding bounding boxes of the true positive area and the false negative area; adjust the network parameters of the regression sub-network according to the fifth loss .
在一些实施例中,所述第二训练部分还配置为:将所述真阳性区域和假阴性区域对应的第六特征图输入所述分割子网络,得到所述真阳性区域和假阴性区域中各个像素点属于目标类别的第四概率;根据所述真阳性区域和假阴性区域的像素点数量、所述真阳性区域和假阴性区域中第二对象的轮廓以及各个像素点属于目标类别的第四概率,确定所述分割子网络的第六损失;根据所述第六损失,调整所述分割子网络的网络参数。In some embodiments, the second training part is further configured to: input the sixth feature map corresponding to the true positive area and the false negative area into the segmentation sub-network, to obtain the difference between the true positive area and the false negative area The fourth probability that each pixel belongs to the target category; according to the number of pixels in the true positive area and the false negative area, the outline of the second object in the true positive area and the false negative area, and the first probability that each pixel belongs to the target category. With four probabilities, the sixth loss of the segmentation sub-network is determined; according to the sixth loss, the network parameters of the segmentation sub-network are adjusted.
在一些实施例中,所述第一图像包括2D医学影像和/或3D医学影像,所述目标类别包括结节和/或囊肿。In some embodiments, the first image includes a 2D medical image and/or a 3D medical image, and the target category includes a nodule and/or a cyst.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以配置为执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述。In some embodiments, the functions or included parts of the apparatus provided in the embodiments of the present disclosure may be configured to execute the methods described in the above method embodiments, and the specific implementation may refer to the descriptions in the above method embodiments.
在本公开实施例以及其他的实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是单元,还可以是模块也可以是非模块化的。In the embodiments of the present disclosure and other embodiments, a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, a unit, a module, or a non-modularity.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质,也可以是易失性计算机可读存储介质。Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
本公开实施例还提出一种电子设备,包括:处理器;配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例还提供了一种计算机程序,包括计算机可读代码,在计算机可读代码在设备上运行的情况下,设备中的处理器执行用于实现如上任一实施例提供的目标检测方法的指令。Embodiments of the present disclosure also provide a computer program, including computer-readable codes. When the computer-readable codes are run on a device, the processor in the device executes the method for implementing the target detection provided in any of the above embodiments. instruction.
本公开实施例还提供了一种计算机程序产品,用于存储计算机可读指令,该计算机可读指令被执行时使得计算机执行上述任一实施例提供的目标检测方法的步骤。Embodiments of the present disclosure further provide a computer program product for storing computer-readable instructions, which, when executed, cause a computer to execute the steps of the target detection method provided by any of the foregoing embodiments.
电子设备可以被提供为终端、服务器或其它形态的设备。The electronic device may be provided as a terminal, server or other form of device.
图8为本公开实施例的一种电子设备800的组成结构示意图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 8 is a schematic structural diagram of an electronic device 800 according to an embodiment of the disclosure. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
参照图8,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(Input/Output,I/O)的接口812,传感器组件814,以及通信组件816。8, an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812 , sensor component 814 , and communication component 816 .
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random-Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read Only Memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM),可编程只读存储器(Programmable Read-Only Memory,PROM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。 Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable) Erasable Programmable Read Only Memory, EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (Read-Only Memory) , ROM), magnetic memory, flash memory, magnetic disk or optical disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。 Power supply assembly 806 provides power to various components of electronic device 800 . Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(Liquid Crystal Display,LCD)和触摸面板(Touch panel,TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。在电子设备800处于操作模式,如拍摄模式或视频模式的情况下,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。 Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),在电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式的情况下,麦克风被配置为接收外部音频信号。在一些实施例中,所接收的音频信号可以被存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。 Audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode. In some embodiments, the received audio signal may be stored in memory 804 or transmitted via communication component 816 . In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(Complementary Metal-Oxide-Semiconductor,CMOS)或电荷耦合装置(Charge Coupled Device,CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加 速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 . For example, the sensor assembly 814 can detect the open/closed state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include a light sensor, such as a Complementary Metal-Oxide-Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(WiFi),第二代移动通信技术(The 2nd Generation,2G)或第三代移动通信技术(The 3rd Generation,3G),或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(Near Field Communication,NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(Radio Frequency Identification,RFID)技术,红外数据协会(Infrared Data Association,IrDA)技术,超宽带(Ultra Wide Band,UWB)技术,蓝牙(Bluetooth,BT)技术和其他技术来实现。 Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (The 2nd Generation, 2G) or a third generation mobile communication technology (The 3rd Generation, 3G), or their The combination. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (Bluetooth, BT) technology and other technology to achieve.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理设备(Digital Signal Processing Device,DSPD)、可编程逻辑器件(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (Digital Signal Processing Devices) , DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation for performing the above method.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method.
图9为本公开实施例提供的一种电子设备1900的组成结构示意图。例如,电子设备1900可以被实施为一服务器。参照图9,电子设备1900包括处理组件1922,在一些实施例中可以包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 9 is a schematic structural diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be implemented as a server. 9, an electronic device 1900 includes a processing component 1922, which in some embodiments may include one or more processors, and a memory resource, represented by memory 1932, for storing instructions executable by the processing component 1922, such as applications program. An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Additionally, the processing component 1922 is configured to execute instructions to perform the above-described methods.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows Server TM),苹果公司推出的基于图形用户界面操作系统(Mac OS X TM),多用户多进程的计算机操作系统(Unix TM),自由和开放原代码的类Unix操作系统(Linux TM),开放原代码的类Unix操作系统(FreeBSD TM)或类似。 The electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 . The electronic device 1900 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server ), a graphical user interface based operating system (Mac OS X ) introduced by Apple, a multi-user multi-process computer operating system (Unix ), Free and Open Source Unix-like Operating System (Linux ), Open Source Unix-like Operating System (FreeBSD ) or the like.
在一些实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In some embodiments, a non-volatile computer-readable storage medium is also provided, such as memory 1932 comprising computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described method.
本公开实施例可以是系统、方法、计算机可读存储介质、计算机程序、计算机程序产品中的一种或多种。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开上述任一实施例提供的目标检测方法的计算机可读程序指令。Embodiments of the present disclosure may be one or more of a system, a method, a computer-readable storage medium, a computer program, or a computer program product. The computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling the processor to implement the target detection method provided by any of the above embodiments of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), Static Random Access Memory (SRAM), Portable Compact Disc Read-Only Memory (CD-ROM), Digital Video Disc (DVD), Memory Stick, Floppy Disk, Mechanical Encoding devices, such as punched cards or raised structures in grooves on which instructions are stored, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开实施例的步骤的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(Programmable Logic Arrays,PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开实施例。The computer program instructions for performing the steps of the embodiments of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in a Source or object code written in any combination of one or more programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the "C" language or similar Programming language. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, can be connected to an external computer (e.g. use an internet service provider to connect via the internet). In some embodiments, custom electronic circuits, such as programmable logic circuits, Field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), are personalized by utilizing state information of computer readable program instructions, The electronic circuit may execute computer-readable program instructions to implement embodiments of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或组成结构图描述了本公开实施例。应当理解,流程图和/或组成结构图的每个方框以及流程图和/或组成结构图中各方框的组合,都可以由计算机可读程序指令实现。Embodiments of the present disclosure are described herein with reference to flowchart illustrations and/or structural diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present disclosure. It will be understood that each block of the flowcharts and/or structural diagrams, and combinations of blocks in the flowcharts and/or structural diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或组成结构图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或组成结构图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more of the blocks in the flowcharts and/or constituent block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium storing the instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或组成结构图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks in the flowcharts and/or constituent block diagrams.
附图中的流程图和组成结构图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或组成结构图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在一些实施例中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,组成结构图和/或流程图中的每个方框、以及组成结构图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of an instruction that contains one or more logic for implementing the specified Executable instructions for the function. In some implementations, the functions noted in the blocks may also occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the constituent block diagrams and/or flowchart illustrations, and combinations of blocks in the constituent block diagrams and/or flowchart illustrations, may be implemented using special purpose hardware-based hardware that performs the specified function or action. system, or can be implemented using a combination of dedicated hardware and computer instructions.
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一些实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一些实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically implemented by hardware, software or a combination thereof. In some embodiments, the computer program product is embodied as a computer storage medium, and in other embodiments, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present disclosure have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
工业实用性Industrial Applicability
本公开实施例提供了一种目标检测方法及装置、电子设备、存储介质、计算机程序产品和计算机程序,其中,该方法包括:对待检测的第一图像进行特征提取,得到所述第一图像的多个尺度的第一特征图;通过已训练的目标检测网络对所述第一图像的多个尺度的第一特征图进行处理,得到所述第一图像中目标类别的第一对象的位置。根据本公开实施例,可以对待检测的图像中存在的目标类别的第一对象进行检测,并且能够提高目标检测的敏感性以及准确性。Embodiments of the present disclosure provide a target detection method and device, electronic equipment, storage medium, computer program product, and computer program, wherein the method includes: performing feature extraction on a first image to be detected, and obtaining a feature of the first image. First feature maps of multiple scales; processing the first feature maps of multiple scales of the first image through the trained target detection network to obtain the position of the first object of the target category in the first image. According to the embodiments of the present disclosure, the first object of the target category existing in the image to be detected can be detected, and the sensitivity and accuracy of target detection can be improved.

Claims (30)

  1. 一种目标检测方法,包括:A target detection method, comprising:
    对待检测的第一图像进行特征提取,得到所述第一图像的多个尺度的第一特征图;performing feature extraction on the first image to be detected to obtain first feature maps of multiple scales of the first image;
    通过已训练的目标检测网络对所述第一图像的多个尺度的第一特征图进行处理,得到所述第一图像中存在的目标类别的第一对象的位置;Process the first feature maps of multiple scales of the first image through the trained target detection network to obtain the position of the first object of the target category existing in the first image;
    其中,所述目标检测网络采用递归的方式进行训练;所述目标检测网络包括分类子网络、回归子网络和分割子网络,所述分类子网络用于确定所述第一图像中是否存在所述第一对象、所述回归子网络用于确定所述第一图像中存在的第一对象的边界框,所述分割子网络用于确定所述第一图像中存在的第一对象的轮廓。Wherein, the target detection network is trained in a recursive manner; the target detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, and the classification sub-network is used to determine whether the first image has the The first object and the regression sub-network are used for determining the bounding box of the first object existing in the first image, and the segmentation sub-network is used for determining the outline of the first object existing in the first image.
  2. 根据权利要求1所述的方法,所述方法还包括:The method of claim 1, further comprising:
    根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,所述第一训练集包括多个样本图像以及所述样本图像的第一标注信息,所述第一标注信息包括所述样本图像中第二对象的真实位置;According to the first training set, the target detection network is trained to obtain the target detection network in the first state. The first training set includes a plurality of sample images and the first annotation information of the sample images. The first The annotation information includes the real position of the second object in the sample image;
    通过所述第一状态的目标检测网络对所述样本图像进行处理,得到所述样本图像中第二对象的预测位置;The sample image is processed by the target detection network in the first state to obtain the predicted position of the second object in the sample image;
    根据所述第二对象的预测位置及真实位置,确定所述样本图像中的假阳性区域、假阴性区域及真阳性区域;According to the predicted position and the real position of the second object, determine the false positive area, the false negative area and the true positive area in the sample image;
    根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,所述第二训练集包括多个样本图像以及所述样本图像的第二标注信息,所述第二标注信息包括所述样本图像中的假阳性区域、假阴性区域及真阳性区域。According to the second training set, the target detection network in the first state is trained to obtain the trained target detection network. The second training set includes a plurality of sample images and the second label information of the sample images. The second label information includes false positive areas, false negative areas and true positive areas in the sample image.
  3. 根据权利要求2所述的方法,其中,所述多个样本图像包括正样本图像和负样本图像,所述方法还包括:The method of claim 2, wherein the plurality of sample images include positive sample images and negative sample images, the method further comprising:
    对已标注的第二图像进行裁剪,得到预设尺寸的正样本图像及负样本图像,所述正样本图像中包括至少一个第二对象,所述负样本图像中不包括第二对象。The marked second image is cropped to obtain a positive sample image and a negative sample image of a preset size, wherein the positive sample image includes at least one second object, and the negative sample image does not include the second object.
  4. 根据权利要求2所述的方法,其中,所述第二对象的真实位置包括所述第二对象的边界框,所述根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,包括:The method according to claim 2, wherein the real position of the second object includes the bounding box of the second object, and the target detection network is trained according to the first training set to obtain the first state object detection network, including:
    对所述样本图像进行特征提取,得到所述样本图像的多个尺度的第二特征图;performing feature extraction on the sample image to obtain second feature maps of multiple scales of the sample image;
    根据所述多个尺度的第二特征图及预设的多个锚框,确定所述样本图像中的多个第一参考框;determining a plurality of first reference frames in the sample image according to the second feature maps of the plurality of scales and a plurality of preset anchor frames;
    根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本,所述训练样本包括标注信息为属于目标类别的正样本,以及标注信息为不属于目标类别的负样本;According to the bounding box of the second object in the sample image, a preset number of training samples are determined from the plurality of first reference frames, and the training samples include positive samples whose annotation information belongs to the target category, and annotation information are negative samples that do not belong to the target category;
    根据所述训练样本,训练所述分类子网络。The classification sub-network is trained according to the training samples.
  5. 根据权利要求4所述的方法,其中,所述根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本,包括:The method according to claim 4, wherein determining a preset number of training samples from the plurality of first reference frames according to the bounding box of the second object in the sample image, comprising:
    将所述样本图像中的边界框划分至多个边界框集合中,每个边界框集合中边界框的尺寸处于预设的尺寸区间内;dividing the bounding box in the sample image into multiple bounding box sets, and the size of the bounding box in each bounding box set is within a preset size interval;
    针对任一边界框集合,从所述多个第一参考框中去除已被确定为训练样本的第一参考框,得到与所述边界框集合对应的参考框集合;For any set of bounding boxes, remove the first reference frame that has been determined as a training sample from the plurality of first reference frames, to obtain a set of reference frames corresponding to the set of bounding boxes;
    针对所述边界框集合中的任一边界框,根据所述边界框与对应的参考框集合中的各个第一参考框之间的交并比,确定与所述边界框对应的正样本和负样本,所述正样本的数量与所述边界框集合的尺寸区间负相关;For any bounding box in the bounding box set, determine a positive sample and a negative sample corresponding to the bounding box according to the intersection ratio between the bounding box and each first reference box in the corresponding reference box set samples, the number of positive samples is negatively correlated with the size interval of the bounding box set;
    根据尺寸区间由小到大的顺序依次处理各个边界框集合,得到所述预设数量的训练样本。Each bounding box set is sequentially processed according to the size interval from small to large to obtain the preset number of training samples.
  6. 根据权利要求4或5所述的方法,其中,所述根据所述训练样本,训练所述分类子网络,包括:The method according to claim 4 or 5, wherein the training the classification sub-network according to the training samples comprises:
    对所述第二特征图进行裁剪,得到所述训练样本对应的第三特征图;Cropping the second feature map to obtain a third feature map corresponding to the training sample;
    将所述第三特征图输入所述分类子网络,得到所述训练样本属于目标类别的第一概率;Inputting the third feature map into the classification sub-network to obtain the first probability that the training sample belongs to the target category;
    根据所述训练样本属于目标类别的第一概率及所述训练样本的标注信息,确定所述分类子网络的第一损失;determining the first loss of the classification sub-network according to the first probability that the training sample belongs to the target category and the labeling information of the training sample;
    根据所述第一损失,调整所述分类子网络的网络参数。According to the first loss, the network parameters of the classification sub-network are adjusted.
  7. 根据权利要求3所述的方法,其中,所述第二对象的真实位置包括所述第二对象的边界框,所述根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,包括:The method according to claim 3, wherein the real position of the second object includes the bounding box of the second object, and the target detection network is trained according to the first training set to obtain the first state object detection network, including:
    对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图;performing feature extraction on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image;
    根据所述多个尺度的第四特征图及预设的多个锚框,确定所述正样本图像中的多个第二参考框;determining a plurality of second reference frames in the positive sample image according to the fourth feature maps of the plurality of scales and a plurality of preset anchor frames;
    针对所述样本图像中第二对象的任一边界框:For any bounding box of the second object in the sample image:
    确定所述边界框与所述多个第二参考框的交并比,并将交并比最大的第二参考框确定为与所述边界框对应的匹配框;determining the intersection ratio of the bounding box and the plurality of second reference frames, and determining the second reference frame with the largest intersection ratio as the matching frame corresponding to the bounding box;
    将所述匹配框对应的第五特征图输入所述回归子网络,得到所述匹配框的预测框;Input the fifth feature map corresponding to the matching frame into the regression sub-network to obtain the prediction frame of the matching frame;
    根据所述边界框与所述预测框之间的差异,确定所述回归子网络的第二损失;determining the second loss of the regression sub-network according to the difference between the bounding box and the prediction box;
    根据所述第二损失,调整所述回归子网络的网络参数。According to the second loss, network parameters of the regression sub-network are adjusted.
  8. 根据权利要求7所述的方法,其中,所述根据所述边界框与所述预测框之间的差异,确定所述回归子网络的第二损失,包括:The method according to claim 7, wherein the determining the second loss of the regression sub-network according to the difference between the bounding box and the prediction box comprises:
    根据所述边界框与所述预测框之间的坐标偏移量及交并比,确定所述匹配框的第一回归损失;determining the first regression loss of the matching frame according to the coordinate offset and the intersection ratio between the bounding frame and the prediction frame;
    根据所述边界框与所述预测框之间的交集、并集及最小闭区域,确定所述匹配框的第二回归损失;determining the second regression loss of the matching box according to the intersection, union and minimum closed region between the bounding box and the prediction box;
    根据所述第一回归损失及所述第二回归损失,确定所述回归子网络的第二损失。A second loss of the regression sub-network is determined according to the first regression loss and the second regression loss.
  9. 根据权利要求3所述的方法,其中,所述第二对象的真实位置包括所述第二对象的轮廓,所述根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,包括:The method according to claim 3, wherein the real position of the second object includes the outline of the second object, and the target detection network is trained according to the first training set to obtain the first state of the object detection network. Object detection network, including:
    对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图;performing feature extraction on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image;
    将所述多个尺度的第四特征图输入所述分割子网络,得到所述正样本图像各个像素点属于目标类别的第二概率;Inputting the fourth feature maps of the multiple scales into the segmentation sub-network to obtain the second probability that each pixel of the positive sample image belongs to the target category;
    根据所述正样本图像的像素点数量、所述正样本图像中第二对象的轮廓以及各个像素点属于目标类别的第二概率,确定所述分割子网络的第三损失;Determine the third loss of the segmentation sub-network according to the number of pixels in the positive sample image, the contour of the second object in the positive sample image, and the second probability that each pixel belongs to the target category;
    根据所述第三损失,调整所述分割子网络的网络参数。According to the third loss, the network parameters of the segmentation sub-network are adjusted.
  10. 根据权利要求2所述的方法,其中,所述根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,包括:The method according to claim 2, wherein, according to the second training set, the target detection network in the first state is trained to obtain a trained target detection network, comprising:
    按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,确定假阳性区域、假阴性区域及真阳性区域对应的第五特征图;According to the second annotation information, the second feature maps of multiple scales of the sample image are cropped, and the fifth feature maps corresponding to the false positive area, the false negative area and the true positive area are determined;
    将所述第五特征图输入所述分类子网络,得到假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率;Inputting the fifth feature map into the classification sub-network to obtain the third probability that the false positive area, the false negative area and the true positive area belong to the target category;
    根据假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率,以及假阳性区域、假阴性区域及真阳性区域的真实类别,确定所述分类子网络的第四损失;Determine the fourth loss of the classification sub-network according to the third probability that the false positive area, the false negative area and the true positive area belong to the target category, and the true category of the false positive area, the false negative area and the true positive area;
    根据所述第四损失,调整所述分类子网络的网络参数。According to the fourth loss, network parameters of the classification sub-network are adjusted.
  11. 根据权利要求2所述的方法,其中,所述根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,包括:The method according to claim 2, wherein, according to the second training set, the target detection network in the first state is trained to obtain a trained target detection network, comprising:
    按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,得到真阳性区域和假阴性区域对应的第六特征图;According to the second annotation information, the second feature maps of multiple scales of the sample image are cropped to obtain sixth feature maps corresponding to the true positive area and the false negative area;
    确定与所述真阳性区域和假阴性区域匹配的边界框;determining bounding boxes that match the true positive and false negative regions;
    将所述第六特征图输入所述回归子网络,得到所述真阳性区域和假阴性区域的预测框;Input the sixth feature map into the regression sub-network to obtain the prediction frame of the true positive area and the false negative area;
    根据所述真阳性区域和假阴性区域的预测框和对应的边界框之间的差异,确定所述回归子网络的第五损失;determining the fifth loss of the regression sub-network according to the difference between the prediction boxes of the true positive regions and the false negative regions and the corresponding bounding boxes;
    根据所述第五损失,调整所述回归子网络的网络参数。According to the fifth loss, network parameters of the regression sub-network are adjusted.
  12. 根据权利要求2所述的方法,其中,所述根据第二训练集,对所述第一状态的目标检测网 络进行训练,得到已训练的目标检测网络,包括:The method according to claim 2, wherein, according to the second training set, the target detection network in the first state is trained to obtain a trained target detection network, comprising:
    将所述真阳性区域和假阴性区域对应的第六特征图输入所述分割子网络,得到所述真阳性区域和假阴性区域中各个像素点属于目标类别的第四概率;Inputting the sixth feature map corresponding to the true positive area and the false negative area into the segmentation sub-network to obtain the fourth probability that each pixel in the true positive area and the false negative area belongs to the target category;
    根据所述真阳性区域和假阴性区域的像素点数量、所述真阳性区域和假阴性区域中第二对象的轮廓以及各个像素点属于目标类别的第四概率,确定所述分割子网络的第六损失;According to the number of pixels in the true positive area and the false negative area, the outline of the second object in the true positive area and the false negative area, and the fourth probability that each pixel belongs to the target category, determine the first segment of the segmentation sub-network. six losses;
    根据所述第六损失,调整所述分割子网络的网络参数。According to the sixth loss, the network parameters of the segmentation sub-network are adjusted.
  13. 根据权利要求1至12中任意一项所述的方法,其中,所述第一图像包括2D医学影像和/或3D医学影像,所述目标类别包括结节和/或囊肿。The method according to any one of claims 1 to 12, wherein the first image comprises a 2D medical image and/or a 3D medical image, and the target category comprises nodules and/or cysts.
  14. 一种目标检测装置,包括:A target detection device, comprising:
    提取部分,用于对待检测的第一图像进行特征提取,得到所述第一图像的多个尺度的第一特征图;an extraction part, used for feature extraction of the first image to be detected, to obtain first feature maps of multiple scales of the first image;
    第一处理部分,用于通过已训练的目标检测网络对所述第一图像的多个尺度的第一特征图进行处理,得到所述第一图像中存在的目标类别的第一对象的位置;a first processing part, configured to process the first feature maps of multiple scales of the first image through the trained target detection network to obtain the position of the first object of the target category existing in the first image;
    其中,所述目标检测网络采用递归的方式进行训练;所述目标检测网络包括分类子网络、回归子网络和分割子网络,所述分类子网络用于确定所述第一图像中是否存在所述第一对象、所述回归子网络用于确定所述第一图像中存在的第一对象的边界框,所述分割子网络用于确定所述第一图像中存在的第一对象的轮廓。Wherein, the target detection network is trained in a recursive manner; the target detection network includes a classification sub-network, a regression sub-network and a segmentation sub-network, and the classification sub-network is used to determine whether the first image has the The first object and the regression sub-network are used for determining the bounding box of the first object existing in the first image, and the segmentation sub-network is used for determining the outline of the first object existing in the first image.
  15. 根据权利要求14所述的装置,所述装置还包括:第一训练部分,配置为根据第一训练集,对所述目标检测网络进行训练,得到第一状态的目标检测网络,所述第一训练集包括多个样本图像以及所述样本图像的第一标注信息,所述第一标注信息包括所述样本图像中第二对象的真实位置;第二处理部分,配置为通过所述第一状态的目标检测网络对所述样本图像进行处理,得到所述样本图像中第二对象的预测位置;确定部分,配置为根据所述第二对象的预测位置及真实位置,确定所述样本图像中的假阳性区域、假阴性区域及真阳性区域;第二训练部分,配置为根据第二训练集,对所述第一状态的目标检测网络进行训练,得到已训练的目标检测网络,所述第二训练集包括多个样本图像以及所述样本图像的第二标注信息,所述第二标注信息包括所述样本图像中的假阳性区域、假阴性区域及真阳性区域。The apparatus according to claim 14, further comprising: a first training part configured to train the target detection network according to a first training set to obtain a target detection network in a first state, the first The training set includes a plurality of sample images and first annotation information of the sample images, the first annotation information includes the real position of the second object in the sample image; the second processing part is configured to pass the first state The target detection network processes the sample image to obtain the predicted position of the second object in the sample image; the determining part is configured to determine the predicted position and real position of the second object in the sample image. A false positive area, a false negative area and a true positive area; the second training part is configured to train the target detection network in the first state according to the second training set to obtain a trained target detection network, the second The training set includes a plurality of sample images and second annotation information of the sample images, where the second annotation information includes false positive areas, false negative areas and true positive areas in the sample images.
  16. 根据权利要求15所述的装置,其中,所述多个样本图像包括正样本图像和负样本图像,所述装置还包括:裁剪部分,配置为对已标注的第二图像进行裁剪,得到预设尺寸的正样本图像及负样本图像,所述正样本图像中包括至少一个第二对象,所述负样本图像中不包括第二对象。The apparatus according to claim 15, wherein the plurality of sample images include positive sample images and negative sample images, and the apparatus further comprises: a cropping part configured to crop the marked second image to obtain a preset A positive sample image and a negative sample image of the size, the positive sample image includes at least one second object, and the negative sample image does not include the second object.
  17. 根据权利要求15所述的装置,其中,所述第二对象的真实位置包括所述第二对象的边界框,所述第一训练部分还配置为:对所述样本图像进行特征提取,得到所述样本图像的多个尺度的第二特征图;根据所述多个尺度的第二特征图及预设的多个锚框,确定所述样本图像中的多个第一参考框;根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本,所述训练样本包括标注信息为属于目标类别的正样本,以及标注信息为不属于目标类别的负样本;根据所述训练样本,训练所述分类子网络。The apparatus according to claim 15, wherein the real position of the second object includes a bounding box of the second object, and the first training part is further configured to: perform feature extraction on the sample image to obtain the multiple scale second feature maps of the sample image; according to the multiple scale second feature maps and multiple preset anchor frames, determine multiple first reference frames in the sample image; according to the The bounding box of the second object in the sample image, a preset number of training samples are determined from the plurality of first reference frames, and the training samples include positive samples whose annotation information belongs to the target category, and whose annotation information does not belong to the target category. Negative samples of the target category; according to the training samples, the classification sub-network is trained.
  18. 根据权利要求17所述的装置,其中,所述根据所述样本图像中第二对象的边界框,从所述多个第一参考框中确定出预设数量的训练样本,包括:将所述样本图像中的边界框划分至多个边界框集合中,每个边界框集合中边界框的尺寸处于预设的尺寸区间内;针对任一边界框集合,从所述多个第一参考框中去除已被确定为训练样本的第一参考框,得到与所述边界框集合对应的参考框集合;针对所述边界框集合中的任一边界框,根据所述边界框与对应的参考框集合中的各个第一参考框之间的交并比,确定与所述边界框对应的正样本和负样本,所述正样本的数量与所述边界框集合的尺寸区间负相关;根据尺寸区间由小到大的顺序依次处理各个边界框集合,得到所述预设数量的训练样本。The apparatus according to claim 17, wherein the determining a preset number of training samples from the plurality of first reference frames according to the bounding box of the second object in the sample image comprises: The bounding box in the sample image is divided into multiple bounding box sets, and the size of the bounding box in each bounding box set is within a preset size range; for any bounding box set, it is removed from the multiple first reference frames It has been determined as the first reference frame of the training sample, and a reference frame set corresponding to the bounding box set is obtained; for any bounding box in the bounding box set, according to the bounding box and the corresponding reference frame set The intersection ratio between each first reference frame of , determines the positive samples and negative samples corresponding to the bounding box, and the number of the positive samples is negatively correlated with the size interval of the bounding box set; Each bounding box set is processed in order in order to obtain the preset number of training samples.
  19. 根据权利要求17或18所述的装置,其中,所述根据所述训练样本,训练所述分类子网络,包括:对所述第二特征图进行裁剪,得到所述训练样本对应的第三特征图;将所述第三特征图输入所述分类子网络,得到所述训练样本属于目标类别的第一概率;根据所述训练样本属于目标类别的第一概率及所述训练样本的标注信息,确定所述分类子网络的第一损失;根据所述第一损失,调整 所述分类子网络的网络参数。The apparatus according to claim 17 or 18, wherein the training the classification sub-network according to the training sample comprises: cropping the second feature map to obtain a third feature corresponding to the training sample Figure; input the third feature map into the classification sub-network to obtain the first probability that the training sample belongs to the target category; according to the first probability that the training sample belongs to the target category and the labeling information of the training sample, determining a first loss of the classification sub-network; and adjusting network parameters of the classification sub-network according to the first loss.
  20. 根据权利要求16所述的装置,其中,所述第二对象的真实位置包括所述第二对象的边界框,所述第一训练部分还配置为:对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图;根据所述多个尺度的第四特征图及预设的多个锚框,确定所述正样本图像中的多个第二参考框;针对所述样本图像中第二对象的任一边界框:确定所述边界框与所述多个第二参考框的交并比,并将交并比最大的第二参考框确定为与所述边界框对应的匹配框;将所述匹配框对应的第五特征图输入所述回归子网络,得到所述匹配框的预测框;根据所述边界框与所述预测框之间的差异,确定所述回归子网络的第二损失;根据所述第二损失,调整所述回归子网络的网络参数。The apparatus according to claim 16, wherein the real position of the second object includes a bounding box of the second object, and the first training part is further configured to: perform feature extraction on the positive sample image to obtain fourth feature maps of multiple scales of the positive sample image; determining multiple second reference frames in the positive sample image according to the fourth feature maps of the multiple scales and a plurality of preset anchor frames; For any bounding box of the second object in the sample image: determine the intersection ratio of the bounding box and the plurality of second reference frames, and determine the second reference frame with the largest intersection ratio as the same as the second reference frame. The matching frame corresponding to the bounding box; input the fifth feature map corresponding to the matching frame into the regression sub-network to obtain the prediction frame of the matching frame; according to the difference between the bounding frame and the prediction frame, determine The second loss of the regression sub-network; according to the second loss, the network parameters of the regression sub-network are adjusted.
  21. 根据权利要求20所述的装置,其中,所述第一训练部分还配置为:根据所述边界框与所述预测框之间的坐标偏移量及交并比,确定所述匹配框的第一回归损失;根据所述边界框与所述预测框之间的交集、并集及最小闭区域,确定所述匹配框的第二回归损失;根据所述第一回归损失及所述第二回归损失,确定所述回归子网络的第二损失。The apparatus according to claim 20, wherein the first training part is further configured to: determine the first training part of the matching frame according to the coordinate offset and the intersection ratio between the bounding box and the prediction frame a regression loss; according to the intersection, union and minimum closed area between the bounding box and the prediction box, determine the second regression loss of the matching box; according to the first regression loss and the second regression loss loss, which determines the second loss of the regression sub-network.
  22. 根据权利要求16所述的装置,其中,所述第二对象的真实位置包括所述第二对象的轮廓,所述第一训练部分还配置为:对所述正样本图像进行特征提取,得到所述正样本图像的多个尺度的第四特征图;将所述多个尺度的第四特征图输入所述分割子网络,得到所述正样本图像各个像素点属于目标类别的第二概率;根据所述正样本图像的像素点数量、所述正样本图像中第二对象的轮廓以及各个像素点属于目标类别的第二概率,确定所述分割子网络的第三损失;根据所述第三损失,调整所述分割子网络的网络参数。The apparatus according to claim 16, wherein the real position of the second object includes the contour of the second object, and the first training part is further configured to: perform feature extraction on the positive sample image to obtain the the fourth feature maps of multiple scales of the positive sample image; input the fourth feature maps of the multiple scales into the segmentation sub-network to obtain the second probability that each pixel of the positive sample image belongs to the target category; according to The number of pixels in the positive sample image, the contour of the second object in the positive sample image, and the second probability that each pixel belongs to the target category determines the third loss of the segmentation sub-network; according to the third loss , and adjust the network parameters of the segmentation sub-network.
  23. 根据权利要求15所述的装置,其中,所述第二训练部分还配置为:按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,确定假阳性区域、假阴性区域及真阳性区域对应的第五特征图;将所述第五特征图输入所述分类子网络,得到假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率;根据假阳性区域、假阴性区域及真阳性区域属于目标类别的第三概率,以及假阳性区域、假阴性区域及真阳性区域的真实类别,确定所述分类子网络的第四损失;根据所述第四损失,调整所述分类子网络的网络参数。The apparatus according to claim 15, wherein the second training part is further configured to: according to the second label information, crop the second feature maps of multiple scales of the sample image to determine false positive regions , the fifth feature map corresponding to the false negative region and the true positive region; input the fifth feature map into the classification sub-network to obtain the third probability that the false positive region, the false negative region and the true positive region belong to the target category; according to The third probability that the false positive area, the false negative area and the true positive area belong to the target category, and the true category of the false positive area, the false negative area and the true positive area, determine the fourth loss of the classification sub-network; Four losses, which adjust the network parameters of the classification sub-network.
  24. 根据权利要求15所述的装置,其中,所述第二训练部分还配置为:按照所述第二标注信息,对所述样本图像的多个尺度的第二特征图进行裁剪,得到真阳性区域和假阴性区域对应的第六特征图;确定与所述真阳性区域和假阴性区域匹配的边界框;将所述第六特征图输入所述回归子网络,得到所述真阳性区域和假阴性区域的预测框;根据所述真阳性区域和假阴性区域的预测框和对应的边界框之间的差异,确定所述回归子网络的第五损失;根据所述第五损失,调整所述回归子网络的网络参数。The apparatus according to claim 15, wherein the second training part is further configured to: according to the second label information, crop the second feature maps of multiple scales of the sample image to obtain a true positive region The sixth feature map corresponding to the false negative region; determine the bounding box matching the true positive region and the false negative region; input the sixth feature map into the regression sub-network to obtain the true positive region and false negative The prediction frame of the region; according to the difference between the prediction frame of the true positive region and the false negative region and the corresponding bounding box, determine the fifth loss of the regression sub-network; according to the fifth loss, adjust the regression Network parameters for the subnet.
  25. 根据权利要求15所述的装置,其中,所述第二训练部分还配置为:将所述真阳性区域和假阴性区域对应的第六特征图输入所述分割子网络,得到所述真阳性区域和假阴性区域中各个像素点属于目标类别的第四概率;根据所述真阳性区域和假阴性区域的像素点数量、所述真阳性区域和假阴性区域中第二对象的轮廓以及各个像素点属于目标类别的第四概率,确定所述分割子网络的第六损失;根据所述第六损失,调整所述分割子网络的网络参数。The apparatus according to claim 15, wherein the second training part is further configured to: input the sixth feature map corresponding to the true positive area and the false negative area into the segmentation sub-network to obtain the true positive area and the fourth probability that each pixel in the false negative area belongs to the target category; according to the number of pixels in the true positive area and the false negative area, the outline of the second object in the true positive area and the false negative area, and each pixel point The fourth probability of belonging to the target category determines the sixth loss of the segmentation sub-network; according to the sixth loss, the network parameters of the segmentation sub-network are adjusted.
  26. 根据权利要求14至25中任一项所述的装置,其中,所述第一图像包括2D医学影像和/或3D医学影像,所述目标类别包括结节和/或囊肿。The apparatus of any one of claims 14 to 25, wherein the first image comprises a 2D medical image and/or a 3D medical image, and the target category comprises a nodule and/or a cyst.
  27. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至13中任意一项所述的方法。a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any one of claims 1 to 13.
  28. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至13中任意一项所述的方法。A computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the method of any one of claims 1 to 13 when executed by a processor.
  29. 一种计算机程序,包括计算机可读代码,在计算机可读代码在设备上运行的情况下,设备中的处理器执行用于实现权利要求1至13中任一所述的方法的指令。A computer program comprising computer readable code, where the computer readable code is run on a device, a processor in the device executes instructions for implementing the method of any one of claims 1 to 13.
  30. 一种计算机程序产品,配置为存储计算机可读指令,所述计算机可读指令被执行时使得计算机执行权利要求1至13中任一所述的方法。A computer program product configured to store computer readable instructions which, when executed, cause a computer to perform the method of any one of claims 1 to 13.
PCT/CN2021/119982 2021-01-15 2021-09-23 Target detection method and apparatus, and electronic device, storage medium, computer program product and computer program WO2022151755A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110057241.X 2021-01-15
CN202110057241.XA CN112785565B (en) 2021-01-15 2021-01-15 Target detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022151755A1 true WO2022151755A1 (en) 2022-07-21

Family

ID=75757108

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/119982 WO2022151755A1 (en) 2021-01-15 2021-09-23 Target detection method and apparatus, and electronic device, storage medium, computer program product and computer program

Country Status (2)

Country Link
CN (1) CN112785565B (en)
WO (1) WO2022151755A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114998749A (en) * 2022-07-28 2022-09-02 北京卫星信息工程研究所 SAR data amplification method for target detection
CN116152487A (en) * 2023-04-17 2023-05-23 广东广物互联网科技有限公司 Target detection method, device, equipment and medium based on depth IoU network
CN116188502A (en) * 2023-04-27 2023-05-30 尚特杰电力科技有限公司 Method for dividing infrared image of photovoltaic panel, storage medium and electronic device
CN116310656A (en) * 2023-05-11 2023-06-23 福瑞泰克智能系统有限公司 Training sample determining method and device and computer equipment
CN116342607A (en) * 2023-05-30 2023-06-27 尚特杰电力科技有限公司 Power transmission line defect identification method and device, electronic equipment and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112785565B (en) * 2021-01-15 2024-01-05 上海商汤智能科技有限公司 Target detection method and device, electronic equipment and storage medium
CN113749690B (en) * 2021-09-24 2024-01-30 无锡祥生医疗科技股份有限公司 Blood vessel blood flow measuring method, device and storage medium
CN117437397A (en) * 2022-07-15 2024-01-23 马上消费金融股份有限公司 Model training method, target detection method and device
CN115439699B (en) * 2022-10-25 2023-06-30 北京鹰瞳科技发展股份有限公司 Training method of target detection model, target detection method and related products
CN115375955B (en) * 2022-10-25 2023-04-18 北京鹰瞳科技发展股份有限公司 Training method of target detection model, target detection method and related product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003267A (en) * 2017-08-09 2018-12-14 深圳科亚医疗科技有限公司 From the computer implemented method and system of the automatic detected target object of 3D rendering
US20190073770A1 (en) * 2017-09-06 2019-03-07 International Business Machines Corporation Disease detection algorithms trainable with small number of positive samples
CN110210535A (en) * 2019-05-21 2019-09-06 北京市商汤科技开发有限公司 Neural network training method and device and image processing method and device
CN111368923A (en) * 2020-03-05 2020-07-03 上海商汤智能科技有限公司 Neural network training method and device, electronic equipment and storage medium
CN112785565A (en) * 2021-01-15 2021-05-11 上海商汤智能科技有限公司 Target detection method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003260B (en) * 2018-06-28 2021-02-09 深圳视见医疗科技有限公司 CT image pulmonary nodule detection method, device and equipment and readable storage medium
CN110827310A (en) * 2019-11-01 2020-02-21 北京航空航天大学 CT image automatic detection method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003267A (en) * 2017-08-09 2018-12-14 深圳科亚医疗科技有限公司 From the computer implemented method and system of the automatic detected target object of 3D rendering
US20190073770A1 (en) * 2017-09-06 2019-03-07 International Business Machines Corporation Disease detection algorithms trainable with small number of positive samples
CN110210535A (en) * 2019-05-21 2019-09-06 北京市商汤科技开发有限公司 Neural network training method and device and image processing method and device
CN111368923A (en) * 2020-03-05 2020-07-03 上海商汤智能科技有限公司 Neural network training method and device, electronic equipment and storage medium
CN112785565A (en) * 2021-01-15 2021-05-11 上海商汤智能科技有限公司 Target detection method and device, electronic equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114998749A (en) * 2022-07-28 2022-09-02 北京卫星信息工程研究所 SAR data amplification method for target detection
CN116152487A (en) * 2023-04-17 2023-05-23 广东广物互联网科技有限公司 Target detection method, device, equipment and medium based on depth IoU network
CN116188502A (en) * 2023-04-27 2023-05-30 尚特杰电力科技有限公司 Method for dividing infrared image of photovoltaic panel, storage medium and electronic device
CN116188502B (en) * 2023-04-27 2023-07-21 尚特杰电力科技有限公司 Method for dividing infrared image of photovoltaic panel, storage medium and electronic device
CN116310656A (en) * 2023-05-11 2023-06-23 福瑞泰克智能系统有限公司 Training sample determining method and device and computer equipment
CN116310656B (en) * 2023-05-11 2023-08-15 福瑞泰克智能系统有限公司 Training sample determining method and device and computer equipment
CN116342607A (en) * 2023-05-30 2023-06-27 尚特杰电力科技有限公司 Power transmission line defect identification method and device, electronic equipment and storage medium
CN116342607B (en) * 2023-05-30 2023-08-08 尚特杰电力科技有限公司 Power transmission line defect identification method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112785565B (en) 2024-01-05
CN112785565A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
WO2022151755A1 (en) Target detection method and apparatus, and electronic device, storage medium, computer program product and computer program
TWI770754B (en) Neural network training method electronic equipment and storage medium
TWI755853B (en) Mage processing method, electronic device and computer-readable storage medium
CN110458127B (en) Image processing method, device, equipment and system
CN110348543B (en) Fundus image recognition method and device, computer equipment and storage medium
CN111091576B (en) Image segmentation method, device, equipment and storage medium
WO2021147257A1 (en) Network training method and apparatus, image processing method and apparatus, and electronic device and storage medium
CN112767329B (en) Image processing method and device and electronic equipment
TWI713054B (en) Image segmentation method and device, electronic equipment and storage medium
CN110473186B (en) Detection method based on medical image, model training method and device
WO2022036972A1 (en) Image segmentation method and apparatus, and electronic device and storage medium
JP2022535219A (en) Image segmentation method and device, electronic device, and storage medium
CN112541928A (en) Network training method and device, image segmentation method and device and electronic equipment
CN114820584B (en) Lung focus positioner
CN113222038B (en) Breast lesion classification and positioning method and device based on nuclear magnetic image
WO2022121170A1 (en) Image processing method and apparatus, electronic device, storage medium, and program
WO2023050691A1 (en) Image processing method and apparatus, and electronic device, storage medium and program
WO2021259390A2 (en) Coronary artery calcified plaque detection method and apparatus
KR20220034844A (en) Image processing method and apparatus, electronic device, storage medium and program product
WO2023050690A1 (en) Image processing method and apparatus, electronic device, storage medium, and program
KR20220012407A (en) Image segmentation method and apparatus, electronic device and storage medium
CN113902730A (en) Image processing and neural network training method and device
CN112767347A (en) Image registration method and device, electronic equipment and storage medium
JP2023504957A (en) TOOTH IMAGE PROCESSING METHOD, APPARATUS, ELECTRONIC DEVICE, STORAGE MEDIUM AND PROGRAM
CN113487537A (en) Information processing method, device and storage medium for breast cancer ultrasonic high-echo halo

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21918946

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 07.12.2023)