CN112686865A - 3D view auxiliary detection method, system, device and storage medium - Google Patents
3D view auxiliary detection method, system, device and storage medium Download PDFInfo
- Publication number
- CN112686865A CN112686865A CN202011620378.3A CN202011620378A CN112686865A CN 112686865 A CN112686865 A CN 112686865A CN 202011620378 A CN202011620378 A CN 202011620378A CN 112686865 A CN112686865 A CN 112686865A
- Authority
- CN
- China
- Prior art keywords
- lesion
- view
- frame
- labeling
- view image
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 138
- 230000003902 lesion Effects 0.000 claims abstract description 353
- 238000002372 labelling Methods 0.000 claims abstract description 129
- 238000000034 method Methods 0.000 claims abstract description 23
- 238000006243 chemical reaction Methods 0.000 claims abstract description 18
- 230000004927 fusion Effects 0.000 claims abstract description 11
- 238000012549 training Methods 0.000 claims description 45
- 238000007781 pre-processing Methods 0.000 claims description 5
- 239000011521 glass Substances 0.000 abstract description 10
- 238000012545 processing Methods 0.000 abstract description 6
- 230000000694 effects Effects 0.000 abstract description 5
- 230000008569 process Effects 0.000 abstract description 4
- 238000004364 calculation method Methods 0.000 description 17
- 238000003745 diagnosis Methods 0.000 description 10
- 235000012431 wafers Nutrition 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 238000003384 imaging method Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 230000009977 dual effect Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000004195 computer-aided diagnosis Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000003062 neural network model Methods 0.000 description 2
- 230000010287 polarization Effects 0.000 description 2
- 238000011897 real-time detection Methods 0.000 description 2
- 208000002847 Surgical Wound Diseases 0.000 description 1
- 208000003464 asthenopia Diseases 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001839 endoscopy Methods 0.000 description 1
- 230000003628 erosive effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000004438 eyesight Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000028161 membrane depolarization Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Endoscopes (AREA)
- Image Analysis (AREA)
Abstract
本发明涉及医疗辅助检测技术领域,具体涉及一种3D视图辅助检测方法、系统、装置及存储介质。其中方法包括:实时获取待检测区域的左视图像和右视图像;对左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框;将左视图像和右视图像进行特征融合后进行2D‑3D转换得到待检测区域的3D视图,整个图像处理过程速度快,实时性好;根据第一病变标注框和第二病变标注框,在3D视图中对病变的位置进行3D标注得到3D病变标注视图,实时显示3D病变标注视图。医生佩戴专门的3D眼镜即可实时清楚的观察到检测区域的病变情况,并且采用3D视图实时显示使得观察效果更好。
The present invention relates to the technical field of medical auxiliary detection, in particular to a 3D view auxiliary detection method, system, device and storage medium. The method includes: acquiring a left-view image and a right-view image of the area to be detected in real time; performing lesion detection on the left-view image and the right-view image to obtain a first lesion labeling frame and a second lesion labeling frame respectively; After image feature fusion, 2D-3D conversion is performed to obtain a 3D view of the area to be detected. The entire image processing process is fast and real-time. 3D annotation is performed to obtain a 3D lesion annotation view, and the 3D lesion annotation view is displayed in real time. Doctors wearing special 3D glasses can clearly observe the lesions in the detection area in real time, and the real-time display of 3D views makes the observation effect better.
Description
技术领域technical field
本发明涉及医疗辅助检测技术领域,具体涉及一种3D视图辅助检测方法、系统、装置及存储介质。The present invention relates to the technical field of medical auxiliary detection, in particular to a 3D view auxiliary detection method, system, device and storage medium.
背景技术Background technique
内窥镜可以经人体的天然孔道或者是经手术微创创口进入患者体内,为医生提供清晰、稳定的高质量画面来完成手术。3D内窥镜是一种新型的立体成像内窥镜,能够直观反映观察区域的景深特征,利于诊断。The endoscope can enter the patient's body through the natural orifice of the human body or through a minimally invasive surgical wound, providing doctors with a clear and stable high-quality picture to complete the operation. 3D endoscope is a new type of stereo imaging endoscope, which can directly reflect the depth of field characteristics of the observation area, which is conducive to diagnosis.
在3D内窥镜辅助诊断中,临床医生通过内窥镜观察患者体内情况判断诊断结果。但是人工分析存在以下显而易见的缺陷:(1)不够精确,医生仅能凭借经验去辨别,由于缺乏量化的标准,容易造成误诊;(2)不可避免地会出现人眼视力产生的误差及视力疲劳;(3)海量的图像信息容易产生漏诊。In 3D endoscopy-assisted diagnosis, clinicians use an endoscope to observe the patient's internal conditions to determine the diagnosis result. However, manual analysis has the following obvious defects: (1) It is not accurate enough, doctors can only rely on experience to identify, and it is easy to cause misdiagnosis due to the lack of quantitative standards; (2) There will inevitably be errors in human eyesight and visual fatigue. ; (3) Massive image information is prone to misdiagnosis.
传统计算机辅助诊断技术(Computer Aided Diagnosis,CAD)通过医学图像处理技术结合计算机分析计算来辅助发现病灶,虽然能解决人工分析的部分问题,但还是需人工提取特征,这样实时性差且容易发生漏诊。Traditional Computer Aided Diagnosis (CAD) uses medical image processing technology combined with computer analysis and calculation to assist in the discovery of lesions. Although it can solve some of the problems of manual analysis, it still needs to extract features manually, which has poor real-time performance and is prone to missed diagnosis.
发明内容SUMMARY OF THE INVENTION
本发明主要解决的技术问题是现有的医学图像处理技术中采用人工进行特征提取来辅助发现病灶时实时性差。The main technical problem to be solved by the present invention is that the existing medical image processing technology has poor real-time performance when using artificial feature extraction to assist in finding lesions.
一种3D视图辅助检测方法,包括:A 3D view aided detection method, comprising:
实时获取待检测区域的左视图像和右视图像;Obtain the left-view image and right-view image of the area to be detected in real time;
对所述左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框;Performing lesion detection on the left-view image and the right-view image to obtain a first lesion labeling frame and a second lesion labeling frame, respectively;
将所述左视图像和右视图像进行特征融合后进行2D-3D转换得到待检测区域的3D视图;2D-3D conversion is performed after feature fusion of the left-view image and the right-view image to obtain a 3D view of the area to be detected;
根据所述第一病变标注框和第二病变标注框,在所述3D视图中对病变的位置进行3D标注得到3D病变标注视图;According to the first lesion labeling frame and the second lesion labeling frame, perform 3D labeling on the position of the lesion in the 3D view to obtain a 3D lesion labeling view;
实时显示所述3D病变标注视图。The 3D lesion annotation view is displayed in real time.
在一种实施例中,所述根据所述第一病变标注框和第二病变标注框在所述3D视图中对病变的位置进行3D标注得到3D病变标注视图包括:In an embodiment, the obtaining a 3D lesion annotation view by performing 3D annotation on the position of the lesion in the 3D view according to the first lesion annotation frame and the second lesion annotation frame includes:
对所述第一病变标注框和第二病变标注框进行关联度计算,若所述关联度达到预设区间,则将所述第一病变标注框和第二病变标注框关联得到3D标注框;Calculate the degree of association between the first lesion annotation frame and the second lesion annotation frame, and if the association degree reaches a preset interval, associate the first lesion annotation frame and the second lesion annotation frame to obtain a 3D annotation frame;
在所述3D视图中标注所述3D标注框得到所述3D病变标注视图,该3D标注框所在的区域为病变区域。The 3D annotation frame is marked in the 3D view to obtain the 3D lesion annotation view, and the area where the 3D annotation frame is located is the lesion area.
在一种实施例中,所述对所述左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框包括:In an embodiment, the performing lesion detection on the left-view image and the right-view image to obtain a first lesion annotation frame and a second lesion annotation frame respectively includes:
将所述左视图像和右视图像分别输入到预先训练好的第一病变检测模型和第二病变检测模型中,分别得到所述第一病变标注框和第二病变标注框;该第一病变标注框和第二病变标注框分别表示左视图像和右视图像中的病变区域。Inputting the left-view image and the right-view image into the pre-trained first lesion detection model and the second lesion detection model, respectively, to obtain the first lesion annotation frame and the second lesion annotation frame; The label box and the second lesion label box represent the lesion area in the left-view image and the right-view image, respectively.
在一种实施例中,所述第一病变检测模型和第二病变检测模型均通过以下方法训练所得:In one embodiment, the first lesion detection model and the second lesion detection model are both obtained by training the following methods:
获取正常图像数据集和病变图像数据集作为训练样本集;Obtain normal image datasets and lesion image datasets as training sample sets;
对所述训练样本集中的图像进行缩放、旋转、翻转和改变亮度以扩展该训练样本集;scaling, rotating, flipping and changing the brightness of the images in the training sample set to expand the training sample set;
将扩展后的训练样本集输入到初始YOLO网络模型中对其进行多次训练得到所述第一病变检测模型和第二病变检测模型。The expanded training sample set is input into the initial YOLO network model for multiple training to obtain the first lesion detection model and the second lesion detection model.
一种3D视图辅助检测系统,包括:A 3D view aided detection system, comprising:
图像获取模块,用于实时获取待检测区域的左视图像和右视图像;The image acquisition module is used to acquire the left-view image and right-view image of the area to be detected in real time;
病变检测模块,用于对所述左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框;a lesion detection module, configured to perform lesion detection on the left-view image and right-view image to obtain a first lesion labeling frame and a second lesion labeling frame, respectively;
视图转换模块,用于将所述左视图像和右视图像进行特征融合后进行2D-3D转换得到待检测区域的3D视图;A view conversion module, configured to perform 2D-3D conversion after feature fusion of the left-view image and the right-view image to obtain a 3D view of the area to be detected;
3D标注单元,用于根据所述第一病变标注框和第二病变标注框,在所述3D视图中对病变的位置进行3D标注得到3D病变标注视图;a 3D labeling unit, configured to perform 3D labeling on the position of the lesion in the 3D view according to the first lesion labeling frame and the second lesion labeling frame to obtain a 3D lesion labeling view;
实时显示模块,用于实时显示所述3D病变标注视图。The real-time display module is used to display the 3D lesion annotation view in real time.
在一种实施例中,所述3D标注单元包括关联模块和标注模块:In an embodiment, the 3D labeling unit includes an association module and a labeling module:
所述关联模块用于对所述第一病变标注框和第二病变标注框进行关联度计算,若所述关联度达到预设区间,则将所述第一病变标注框和第二病变标注框关联得到3D标注框;The association module is used to calculate the degree of association between the first lesion annotation frame and the second lesion annotation frame, and if the association degree reaches a preset interval, the first lesion annotation frame and the second lesion annotation frame are calculated. The association gets the 3D callout frame;
所述标注模块用于在所述3D视图中标注所述3D标注框得到所述3D病变标注视图,该3D标注框所在的区域为病变区域。The labeling module is configured to label the 3D labeling frame in the 3D view to obtain the 3D lesion labeling view, and the area where the 3D labeling frame is located is the lesion area.
在一种实施例中,所述病变检测模块中设有预先训练好的第一病变检测模型和第二病变检测模型;In an embodiment, the lesion detection module is provided with a pre-trained first lesion detection model and a second lesion detection model;
所述对所述左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框包括:The performing lesion detection on the left-view image and the right-view image to obtain the first lesion labeling frame and the second lesion labeling frame respectively includes:
将所述左视图像和右视图像分别输入到预先训练好的第一病变检测模型和第二病变检测模型中,分别得到所述第一病变标注框和第二病变标注框;该第一病变标注框和第二病变标注框分别表示左视图像和右视图像中的病变区域。Inputting the left-view image and the right-view image into the pre-trained first lesion detection model and the second lesion detection model, respectively, to obtain the first lesion annotation frame and the second lesion annotation frame; The label box and the second lesion label box represent the lesion area in the left-view image and the right-view image, respectively.
在一种实施例中,还包括:In one embodiment, it also includes:
样本集获取模块,用于获取正常图像数据集和病变图像数据集作为训练样本集;The sample set acquisition module is used to obtain the normal image data set and the lesion image data set as training sample sets;
预处理模块,用于对所述训练样本集中的图像进行缩放、旋转、翻转和改变亮度以扩展该训练样本集;a preprocessing module for scaling, rotating, flipping and changing the brightness of the images in the training sample set to expand the training sample set;
训练模块,用于采用扩展后的训练样本集训练两个初始YOLO网络模型中得到所述第一病变检测模型和第二病变检测模型。The training module is used for obtaining the first lesion detection model and the second lesion detection model by using the expanded training sample set to train two initial YOLO network models.
一种辅助检测装置,包括:An auxiliary detection device, comprising:
3D内窥镜,用于实时获取待检测区域的左视图像和右视图像;3D endoscope for real-time acquisition of left-view and right-view images of the area to be detected;
处理器,用于对所述左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框;将所述左视图像和右视图像进行特征融合后进行2D-3D转换得到待检测区域的3D视图;根据所述第一病变标注框和第二病变标注框,在所述3D视图中对病变的位置进行3D标注得到3D病变标注视图;a processor, configured to perform lesion detection on the left-view image and the right-view image to obtain a first lesion labeling frame and a second lesion labeling frame respectively; perform feature fusion on the left-view image and the right-view image to perform 2D-3D Convert to obtain a 3D view of the area to be detected; according to the first lesion annotation frame and the second lesion annotation frame, perform 3D annotation on the position of the lesion in the 3D view to obtain a 3D lesion annotation view;
显示器,用于实时显示所述3D病变标注视图。A display for displaying the 3D lesion annotation view in real time.
一种计算机可读存储介质,包括程序,所述程序能够被处理器执行以实现如上所述的方法。A computer-readable storage medium comprising a program executable by a processor to implement the method as described above.
依据上述实施例的3D视图辅助检测方法、系统及装置,其中方法包括:实时获取待检测区域的左视图像和右视图像;对左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框;将左视图像和右视图像进行特征融合后进行2D-3D转换得到待检测区域的3D视图,整个图像处理过程速度快,实时性好;根据第一病变标注框和第二病变标注框,在3D视图中对病变的位置进行3D标注得到3D病变标注视图,实时显示3D病变标注视图。医生佩戴专门的3D眼镜即可实时清楚的观察到检测区域的病变情况,并且采用3D视图实时显示使得观察效果更好。According to the 3D view auxiliary detection method, system and device according to the above-mentioned embodiments, the method includes: acquiring a left-view image and a right-view image of a region to be detected in real time; performing lesion detection on the left-view image and the right-view image to obtain a first lesion label, respectively frame and the second lesion labeling frame; the left-view image and the right-view image are fused and then 2D-3D converted to obtain a 3D view of the area to be detected. The whole image processing process is fast and has good real-time performance; according to the first lesion labeling frame and the second lesion labeling frame, perform 3D labeling on the position of the lesion in the 3D view to obtain the 3D lesion labeling view, and display the 3D lesion labeling view in real time. Doctors wearing special 3D glasses can clearly observe the lesions in the detection area in real time, and the real-time display of 3D views makes the observation effect better.
附图说明Description of drawings
图1为本申请实施例的辅助检测方法流程图;1 is a flowchart of an auxiliary detection method according to an embodiment of the present application;
图2为本申请实施例的病变检测模型训练方法流程图;2 is a flowchart of a method for training a lesion detection model according to an embodiment of the present application;
图3为本申请实施例的辅助检测方法框架图;3 is a framework diagram of an auxiliary detection method according to an embodiment of the present application;
图4为本申请实施例的病变检测模型结构示意图;4 is a schematic structural diagram of a lesion detection model according to an embodiment of the present application;
图5为本申请实施例的标注框位置示意图;FIG. 5 is a schematic diagram of the position of a labeling frame according to an embodiment of the present application;
图6为本申请实施例的双目视图构建3D视图原理图;FIG. 6 is a schematic diagram of constructing a 3D view for a binocular view according to an embodiment of the present application;
图7为本申请实施例的根据第一病变标注框和第二病变标注框构建3D标注框原理示意图;7 is a schematic diagram of the principle of constructing a 3D annotation frame according to a first lesion annotation frame and a second lesion annotation frame according to an embodiment of the present application;
图8为本申请实施例的辅助检测系统结构框图;8 is a structural block diagram of an auxiliary detection system according to an embodiment of the application;
图9为本申请实施例的辅助检测装置结构框图。FIG. 9 is a structural block diagram of an auxiliary detection apparatus according to an embodiment of the present application.
具体实施方式Detailed ways
下面通过具体实施方式结合附图对本发明作进一步详细说明。其中不同实施方式中类似元件采用了相关联的类似的元件标号。在以下的实施方式中,很多细节描述是为了使得本申请能被更好的理解。然而,本领域技术人员可以毫不费力的认识到,其中部分特征在不同情况下是可以省略的,或者可以由其他元件、材料、方法所替代。在某些情况下,本申请相关的一些操作并没有在说明书中显示或者描述,这是为了避免本申请的核心部分被过多的描述所淹没,而对于本领域技术人员而言,详细描述这些相关操作并不是必要的,他们根据说明书中的描述以及本领域的一般技术知识即可完整了解相关操作。The present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments have used associated similar element numbers. In the following embodiments, many details are described so that the present application can be better understood. However, those skilled in the art will readily recognize that some of the features may be omitted under different circumstances, or may be replaced by other elements, materials, and methods. In some cases, some operations related to the present application are not shown or described in the specification, in order to avoid the core part of the present application from being overwhelmed by excessive description, and for those skilled in the art, these are described in detail. The relevant operations are not necessary, and they can fully understand the relevant operations according to the descriptions in the specification and general technical knowledge in the field.
另外,说明书中所描述的特点、操作或者特征可以以任意适当的方式结合形成各种实施方式。同时,方法描述中的各步骤或者动作也可以按照本领域技术人员所能显而易见的方式进行顺序调换或调整。因此,说明书和附图中的各种顺序只是为了清楚描述某一个实施例,并不意味着是必须的顺序,除非另有说明其中某个顺序是必须遵循的。Additionally, the features, acts, or characteristics described in the specification may be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can also be exchanged or adjusted in order in a manner obvious to those skilled in the art. Therefore, the various sequences in the specification and drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a necessary order unless otherwise stated, a certain order must be followed.
本文中为部件所编序号本身,例如“第一”、“第二”等,仅用于区分所描述的对象,不具有任何顺序或技术含义。The serial numbers themselves, such as "first", "second", etc., for the components herein are only used to distinguish the described objects, and do not have any order or technical meaning.
本申请中通过3D内窥镜的两个平行的双目镜头分别待检测区域的左视图像和右视图像,通过分别对左视图像和右视图像进行病变检测得到第一病变标注框和第二病变标注框;第一病变标注框和第二病变标注框分别用于表示左视图像和右视图像中的病变区域,然后将第一病变标注框和第二病变标注框相关联得到最终的标注框,这样分别对左视图像和右视图像进行病变检测的方式,降低了计算量,提高了检测效率,使得检测结果的实时性更好。只要检测到左视图像和右视图像中有一个存在病变,则将左视图像和右视图像进行特征融合后进行2D-3D转换得到待检测区域的3D视图,同时将第一病变标注框和第二病变标注框相关联后得到在3D视图中对应的3D标注框,在3D视图中标注该3D标注框得到3D病变标注视图,3D标注框所在的位置即表示病变区域,然后将3D病变标注视图进行3D显示,医生或者专家佩戴专门的3D眼镜即可实时且清楚的观察到检测区域的立体图,这样显示的病变信息更加清晰,方便医生查看,对医生进行诊断或者手术都起到一定的辅助作用。In this application, the two parallel binocular lenses that use 3D endoscope to detect the left -view images and right -view images of the area to detect the area, and the lesions detection of the left -view image and right -view image are performed. Second lesion labeling frame; the first lesion labeling frame and the second lesion labeling frame are used to represent the lesion area in the left-view image and the right-view image respectively, and then the first lesion labeling frame and the second lesion labeling frame are associated to obtain the final Marking the frame, in this way, the left-view image and the right-view image are separately detected for lesions, which reduces the amount of calculation, improves the detection efficiency, and makes the real-time detection results better. As long as it is detected that there is a lesion in one of the left-view image and right-view image, the left-view image and the right-view image are fused, and then 2D-3D conversion is performed to obtain a 3D view of the area to be detected. After the second lesion annotation frame is associated, the corresponding 3D annotation frame in the 3D view is obtained, and the 3D annotation frame is marked in the 3D view to obtain the 3D lesion annotation view. The location of the 3D annotation frame represents the lesion area, and then the 3D lesion is marked. The view is displayed in 3D, and doctors or experts wearing special 3D glasses can observe the three-dimensional view of the detection area in real time and clearly, so that the displayed lesion information is more clear, which is convenient for doctors to view, and plays a certain role in the diagnosis or operation of doctors. effect.
另外,经过发明人验证,若直接在3D图像上检测病变区域,然后再对病变区域进行3D标注,计算量非常大,很难做到实时处理,而本发明提出的先在二维图像上进行病变检测得到病变区域后,再进行2D-3D转换得到待检测区域的3D视图,然后在3D视图上标注出病变区域,这样计算量将大大减少,病变检测速度更快,可以做到3D视图的实时显示,对医生的辅助诊断效果更好。In addition, after verification by the inventor, if the lesion area is directly detected on the 3D image, and then the lesion area is marked in 3D, the amount of calculation is very large, and it is difficult to perform real-time processing. After the lesion area is detected, 2D-3D conversion is performed to obtain a 3D view of the area to be detected, and then the lesion area is marked on the 3D view, so that the amount of calculation will be greatly reduced, the lesion detection speed will be faster, and the 3D view can be achieved. The real-time display is better for the auxiliary diagnosis of doctors.
进一步的,本申请中采用训练好神经网络模型来对左视图像和右视图像进行病变检测,以获取第一病变标注框和第二病变标注框,这样得到的病变位置更加精确,且鲁棒性更好、泛化能力强。Further, in the present application, a trained neural network model is used to detect lesions on the left-view image and the right-view image to obtain the first lesion labeling frame and the second lesion labeling frame, so that the lesion position obtained in this way is more accurate and robust. Better sex and strong generalization ability.
实施例一:Example 1:
请参考图1和图3,本实施例提供一种3D视图辅助检测方法,其包括:Please refer to FIG. 1 and FIG. 3 , this embodiment provides a 3D view auxiliary detection method, which includes:
步骤101:实时获取待检测区域的左视图像和右视图像;Step 101: acquiring the left-view image and the right-view image of the area to be detected in real time;
步骤102:对左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框;Step 102: Perform lesion detection on the left-view image and the right-view image to obtain a first lesion labeling frame and a second lesion labeling frame, respectively;
步骤103:将左视图像和右视图像进行特征融合后进行2D-3D转换得到待检测区域的3D视图;Step 103: Perform feature fusion of the left-view image and the right-view image and then perform 2D-3D conversion to obtain a 3D view of the area to be detected;
步骤104:根据第一病变标注框和第二病变标注框,在3D视图中对病变的位置进行3D标注得到3D病变标注视图;Step 104: according to the first lesion annotation frame and the second lesion annotation frame, perform 3D annotation on the position of the lesion in the 3D view to obtain a 3D lesion annotation view;
步骤105:实时显示3D病变标注视图。Step 105: Display the 3D lesion annotation view in real time.
其中,在步骤101中,本实施例采用双目的3D电子内窥镜来采集待检测区域的左视图像和右视图像。即通过3D电子内窥镜的平行光轴的双摄像晶片经过光电转换获取双数字图像,即3D电子内窥镜的左视图像、右视图像。Wherein, in
在另一种实施例中,在对左视图像和右视图像进行病变检测之前,还需要对左视图像和右视图像进行预处理,例如对其图像大小、分辨率等进行归一化处理。然后分别检测出左视图像和右视图像中病灶相关的特征信息,即得到病灶对应的区域,本实施例中对左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框,第一病变标注框表示左视图像中的病变区域,第二标注框表示右视图像中的病变区域。In another embodiment, before the lesion detection is performed on the left-view image and the right-view image, the left-view image and the right-view image need to be preprocessed, for example, the image size, resolution, etc. are normalized. . Then, the feature information related to the lesion in the left-view image and the right-view image is detected respectively, that is, the area corresponding to the lesion is obtained. In this embodiment, the lesion detection is performed on the left-view image and the right-view image to obtain the first lesion annotation frame and the second lesion respectively. The lesion labeling frame, the first lesion labeling frame represents the lesion area in the left-view image, and the second labeling frame represents the lesion area in the right-view image.
其中,本实施例中采用训练好的神经网络模型来进行病变检测。具体的,为了提高病变检测的速度,本实施例中将左视图像和右视图像分别输入到预先训练好的第一病变检测模型和第二病变检测模型中,分别得到第一病变标注框和第二病变标注框;该第一病变标注框和第二病变标注框分别表示左视图像和右视图像中的病变区域。Wherein, in this embodiment, a trained neural network model is used for lesion detection. Specifically, in order to improve the speed of lesion detection, in this embodiment, the left-view image and the right-view image are respectively input into the pre-trained first lesion detection model and the second lesion detection model, and the first lesion annotation frame and the second lesion detection model are obtained respectively. The second lesion annotation frame; the first lesion annotation frame and the second lesion annotation frame respectively represent the lesion area in the left-view image and the right-view image.
由于3D电子内窥镜的图像获取是通过平行光轴的双摄像晶片经过光电转换获取的双数字图像,左右图像应用场景一样、大小相同,因此构建基于YOLO算法的第一病变检测模型和第二病变检测模型时,构建同一检测模型,提高图像传输和检测速度,降低空间内占比。Since the image acquisition of the 3D electronic endoscope is a dual digital image obtained by photoelectric conversion through a dual camera wafer with parallel optical axes, the left and right images have the same application scene and the same size, so the first lesion detection model and the second lesion detection model based on the YOLO algorithm are constructed. When the lesion detection model is used, the same detection model is constructed to improve the speed of image transmission and detection, and reduce the proportion of space.
本实施例中构建适用于3D内窥镜的病变检测模型,采用的是基于YOLO检测算法的网络结构进行训练获得,YOLO检测算法直接在特征层上回归出类别和边框,使用回归的方法,使框架没有其他网络结构复杂,检测速度快,适合应用于视频流中。因此,3D内窥镜在诊断中检测病变图像时,使用基于YOLO算法的检测模型,能满足实时性检测的要求。In this embodiment, a lesion detection model suitable for 3D endoscope is constructed, which is obtained by training the network structure based on the YOLO detection algorithm. The YOLO detection algorithm directly regresses the categories and borders on the feature layer, and uses the regression method to make The framework is not as complex as other network structures, and the detection speed is fast, which is suitable for application in video streams. Therefore, when the 3D endoscope detects the lesion image in the diagnosis, the detection model based on the YOLO algorithm can be used to meet the requirements of real-time detection.
本实施例中构建基于YOLO算法的第一病变检测模型和第二病变检测模型在采用YOLO结构的基础上提取多尺度特征进行融合训练,具体网络结构如图4所示。此方法可以解决目标检测中网络浅层特征利用少、内镜图像中小病变目标检测准确度低的情况,使得病变检测模型在计算速度保证的情况下检测准确度提高。In this embodiment, the first lesion detection model and the second lesion detection model based on the YOLO algorithm are constructed, and multi-scale features are extracted for fusion training based on the YOLO structure. The specific network structure is shown in FIG. 4 . This method can solve the problem of less use of shallow network features in target detection and low detection accuracy of small lesion targets in endoscopic images, so that the detection accuracy of the lesion detection model can be improved while the calculation speed is guaranteed.
具体的,如图2,本实施例的第一病变检测模型和第二病变检测模型均通过以下方法训练所得:Specifically, as shown in FIG. 2 , the first lesion detection model and the second lesion detection model in this embodiment are both obtained by training the following methods:
步骤201:获取正常图像数据集和病变图像数据集作为训练样本集;训练样本集中的图像时采用单目内窥镜获取的,在经过医生或者专家分析后形成正常图像集和病变图像集。Step 201: Acquire a normal image data set and a diseased image data set as a training sample set; the images in the training sample set are obtained by a monocular endoscope, and are analyzed by a doctor or an expert to form a normal image set and a diseased image set.
步骤202:对训练样本集中的图像进行缩放、旋转、翻转和改变亮度以扩展该训练样本集;以使得各个病变类别的数据集图像相等,本实施例中的病变类型包括有病变和无病变;这样可以防止训练模型的过程中过拟合。在其他实施例中还可以采用其他预处理以及图像增强方法来扩充训练样本集。Step 202: scaling, rotating, flipping and changing the brightness of the images in the training sample set to expand the training sample set; to make the data set images of each lesion category equal, the lesion type in this embodiment includes lesions and no lesions; This prevents overfitting during training of the model. In other embodiments, other preprocessing and image enhancement methods may also be used to expand the training sample set.
步骤203:将扩展后的训练样本集输入到初始YOLO网络模型中对其进行多次训练得到第一病变检测模型和第二病变检测模型。本实施例中的第一病变检测模型和第二病变检测模型结构相同,其可以用于对输入的图像检测时是否存在病变以及将病变的区域采用标注框的形式标注出来。Step 203 : Input the expanded training sample set into the initial YOLO network model and train it for multiple times to obtain a first lesion detection model and a second lesion detection model. The first lesion detection model and the second lesion detection model in this embodiment have the same structure, and can be used to detect whether there is a lesion in the input image and to mark the area of the lesion in the form of a labeling frame.
例如基于初始YOLO网络模型训练第一病变检测模型时包括以下步骤:For example, training the first lesion detection model based on the initial YOLO network model includes the following steps:
1)将处理好的训练样本集内的用于训练的图像分割成S×S个网格;1) Divide the images used for training in the processed training sample set into S×S grids;
2)将训练图像输入YOLO网络结构提取特征,同时提取出三个不同尺度的特征,将高层抽象的特征和浅层特征融合应用于最终病变目标的检测;2) Input the training image into the YOLO network structure to extract features, and extract three different scale features at the same time, and fuse high-level abstract features and shallow features to detect the final lesion target;
3)同时在每个网格中训练并预测多标注框Bounding Box,在每个标注中预测不同尺寸及类型的目标;3) Simultaneously train and predict the multi-label Bounding Box in each grid, and predict targets of different sizes and types in each label;
4)在每个网格中同时预测网格所预测的标注框中包含检测病变目标,且预测该标注框中的类别的概率情况,因此本实施例中采用计算分类置信度(class-specificconfidence score)的值作为网格是否存在病变信息的判别值。分类置信度将每个网格预测的分类信息和标注框预测的置信度相乘,得到每个标注框的分类置信度,计算如下:4) Simultaneously predict in each grid that the label box predicted by the grid contains the detection target, and predicts the probability of the category in the label box. Therefore, in this embodiment, a class-specific confidence score (class-specific confidence score) is calculated. ) is used as the discriminant value of whether there is lesion information in the grid. Classification Confidence Multiplies the classification information predicted by each grid and the confidence of the label box prediction to obtain the classification confidence of each label box, which is calculated as follows:
其中,是预测出来的标注框与实际物体边界框的交并比值,Pr(Object)用于判断是否有目标病变信息在此网格中,Pr(Classi)是用于判断目标病变信息的分类情况。in, is the intersection ratio of the predicted label box and the actual object bounding box, Pr(Object) is used to determine whether there is target lesion information in this grid, and Pr(Class i ) is used to determine the classification of target lesion information.
5)然后设置每个标注框的分类置信度阈值,若小于阈值,则舍弃相应标注框,对满足阈值条件的标注框再采用非极大值抑制(NMS)处理,获得最终预测结果。5) Then set the classification confidence threshold of each annotation box. If it is less than the threshold, the corresponding annotation box is discarded, and the non-maximum value suppression (NMS) processing is applied to the annotation box that meets the threshold condition to obtain the final prediction result.
采用NMS算法来实现这样的效果:首先从所有的标注框中找到置信度最大的那个框,然后挨个计算其与剩余标注框的IOU,如果其值大于设定的一个阈值(重合度过高),那么就将该标注框剔除;然后对剩余的标注框重复上述过程,直到处理完所有的标注框。The NMS algorithm is used to achieve this effect: first, find the box with the highest confidence from all the annotation boxes, and then calculate the IOU of it and the remaining annotation boxes one by one, if its value is greater than a set threshold (the coincidence is too high) , then remove the frame; then repeat the above process for the remaining frames until all frames are processed.
6)最终预测可以获得目标病变的标注框中分类概率、标注框的位置信息、标注框的置信度。而对于标注框的位置大小、种类、置信度等信息的预测都通过损失函数来训练。6) The final prediction can obtain the classification probability of the target lesion's labeling box, the location information of the labeling box, and the confidence of the labeling box. The prediction of the position size, type, confidence and other information of the annotation frame is trained by the loss function.
而损失函数是由四部分组成,分别是对预测标注框的中心坐标做损失计算,通过预测与训练中的实际中心位置进行相对计算;The loss function is composed of four parts, which are to calculate the loss of the center coordinates of the predicted annotation frame, and to calculate relative to the actual center position in the prediction and training;
其中,上式的中心位置损失计算中,λC为给定的常数,(xi,yi)为预测中心位置,为训练中的中心位置。Among them, in the calculation of the center position loss of the above formula, λ C is a given constant, (x i , y i ) is the predicted center position, is the center position during training.
对预测标注框的宽度和高度相关的损失计算,计算其高度和宽度的平方根;Calculate the loss related to the width and height of the predicted annotation box, and calculate the square root of its height and width;
其中,标注框宽度w和高度h损失计算中,如果网格单元i中有病变信息则为1,预测有效;否则为为0,预测无效。Among them, in the calculation of the loss of the width w and height h of the label box, if there is lesion information in the grid cell i, then is 1, the prediction is valid; otherwise, 0, the prediction is invalid.
对标注框的置信度计算损失,对标注框与实际病变目标的交叉部分置信度情况进行预测惩罚;Calculate the loss of the confidence of the label box, and predict and punish the confidence level of the intersection between the label box and the actual lesion target;
上式标注框置信度损失计算中,ci表示第i个预测框的置信度值,为第i个预测标注框与实际目标交叉处的置信度。为得到的最低置信度预测惩罚。In the calculation of the confidence loss of the label box in the above formula, c i represents the confidence value of the ith prediction box, is the confidence of the intersection of the i-th predicted annotation box and the actual target. Prediction penalty for the lowest confidence obtained.
对分类求损失,通过计算标注框中分类与实际分类求和平方误差。Calculate the loss for the classification, and calculate the squared error of the classification in the labeled box and the actual classification.
上式中分类求损失中,pi为第i个预测框的分类百分比结果。In the classification calculation loss in the above formula, pi is the classification percentage result of the i -th prediction box.
其中,在步骤103中,若检测到左视图像和右视图像中只要有一个存在病变,则确定当前待检测区域存在病变,然后将左视图像和右视图像进行特征融合后进行2D到3D转换得到待检测区域的3D视图。具体的,在进行2D到3D转换时需要获取图像的深度信息。本实施例中,根据平行于光轴的左视图像和右视图像可以获取深度信息,然后根据视差、相机参数和深度信息通过空间计算获取3D视图。Wherein, in
其中,在步骤104中,对第一病变标注框和第二病变标注框进行关联度计算,若关联度达到预设区间,则将第一病变标注框和第二病变标注框关联得到3D标注框,例如关联度达到0.7-1之间,则将第一病变标注框和第二病变标注框关联得到3D标注框;在3D视图中标注3D标注框得到3D病变标注视图,该3D标注框所在的区域为病变区域。若关联度未达到预设区间,则表示第一病变标注框和第二病变标注框中标注的可能不是同一个病变目标。需要说明的是,在实际的病变特征检测时,在左视图像和右视图像中均分别可能出现多个病变标注框,每个标注框标注不同的病变目标,例如一个标注框标注息肉,另一个标注框标注糜烂,本申请中的第一病变标注框和第二病变标注框指的是对两个图中的对同一病变目标的标注,通过关联度计算则可以确定第一病变标注框和第二病变标注框是否标注的是同一个病变区域的病变目标,如果关联度未达到预设区间,则模型继续进行关联度匹配计算,直到关联度达到预设区间,若在预设次数(例如20次)内,模型计算的关联度始终不能达到预设区间,则不对两个标注框进行关联操作,同时不输出3D标注框。若某个标注框只出现在左视图像或者右视图像中一个时,则同样无法满足上述的关联度达到预设的区间的要求,此时同样不输出3D标注框。Wherein, in
例如,可以根据左视图像和右视图像中的第一病变标注框和第二病变标注框的坐标位置获取其水平视差、深度信息,从而通过空间坐标转换计算得到3D标注框,3D标注框在3D视图中标注的3D立体区域则为病变区域。For example, the horizontal disparity and depth information can be obtained according to the coordinate positions of the first lesion annotation frame and the second lesion annotation frame in the left-view image and the right-view image, so as to obtain the 3D annotation frame through spatial coordinate transformation calculation. The 3D annotation frame is in The 3D solid area marked in the 3D view is the lesion area.
其中,本实施例中第一病变标注框和第二病变标注框的坐标通过以下方法获取,具体包括:提取左视图像和右视图像的中的第一病变标注框和第二病变标注框的深度信息是通过YOLO网络中对第一病变标注框和第二病变标注框的参数预测获取的,而每一个病变标注框的预测参数(即标注框的坐标)包括:Wherein, the coordinates of the first lesion labeling frame and the second lesion labeling frame in this embodiment are obtained by the following method, which specifically includes: extracting the coordinates of the first lesion labeling frame and the second lesion labeling frame in the left-view image and the right-view image. The depth information is obtained through the parameter prediction of the first lesion annotation frame and the second lesion annotation frame in the YOLO network, and the prediction parameters of each lesion annotation frame (ie, the coordinates of the annotation frame) include:
1)标注框目标中心位置相对于网格位置的局部坐标偏移值x、y;1) The local coordinate offset values x, y of the target center position of the callout box relative to the grid position;
2)标注框相对于整幅图像的宽、高比w、h;2) The width and height ratios w and h of the annotation frame relative to the entire image;
3)置信度c(每一个网格是否包含病变检测目标的条件下,其检测框的准确性信息情况);3) Confidence degree c (under the condition of whether each grid contains the target of lesion detection, the accuracy information of its detection frame);
因此可以通过检测框中心位置偏移值和相对宽、高比值计算出病变标注框相对于整幅图像的坐标位置情况。通过角点坐标进行深度信息的计算,进而实现相应坐标的三维投影,获得内镜三维显示中的标注框信息。标注框坐标情况如下图5所示。Therefore, the coordinate position of the lesion annotation frame relative to the entire image can be calculated by the offset value of the center position of the detection frame and the relative width and height ratio. The depth information is calculated by the coordinates of the corner points, and then the three-dimensional projection of the corresponding coordinates is realized, so as to obtain the frame information in the three-dimensional display of the endoscope. The coordinates of the callout box are shown in Figure 5 below.
因此,标注框目标中心位置相对于网格位置的局部坐标偏移值x、y和标注框相对于整幅图像的宽、高比w、h值,在标注框相对于整幅图像有以下关系:Therefore, the local coordinate offset values x, y of the target center position of the annotation frame relative to the grid position and the width and height ratios w and h of the annotation frame relative to the entire image have the following relationship between the annotation frame and the entire image :
上式中,(ax,ay)为标注框中心位置在整幅检测图像中心坐标位置,(m,n)为标注框左上角坐标位置,Cx、Cy为网格大小,a、b为标注框大小,u、v为整幅图像大小。In the above formula, (a x , a y ) is the coordinate position of the center of the annotation frame in the entire detection image, (m, n) is the coordinate position of the upper left corner of the annotation frame, C x , C y are the grid sizes, a, b is the size of the annotation frame, and u and v are the size of the entire image.
因此可以通过上式获得第一病变标注框的中心点和第二病变标注框的中心点在整幅图像中的位置坐标以及第一病变标注框的中心点和第二病变标注框大小,从而得到标注框角点位置坐标,即可获取第一病变标注框的中心点和第二病变标注框的坐标。Therefore, the position coordinates of the center point of the first lesion annotation frame and the center point of the second lesion annotation frame in the whole image, as well as the center point of the first lesion annotation frame and the size of the second lesion annotation frame can be obtained by the above formula, so as to obtain The position coordinates of the corner points of the labeling box can be obtained to obtain the center point of the first lesion labeling box and the coordinates of the second lesion labeling box.
其中,第一病变标注框的深度信息和第二病变标注框的深度信息主要通过以下方法获取,具体包括:本实施例中3D内窥镜的两个摄像镜片平行标准放置,两个晶片的光轴平行,如图6所示,左右摄像晶片光心点为OL、OR,立体视觉空间场景中的物点P在两个摄像晶片的成像平面上的投影点分别为(xI,f)和(xr,f),f为摄像晶片焦距,两晶片光心距离为b。因此根据上述及图6可以得知视差d和深度z之间的关系,因此根据左视图像和右视图像中两个投影点的信息可以构建三维图像信息,进而根据此原理构建出的3D标注框。The depth information of the first lesion labeling frame and the depth information of the second lesion labeling frame are mainly obtained by the following methods, which specifically include: The axes are parallel, as shown in Figure 6, the optical center points of the left and right imaging wafers are OL and OR, and the projection points of the object point P in the stereoscopic space scene on the imaging planes of the two imaging wafers are (x I , f) and (x r , f), f is the focal length of the imaging wafer, and the distance between the optical centers of the two wafers is b. Therefore, according to the above and Figure 6, the relationship between the parallax d and the depth z can be known. Therefore, the 3D image information can be constructed according to the information of the two projection points in the left-view image and the right-view image, and then the 3D annotation constructed according to this principle can be used. frame.
通过上述计算得到的第一病变标注框和第二病变标注框的中心点位置及各角点位置坐标,根据左视图像和右视图像在计算视差及深度图进行三维显示的同时,计算左视图像和右视图像中各个对应角点、对应中心点的视差,然后根据摄像晶片参数焦距、双目晶片基线距离和对应标注框的视差计算深度值,从而获得深度图,深度图则能体现标注框中每个像素点距离摄像晶片的位置情况。因此可以通过空间计算进行三维图像的显示,同时3D标注框在3D内窥镜的3D视图中标注出病变信息。According to the position of the center point and the position coordinates of each corner point of the first lesion annotation frame and the second lesion annotation frame obtained by the above calculation, while calculating the parallax and depth map for three-dimensional display according to the left-view image and right-view image, calculate the left-view image. The parallax of each corresponding corner point and the corresponding center point in the image and the right-view image, and then calculate the depth value according to the camera wafer parameter focal length, the binocular wafer baseline distance and the parallax of the corresponding annotation frame, so as to obtain the depth map, which can reflect the annotation. The position of each pixel in the box from the camera wafer. Therefore, the three-dimensional image can be displayed through spatial calculation, and the lesion information can be marked in the 3D view of the 3D endoscope by the 3D annotation frame.
最终通过偏光镜即可看到双目图像,偏光式眼镜利用光线有“振动方向”的原理来分解采集到的原始图像,通过把图像分为垂直向偏振光和水平向偏振光两组画面,偏光眼镜式需在LCD面板上增加相位延迟薄膜,产生正交的偏正方向,利用偏光眼镜的解偏,左右眼睛接收到不同偏振方向的图像,合成后即形成人眼可以观察到的立体图像。Finally, the binocular image can be seen through the polarizer. The polarized glasses use the principle that light has a "vibration direction" to decompose the original image collected. By dividing the image into two groups of vertically polarized light and horizontally polarized light, The polarized glasses type needs to add a phase retardation film on the LCD panel to generate orthogonal polarization directions. Using the depolarization of the polarized glasses, the left and right eyes receive images with different polarization directions, and after synthesis, a three-dimensional image that can be observed by the human eye is formed. .
例如,3D标注框的标注和显示通过以下方法实现,对于左视图像和右视图像的二维检测框可直接映射为3D框,利用左视图像和右视图像的二维检测框回归的尺寸来进行重投影。For example, the annotation and display of the 3D annotation frame can be realized by the following methods. The two-dimensional detection frame of the left-view image and the right-view image can be directly mapped to a 3D frame, and the size of the two-dimensional detection frame of the left-view image and the right-view image can be regressed. to reproject.
例如,设3D检测框的尺寸信息为f={x,y,z,θ},在3D框投影的过程中用6个特征值来关联二维标注框与3D标注框之间的关系,即Ul1,Vt,Up,Vb,Ul2,Ur,它们分别代表左视图像的二维标注框的左、上、右、下边框和右视图像的二维检测框的左、右边框。For example, let the size information of the 3D detection frame be f={x, y, z, θ}, and use 6 eigenvalues to correlate the relationship between the 2D annotation frame and the 3D annotation frame in the process of 3D frame projection, that is, U l1 , V t , U p , V b , U l2 , U r , which represent the left, top, right, and bottom borders of the two-dimensional labeling frame of the left-view image and the left, top, and bottom borders of the two-dimensional detection frame of the right-view image, respectively. right border.
其他特征关联值(例如深度信息)的计算同上述相同,因此不一一列举,其中θ为标注框与摄像晶片之间的夹角。这些多元方程是通过高斯-牛顿法求解的。通过图7所示进行二维标注框的位置尺寸信息映射三维立体的3D标注框。The calculation of other feature correlation values (such as depth information) is the same as the above, so it is not listed one by one, where θ is the included angle between the labeling frame and the imaging wafer. These multivariate equations are solved by the Gauss-Newton method. The three-dimensional 3D annotation frame is mapped through the position and size information of the two-dimensional annotation frame as shown in FIG. 7 .
其中,本实施例中的左视图像和右视图像中的第一病变标注框和第二病变标注框在向三维投影形成3D标注框之前,先对第一病变标注框和第二病变标注框进行关联度计算,目的在于判断第一病变标注框和第二病变标注框是否为同一目标的标注框,因此需要对第一病变标注框和第二病变标注框进行关联度计算,若关联度小于预设值则认为两个标注框为同一目标的标注框。其中,关联度可以为两个图像的特征匹配度,关联度还可以为第一病变标注框和第二病变标注框的坐标重合度(也可以理解为坐标匹配度)。例如,假设左右视图图像分别进行检测后输出的检测框信息为x1i、x2i,第一病变标注框和第二病变标注框输出类别为y1、y2,此处的类别包括是病变区域和非病变区域。因此在x1和x2之间的平方距离为:Wherein, before the first lesion labeling frame and the second lesion labeling frame in the left-view image and the right-view image in this embodiment are projected to the three-dimensional to form the 3D labeling frame, the first lesion labeling frame and the second lesion labeling frame are firstly labelled. The purpose of calculating the degree of association is to determine whether the first lesion annotation frame and the second lesion annotation frame are annotation frames of the same target. Therefore, it is necessary to calculate the degree of association between the first lesion annotation frame and the second lesion annotation frame. If the degree of association is less than The default value is that the two callout boxes are the callout boxes of the same target. The degree of association may be the degree of feature matching of the two images, and the degree of association may also be the degree of coordinate coincidence of the first lesion labeling frame and the second lesion labeling frame (which may also be understood as the degree of coordinate matching). For example, assuming that the left and right view images are detected respectively, the output detection frame information is x 1i , x 2i , and the output categories of the first lesion annotation frame and the second lesion annotation frame are y 1 , y 2 , and the categories here include the lesion area. and non-diseased areas. So the squared distance between x1 and x2 is :
dW=(x1-x2)TW(x1-x2)d W =(x 1 -x 2 )T W (x 1 -x 2 )
上式中,W为马氏距离中的参数矩阵W。通过度量关联学习能获得第一病变标注框和第二病变标注框的结构相似性,因此度量函数为:In the above formula, W is the parameter matrix W in the Mahalanobis distance. The structural similarity between the first lesion annotation frame and the second lesion annotation frame can be obtained through metric association learning, so the metric function is:
上式中,p为对应两幅图像检测框,p=2;si,j∈[0,1],若y1=y2则si,j=1,否则si,j=0。本实施例中合理的设置度量函数阈值以对进行第一病变标注框和第二病变标注的关联度判断,然后才对两个标注框进行三维映射。In the above formula, p is the detection frame corresponding to two images, p=2; s i, j ∈ [0, 1], if y 1 =y 2 then s i, j =1, otherwise s i, j =0. In this embodiment, a metric function threshold is reasonably set to determine the degree of association between the first lesion labeling frame and the second lesion labeling, and then three-dimensional mapping is performed on the two labeling frames.
通过本实施例的辅助检测方法可以基于图像采集模块(例如双目3D内窥镜)采集的左视图像和右视图像,经过两个训练好的检测模型实时且快速的检测出是否发生病变,并且进一步实时的将病变图像转换成3D图像,并且在3D图像中对病变区域进行3D标注后实时显示,方便医生佩戴3D眼镜观察检测区域,对医生的诊断起到一定的辅助作用。Through the auxiliary detection method in this embodiment, based on the left-view image and right-view image collected by an image acquisition module (such as a binocular 3D endoscope), two trained detection models can detect whether a lesion occurs in real time and quickly, In addition, the lesion image is further converted into a 3D image in real time, and the lesion area is marked in 3D in the 3D image and displayed in real time, which is convenient for doctors to wear 3D glasses to observe the detection area, and plays a certain auxiliary role in the doctor's diagnosis.
实施例二:Embodiment 2:
本实施例提供一种3D视图辅助检测系统,如图8,其包括:图像获取模块301、病变检测模块302、视图转换模块303、3D标注单元304、实时显示模块305。其中,图像获取模块301用于实时获取待检测区域的左视图像和右视图像;病变检测模块302用于对左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框;视图转换模块303用于将左视图像和右视图像进行特征融合后进行2D-3D转换得到待检测区域的3D视图;3D标注单元304用于根据第一病变标注框和第二病变标注框,在3D视图中对病变的位置进行3D标注得到3D病变标注视图;实时显示模块305用于实时显示所述3D病变标注视图。其中,具体的将二维图像转换成3D视图的方法与实施例一中相同,此处不再赘述。This embodiment provides a 3D view auxiliary detection system, as shown in FIG. 8 , which includes: an
其中,本实施例的图像获取模块301采用双目3D内窥镜,两个平行的镜片可以同时获取左视图像和右视图像。实时显示模块305为显示屏,用于对3D病变标注视图进行实时显示,显示效果如3D电影,医生佩戴适配的3D眼镜即可清楚的观察到待检测区域的病变信息。Among them, the
其中,3D标注单元304包括关联模块3041和标注模块3042:关联模块3041用于对第一病变标注框和第二病变标注框进行关联度计算,若关联度达到预设区间,则将第一病变标注框和第二病变标注框关联得到3D标注框;标注模块3042用于在3D视图中标注3D标注框得到3D病变标注视图,该3D标注框所在的区域为病变区域。其中,具体的关联度计算方法以及3D标注方法也与实施例一中相同,此处不再赘述。The
其中,病变检测模块302中设有预先训练好的第一病变检测模型和第二病变检测模型;将左视图像和右视图像分别输入到预先训练好的第一病变检测模型和第二病变检测模型中,分别得到第一病变标注框和第二病变标注框;该第一病变标注框和第二病变标注框分别表示左视图像和右视图像中的病变区域。The
进一步的,本实施例的辅助检测系统还包括:样本集获取模块306、预处理模块307、训练模块308;样本集获取模块306用于获取正常图像数据集和病变图像数据集作为训练样本集;预处理模块307用于对训练样本集中的图像进行缩放、旋转、翻转和改变亮度以扩展该训练样本集;训练模块308用于采用扩展后的训练样本集训练两个初始YOLO网络模型中得到所述第一病变检测模型和第二病变检测模型。Further, the auxiliary detection system of this embodiment further includes: a sample set
通过本实施例的辅助检测系统可以基于双目3D内窥镜采集的左视图像和右视图像,经过两个训练好的检测模型实时且快速的检测出是否发生病变,并且进一步实时的将病变图像转换成3D图像,并且在3D图像中对病变区域进行3D标注,并且将标注后的3D病变标注视图通过显示屏实时显示,方便医生佩戴3D眼镜观察检测区域,对医生的诊断起到一定的辅助作用。Through the auxiliary detection system of this embodiment, based on the left-view image and right-view image collected by the binocular 3D endoscope, two trained detection models can detect whether a lesion occurs in real time and quickly, and further detect the lesion in real time. The image is converted into a 3D image, and the lesion area is marked in 3D in the 3D image, and the marked 3D lesion annotation view is displayed on the display screen in real time, which is convenient for doctors to wear 3D glasses to observe the detection area, which plays a certain role in the doctor's diagnosis. Supporting role.
实施例三:Embodiment three:
本实施例提供一种3D视图辅助检测装置,如图9,其包括:3D内窥镜401、处理器402和显示器403,其中,3D内窥镜401用于实时获取待检测区域的左视图像和右视图像;处理器402用于对左视图像和右视图像进行病变检测分别得到第一病变标注框和第二病变标注框;将左视图像和右视图像进行特征融合后进行2D-3D转换得到待检测区域的3D视图;根据第一病变标注框和第二病变标注框在所述3D视图中对病变的位置进行3D标注得到3D病变标注视图;显示器403用于实时显示所述3D病变标注视图。This embodiment provides a 3D view auxiliary detection device, as shown in FIG. 9 , which includes: a
通过本实施例的辅助检测装置可以基于双目3D内窥镜采集的左视图像和右视图像,经过两个训练好的检测模型实时且快速的检测出是否发生病变,并且进一步实时的将病变图像转换成3D图像,并且在3D图像中对病变区域进行3D标注,并且将标注后的3D病变标注视图通过显示屏实时显示,方便医生佩戴3D眼镜观察检测区域,对医生的诊断起到一定的辅助作用。Through the auxiliary detection device of this embodiment, based on the left-view image and right-view image collected by the binocular 3D endoscope, two trained detection models can detect whether a lesion occurs in real time and quickly, and further detect the lesion in real time. The image is converted into a 3D image, and the lesion area is marked in 3D in the 3D image, and the marked 3D lesion annotation view is displayed on the display screen in real time, which is convenient for doctors to wear 3D glasses to observe the detection area, which plays a certain role in the doctor's diagnosis. Supporting role.
实施例四:Embodiment 4:
本实施例提供一种计算机可读存储介质,其包括程序,该程序能够被处理器执行以实现如实施例一提供的辅助检测方法。This embodiment provides a computer-readable storage medium, which includes a program, and the program can be executed by a processor to implement the auxiliary detection method provided in the first embodiment.
以上应用了具体个例对本发明进行阐述,只是用于帮助理解本发明,并不用以限制本发明。对于本发明所属技术领域的技术人员,依据本发明的思想,还可以做出若干简单推演、变形或替换。The above specific examples are used to illustrate the present invention, which are only used to help understand the present invention, and are not intended to limit the present invention. For those skilled in the art to which the present invention pertains, according to the idea of the present invention, several simple deductions, modifications or substitutions can also be made.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011620378.3A CN112686865B (en) | 2020-12-31 | 2020-12-31 | 3D view auxiliary detection method, system, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011620378.3A CN112686865B (en) | 2020-12-31 | 2020-12-31 | 3D view auxiliary detection method, system, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112686865A true CN112686865A (en) | 2021-04-20 |
CN112686865B CN112686865B (en) | 2023-06-02 |
Family
ID=75453831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011620378.3A Active CN112686865B (en) | 2020-12-31 | 2020-12-31 | 3D view auxiliary detection method, system, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112686865B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113206957A (en) * | 2021-04-30 | 2021-08-03 | 重庆西山科技股份有限公司 | Image processing method and system for endoscope and storage medium |
CN113491497A (en) * | 2021-07-27 | 2021-10-12 | 重庆西山科技股份有限公司 | Polarized light endoscope device |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011080907A1 (en) * | 2009-12-28 | 2011-07-07 | パナソニック株式会社 | Display apparatus and method, recording medium, transmission apparatus and method, and playback apparatus and method |
CN106485207A (en) * | 2016-09-21 | 2017-03-08 | 清华大学 | A kind of Fingertip Detection based on binocular vision image and system |
CN106909778A (en) * | 2017-02-09 | 2017-06-30 | 北京市计算中心 | A kind of Multimodal medical image recognition methods and device based on deep learning |
CN108093243A (en) * | 2017-12-31 | 2018-05-29 | 深圳超多维科技有限公司 | A kind of three-dimensional imaging processing method, device and stereoscopic display device |
CN108475330A (en) * | 2015-11-09 | 2018-08-31 | 港大科桥有限公司 | Auxiliary data for artifact aware view synthesis |
CN109190540A (en) * | 2018-06-06 | 2019-01-11 | 腾讯科技(深圳)有限公司 | Biopsy regions prediction technique, image-recognizing method, device and storage medium |
CN109522866A (en) * | 2018-11-29 | 2019-03-26 | 宁波视睿迪光电有限公司 | Naked eye 3D rendering processing method, device and equipment |
CN109886243A (en) * | 2019-03-01 | 2019-06-14 | 腾讯科技(深圳)有限公司 | Image processing method, device, storage medium, equipment and system |
CN109993733A (en) * | 2019-03-27 | 2019-07-09 | 上海宽带技术及应用工程研究中心 | Detection method, system, storage medium, terminal and the display system of pulmonary lesions |
CN110010249A (en) * | 2019-03-29 | 2019-07-12 | 北京航空航天大学 | Augmented reality surgical navigation method, system and electronic device based on video overlay |
CN110648322A (en) * | 2019-09-25 | 2020-01-03 | 杭州智团信息技术有限公司 | Method and system for detecting abnormal cervical cells |
CN111091559A (en) * | 2019-12-17 | 2020-05-01 | 山东大学齐鲁医院 | Auxiliary diagnosis system for lymphoma under enteroscopy based on deep learning |
CN210803862U (en) * | 2019-11-29 | 2020-06-19 | 重庆西山科技股份有限公司 | Endoscope optical system and eyepiece optical unit |
US20200226422A1 (en) * | 2019-01-13 | 2020-07-16 | Lightlab Imaging, Inc. | Systems and methods for classification of arterial image regions and features thereof |
CN111563415A (en) * | 2020-04-08 | 2020-08-21 | 华南理工大学 | Binocular vision-based three-dimensional target detection system and method |
CN111626217A (en) * | 2020-05-28 | 2020-09-04 | 宁波博登智能科技有限责任公司 | Target detection and tracking method based on two-dimensional picture and three-dimensional point cloud fusion |
CN111861916A (en) * | 2020-07-09 | 2020-10-30 | 中南大学湘雅二医院 | How to process pathological pictures |
-
2020
- 2020-12-31 CN CN202011620378.3A patent/CN112686865B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011080907A1 (en) * | 2009-12-28 | 2011-07-07 | パナソニック株式会社 | Display apparatus and method, recording medium, transmission apparatus and method, and playback apparatus and method |
CN108475330A (en) * | 2015-11-09 | 2018-08-31 | 港大科桥有限公司 | Auxiliary data for artifact aware view synthesis |
CN106485207A (en) * | 2016-09-21 | 2017-03-08 | 清华大学 | A kind of Fingertip Detection based on binocular vision image and system |
CN106909778A (en) * | 2017-02-09 | 2017-06-30 | 北京市计算中心 | A kind of Multimodal medical image recognition methods and device based on deep learning |
CN108093243A (en) * | 2017-12-31 | 2018-05-29 | 深圳超多维科技有限公司 | A kind of three-dimensional imaging processing method, device and stereoscopic display device |
CN109190540A (en) * | 2018-06-06 | 2019-01-11 | 腾讯科技(深圳)有限公司 | Biopsy regions prediction technique, image-recognizing method, device and storage medium |
CN109522866A (en) * | 2018-11-29 | 2019-03-26 | 宁波视睿迪光电有限公司 | Naked eye 3D rendering processing method, device and equipment |
US20200226422A1 (en) * | 2019-01-13 | 2020-07-16 | Lightlab Imaging, Inc. | Systems and methods for classification of arterial image regions and features thereof |
CN109886243A (en) * | 2019-03-01 | 2019-06-14 | 腾讯科技(深圳)有限公司 | Image processing method, device, storage medium, equipment and system |
CN109993733A (en) * | 2019-03-27 | 2019-07-09 | 上海宽带技术及应用工程研究中心 | Detection method, system, storage medium, terminal and the display system of pulmonary lesions |
CN110010249A (en) * | 2019-03-29 | 2019-07-12 | 北京航空航天大学 | Augmented reality surgical navigation method, system and electronic device based on video overlay |
CN110648322A (en) * | 2019-09-25 | 2020-01-03 | 杭州智团信息技术有限公司 | Method and system for detecting abnormal cervical cells |
CN210803862U (en) * | 2019-11-29 | 2020-06-19 | 重庆西山科技股份有限公司 | Endoscope optical system and eyepiece optical unit |
CN111091559A (en) * | 2019-12-17 | 2020-05-01 | 山东大学齐鲁医院 | Auxiliary diagnosis system for lymphoma under enteroscopy based on deep learning |
CN111563415A (en) * | 2020-04-08 | 2020-08-21 | 华南理工大学 | Binocular vision-based three-dimensional target detection system and method |
CN111626217A (en) * | 2020-05-28 | 2020-09-04 | 宁波博登智能科技有限责任公司 | Target detection and tracking method based on two-dimensional picture and three-dimensional point cloud fusion |
CN111861916A (en) * | 2020-07-09 | 2020-10-30 | 中南大学湘雅二医院 | How to process pathological pictures |
Non-Patent Citations (4)
Title |
---|
AIFT: "目标检测:R-CNN系列,YOLO系列,SSD总结", 《HTTPS://BLOG.CSDN.NET/FT_SUNSHINE/ARTICLE/DETAILS/98342015》 * |
PEILIANG LI等: "Stereo R-CNN Based 3D Object Detection for Autonomous Driving", 《PROCEEDINGS OF THE IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR)》 * |
XIAOBIN LIN等: "Research on 3D Reconstruction in Binocular Stereo Vision Based on Feature Point Matching Method", 《2020 IEEE 3RD INTERNATIONAL CONFERENCE ON INFORMATION SYSTEMS AND COMPUTER AIDED EDUCATION (ICISCAE)》 * |
王帝: "微型双目内窥镜与双目匹配技术研究", 中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113206957A (en) * | 2021-04-30 | 2021-08-03 | 重庆西山科技股份有限公司 | Image processing method and system for endoscope and storage medium |
CN113491497A (en) * | 2021-07-27 | 2021-10-12 | 重庆西山科技股份有限公司 | Polarized light endoscope device |
CN113491497B (en) * | 2021-07-27 | 2022-08-12 | 重庆西山科技股份有限公司 | Polarized light endoscope device |
Also Published As
Publication number | Publication date |
---|---|
CN112686865B (en) | 2023-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110782524B (en) | Indoor three-dimensional reconstruction method based on panoramic image | |
CN115272271B (en) | A pipeline defect detection and positioning ranging system based on binocular stereo vision | |
TW202008163A (en) | Method, device and electronic apparatus for medical image processing and storage mdeium thereof | |
US11127148B1 (en) | Parallax correction for partially overlapping stereo depth images | |
CN101877143B (en) | Three-dimensional scene reconstruction method of two-dimensional image group | |
CN113989758B (en) | Anchor guide 3D target detection method and device for automatic driving | |
CN115035004B (en) | Image processing method, apparatus, device, readable storage medium and program product | |
CN107452031B (en) | Virtual ray tracking method and light field dynamic refocusing display system | |
CN106204431B (en) | The display methods and device of intelligent glasses | |
CN110288653B (en) | A multi-angle ultrasound image fusion method, system and electronic device | |
WO2022126674A1 (en) | Method and system for evaluating quality of stereoscopic panoramic image | |
CN112686865B (en) | 3D view auxiliary detection method, system, device and storage medium | |
CN108805056A (en) | A kind of monitoring camera-shooting face sample extending method based on 3D faceforms | |
CN115797439A (en) | Flame space positioning system and method based on binocular vision | |
CN114863061A (en) | Three-dimensional reconstruction method and system for remote monitoring medical image processing | |
CN104751438B (en) | For the method and apparatus alternatively to medical threedimensional images registration | |
KR100560464B1 (en) | How to configure a multiview image display system adaptive to the observer's point of view | |
CN112651400A (en) | Stereoscopic endoscope auxiliary detection method, system, device and storage medium | |
CN111738061A (en) | Binocular Vision Stereo Matching Method and Storage Medium Based on Region Feature Extraction | |
CN117671133A (en) | A 3D reconstruction method of hands based on monocular RGB image de-occlusion | |
CN117422858A (en) | Dual-light image target detection method, system, equipment and medium | |
CN113077547B (en) | Method, device and storage medium for generating line-of-sight regression infrared imaging sample data | |
CN115187550A (en) | Object registration method, apparatus, device, storage medium and program product | |
Seitner et al. | Trifocal system for high-quality inter-camera mapping and virtual view synthesis | |
CN112698724B (en) | An implementation method of a transmissive screen system based on camera eye tracking |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: No. 2 Kangzhu Road, Kangmei Street, Liangjiang New District, Yubei District, Chongqing 401123 Patentee after: CHONGQING XISHAN SCIENCE & TECHNOLOGY Co.,Ltd. Country or region after: China Address before: 400000 Jupiter science and technology development center, Gaoxin Park, new North District, Chongqing (No.9, middle section of Huangshan Avenue) Patentee before: CHONGQING XISHAN SCIENCE & TECHNOLOGY Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |