TWI777092B - Image processing method, electronic device, and storage medium - Google Patents

Image processing method, electronic device, and storage medium Download PDF

Info

Publication number
TWI777092B
TWI777092B TW108133167A TW108133167A TWI777092B TW I777092 B TWI777092 B TW I777092B TW 108133167 A TW108133167 A TW 108133167A TW 108133167 A TW108133167 A TW 108133167A TW I777092 B TWI777092 B TW I777092B
Authority
TW
Taiwan
Prior art keywords
instance
center
image
pixel point
pixel
Prior art date
Application number
TW108133167A
Other languages
Chinese (zh)
Other versions
TW202014984A (en
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 TW202014984A publication Critical patent/TW202014984A/en
Application granted granted Critical
Publication of TWI777092B publication Critical patent/TWI777092B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Abstract

The embodiment of that present application disclose an image processing method, an electronic device and a storage medium, the methods include: subject that first image to processing, obtaining a prediction result of a plurality of pixel points in the first image, the prediction result includes a semantic prediction result indicating that the pixel point is located in an instance region or a background region and a center relative position prediction result indicating a relative position between the pixel point and the instance center; determining the instance segmentation result of the first image based on the semantic prediction result and the center relative position prediction result of each pixel of the plurality of pixels can make the instance segmentation in the image processing have the advantages of high speed and high precision.

Description

一種圖像處理方法、電子設備及存儲介質An image processing method, electronic device and storage medium

本申請涉及電腦視覺技術領域,具體涉及一種圖像處理方法、電子設備及儲存介質。The present application relates to the field of computer vision technology, and in particular, to an image processing method, an electronic device and a storage medium.

影像處理又稱為圖像處理,是用電腦對圖像進行分析,以達到所需結果的技術。圖像處理一般指數位圖像處理,數位圖像是指用工業相機、攝像機、掃描儀等設備經過拍攝得到的一個大的二維數組,該數組的元素稱為像素點,其值稱為灰度值。圖像處理在許多領域起著十分重要的作用,尤其是對醫學影像的處理。Image processing, also known as image processing, is a technology that uses a computer to analyze images to achieve the desired results. Image processing generally refers to bit image processing. Digital image refers to a large two-dimensional array obtained by shooting with industrial cameras, video cameras, scanners and other equipment. The elements of the array are called pixels, and their values are called gray. degree value. Image processing plays a very important role in many fields, especially the processing of medical images.

本申請實施例提供了一種圖像處理方法、電子設備及儲存介質。Embodiments of the present application provide an image processing method, an electronic device, and a storage medium.

本申請實施例第一方面提供一種圖像處理方法,包括:對第一圖像進行處理,獲得所述第一圖像中多個像素點各自的預測結果,所述預測結果包括語義預測結果和中心相對位置預測結果,其中,所述語義預測結果指示所述像素點位於實例區域或背景區域,所述中心相對位置預測結果指示所述像素點與實例中心之間的相對位置;基於所述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定所述第一圖像的實例分割結果。A first aspect of the embodiments of the present application provides an image processing method, including: processing a first image to obtain prediction results of multiple pixels in the first image, where the prediction results include semantic prediction results and A center relative position prediction result, wherein the semantic prediction result indicates that the pixel is located in an instance area or a background area, and the center relative position prediction result indicates a relative position between the pixel point and the instance center; based on the multiple The semantic prediction result and the center relative position prediction result of each pixel point in the pixel points determine the instance segmentation result of the first image.

可選的,所述對第一圖像進行處理,獲得所述第一圖像中多個像素點的語義預測結果包括:對所述第一圖像進行處理,得到所述第一圖像中多個像素點的實例區域預測機率,所述實例區域預測機率指示該像素點位於實例區域的機率;基於第二閾值對上述多個像素點的實例區域預測機率進行二值化處理,得到所述多個像素點中每個像素點的語義預測結果。Optionally, the processing the first image to obtain semantic prediction results of multiple pixels in the first image includes: processing the first image to obtain the first image in the first image. The instance area prediction probability of a plurality of pixel points, the instance area prediction probability indicates the probability that the pixel point is located in the instance area; based on the second threshold, the instance area prediction probability of the above-mentioned multiple pixel points is binarized to obtain the Semantic prediction results for each pixel in multiple pixels.

可選的,所述實例中心區域包括:在所述實例區域內並且小於所述實例區域的區域,並且所述實例中心區域的幾何中心與所述實例區域的幾何中心重疊。Optionally, the instance central area includes: an area within the instance area and smaller than the instance area, and the geometric center of the instance central area overlaps the geometric center of the instance area.

在一種可選的實施方式中,在對第一圖像進行處理之前,所述方法還包括:對第二圖像進行預處理,得到所述第一圖像,以使得所述第一圖像滿足預設對比度和/或預設灰度值。In an optional implementation manner, before processing the first image, the method further includes: preprocessing the second image to obtain the first image, so that the first image The preset contrast and/or the preset gray value are satisfied.

在一種可選的實施方式中,在對所述第一圖像進行處理之前,所述方法還包括:對所述第二圖像進行預處理,得到所述第一圖像,以使得所述第一圖像滿足預設圖像大小。In an optional implementation manner, before processing the first image, the method further includes: preprocessing the second image to obtain the first image, so that the The first image satisfies the preset image size.

在一種可選的實施方式中,所述基於所述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定所述第一圖像的實例分割結果,包括:基於所述多個像素點中每個像素點的語義預測結果,從所述多個像素點中確定位於實例區域的至少一個第一像素點;基於所述第一像素點的中心相對位置預測結果,確定所述每個第一像素點所屬的實例。In an optional implementation manner, the determining the instance segmentation result of the first image based on the semantic prediction result and the center relative position prediction result of each pixel point in the plurality of pixel points includes: the semantic prediction result of each pixel point in the plurality of pixel points, and at least one first pixel point located in the instance area is determined from the plurality of pixel points; based on the prediction result of the relative position of the center of the first pixel point, determine The instance to which each first pixel belongs.

所述實例為第一圖像中的分割對象,具體可以為第一圖像中的封閉性結構。The instance is a segmented object in the first image, and may specifically be a closed structure in the first image.

本申請實施例中的實例包括細胞核,即本申請實施例可以應用於細胞核分割。Examples in the embodiments of the present application include cell nuclei, that is, the embodiments of the present application can be applied to cell nucleus segmentation.

在一種可選的實施方式中,所述預測結果還包括:中心區域預測結果,所述中心區域預測結果指示所述像素點是否位於實例中心區域。在此情況下,所述方法還包括:基於所述多個像素點中每個像素點的中心區域預測結果,確定所述第一圖像的至少一個實例中心區域;所述基於所述第一像素點的中心相對位置預測結果,確定所述第一像素點所屬的實例,包括:基於所述第一像素點的中心相對位置預測結果,從所述至少一個實例中心區域中確定所述每個第一像素點對應的實例中心區域。In an optional embodiment, the prediction result further includes: a center area prediction result, where the center area prediction result indicates whether the pixel point is located in the center area of the instance. In this case, the method further includes: determining at least one instance center region of the first image based on the prediction result of the center region of each pixel point in the plurality of pixel points; The prediction result of the relative center position of the pixel point, and determining the instance to which the first pixel point belongs includes: based on the prediction result of the relative center position of the first pixel point, determining the each of the center regions of the at least one instance. The central area of the instance corresponding to the first pixel.

在一種可選的實施方式中,所述基於所述多個像素點中每個像素點的中心區域預測結果,確定所述第一圖像的至少一個實例中心區域,包括:基於所述多個像素點中每個像素點的中心區域預測結果,對所述第一圖像進行連通域搜索處理,得到至少一個實例中心區域。In an optional implementation manner, the determining at least one instance central region of the first image based on the prediction result of the central region of each pixel point in the plurality of pixel points includes: based on the plurality of pixel points Based on the prediction result of the central area of each pixel in the pixel points, a connected domain search process is performed on the first image to obtain at least one instance central area.

在一種可選的實施方式中,所述基於所述多個像素點中每個像素點的中心區域預測結果,對所述第一圖像進行連通域搜索處理,得到至少一個實例中心區域包括:基於所述多個像素點中每個像素點的中心區域預測結果,使用隨機遊走算法對所述第一圖像進行連通域搜索處理,得到至少一個實例中心區域。In an optional implementation manner, performing a connected domain search process on the first image based on the prediction result of the center area of each pixel point in the plurality of pixel points, and obtaining at least one instance center area includes: Based on the prediction result of the center area of each pixel point in the plurality of pixel points, a random walk algorithm is used to perform a connected domain search process on the first image to obtain at least one instance center area.

在一種可選的實施方式中,所述基於所述第一像素點的中心相對位置預測結果,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域,包括:基於所述第一像素點的位置信息和所述第一像素點的中心相對位置預測結果,確定所述第一像素點的中心預測位置;基於所述第一像素點的中心預測位置和所述至少一個實例中心區域的位置信息,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域。In an optional implementation manner, the determining an instance central area corresponding to the first pixel point from the at least one instance central area based on the prediction result of the relative center position of the first pixel point includes: based on The position information of the first pixel point and the prediction result of the relative position of the center of the first pixel point, determine the center prediction position of the first pixel point; based on the center prediction position of the first pixel point and the at least The location information of an instance central area, and the instance central area corresponding to the first pixel point is determined from the at least one instance central area.

在一種可選的實施方式中,所述基於所述第一像素點的中心預測位置和所述至少一個實例中心區域的位置信息,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域,包括:響應於所述第一像素點的中心預測位置屬於所述至少一個實例中心區域中的第一實例中心區域,將所述第一實例中心區域確定為所述第一像素點對應的實例中心區域。In an optional implementation manner, the first pixel point is determined from the at least one instance center area based on the predicted center position of the first pixel point and the position information of the at least one instance center area The corresponding instance central area includes: in response to the predicted center position of the first pixel belonging to the first instance central area in the at least one instance central area, determining the first instance central area as the first instance central area The central area of the instance corresponding to the pixel point.

在一種可選的實施方式中,所述基於所述第一像素點的中心預測位置和所述至少一個實例中心區域的位置信息,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域,包括:響應於所述第一像素點的中心預測位置不屬於所述至少一個實例中心區域中的任意實例中心區域,將所述至少一個實例中心區域中與所述第一像素點的中心預測位置距離最近的實例中心區域確定為所述第一像素點對應的實例中心區域。In an optional implementation manner, the first pixel point is determined from the at least one instance center area based on the predicted center position of the first pixel point and the position information of the at least one instance center area The corresponding instance central area includes: in response to the predicted center position of the first pixel point not belonging to any instance central area in the at least one instance central area, comparing the at least one instance central area with the first instance central area. The instance central area with the closest distance from the center prediction position of the pixel point is determined as the instance central area corresponding to the first pixel point.

在一種可選的實施方式中,所述對第一圖像進行處理,獲得所述第一圖像中多個像素點的預測結果,包括:對所述第一圖像進行處理,得到所述第一圖像中多個像素點的中心區域預測機率;基於第一閾值對所述多個像素點的中心區域預測機率進行二值化處理,得到所述多個像素點中每個像素點的中心區域預測結果。In an optional implementation manner, the processing the first image to obtain the prediction results of multiple pixels in the first image includes: processing the first image to obtain the The prediction probability of the central area of the plurality of pixels in the first image; based on the first threshold, the central area prediction probability of the plurality of pixels is binarized to obtain the prediction probability of each pixel in the plurality of pixels. Center area prediction results.

在一種可選的實施方式中,所述對第一圖像進行處理,獲得所述第一圖像中多個像素點的預測結果,包括:將第一圖像輸入到神經網路進行處理,輸出所述第一圖像中多個像素點的預測結果。In an optional implementation manner, the processing of the first image to obtain prediction results of multiple pixels in the first image includes: inputting the first image into a neural network for processing, The prediction results of the plurality of pixels in the first image are output.

本申請實施例第二方面提供一種電子設備,包括預測模塊和分割模塊,其中:所述預測模塊,用於對第一圖像進行處理,獲得所述第一圖像中多個像素點的預測結果,所述預測結果包括語義預測結果和中心相對位置預測結果,其中,所述語義預測結果指示所述像素點位於實例區域或背景區域,所述中心相對位置預測結果指示所述像素點與實例中心之間的相對位置;所述分割模塊,用於基於所述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定所述第一圖像的實例分割結果。A second aspect of an embodiment of the present application provides an electronic device, including a prediction module and a segmentation module, wherein: the prediction module is configured to process a first image to obtain predictions of multiple pixels in the first image As a result, the prediction result includes a semantic prediction result and a center relative position prediction result, wherein the semantic prediction result indicates that the pixel point is located in the instance area or the background area, and the center relative position prediction result indicates that the pixel point is located in the instance area or the background area. The relative position between the centers; the segmentation module is configured to determine the instance segmentation result of the first image based on the semantic prediction result of each pixel point in the plurality of pixel points and the prediction result of the relative position of the center.

可選的,所述預測模塊具體用於:對所述第一圖像進行處理,得到所述第一圖像中多個像素點的實例區域預測機率,所述實例區域預測機率指示該像素點位於實例區域的機率;基於第二閾值對上述多個像素點的實例區域預測機率進行二值化處理,得到所述多個像素點中每個像素點的語義預測結果。Optionally, the prediction module is specifically configured to: process the first image to obtain an instance area prediction probability of a plurality of pixels in the first image, and the instance area prediction probability indicates the pixel point. Probability of being located in the instance area; binarizing the instance area prediction probability of the plurality of pixel points based on the second threshold to obtain a semantic prediction result of each pixel point in the plurality of pixel points.

在一種可選的實施方式中,所述電子設備還包括預處理模塊,用於對第二圖像進行預處理,得到所述第一圖像,以使得所述第一圖像滿足預設對比度和/或預設灰度值。In an optional implementation manner, the electronic device further includes a preprocessing module, configured to preprocess the second image to obtain the first image, so that the first image satisfies a preset contrast ratio and/or preset grayscale values.

在一種可選的實施方式中,所述預處理模塊,還用於對所述第二圖像進行預處理,得到所述第一圖像,以使得所述第一圖像滿足預設圖像大小。In an optional implementation manner, the preprocessing module is further configured to preprocess the second image to obtain the first image, so that the first image satisfies a preset image size.

在一種可選的實施方式中,所述分割模塊包括第一單元和第二單元,其中:所述第一單元,用於基於所述多個像素點中每個像素點的語義預測結果,從所述多個像素點中確定位於實例區域的至少一個第一像素點;所述第二單元,用於基於所述第一像素點的中心相對位置預測結果,確定所述每個第一像素點所屬的實例。In an optional implementation manner, the segmentation module includes a first unit and a second unit, wherein: the first unit is configured to, based on the semantic prediction result of each pixel point in the plurality of pixel points, from Determining at least one first pixel point located in the instance area among the plurality of pixel points; the second unit is configured to determine each first pixel point based on the prediction result of the relative position of the center of the first pixel point the instance to which it belongs.

在一種可選的實施方式中,所述預測結果還包括:中心區域預測結果,所述中心區域預測結果指示所述像素點是否位於實例中心區域。在此情況下,所述分割模塊還包括第三單元,用於基於所述多個像素點中每個像素點的中心區域預測結果,確定所述第一圖像的至少一個實例中心區域;所述第二單元具體用於,基於所述第一像素點的中心相對位置預測結果,從所述至少一個實例中心區域中確定所述每個第一像素點對應的實例中心區域。In an optional embodiment, the prediction result further includes: a center area prediction result, where the center area prediction result indicates whether the pixel point is located in the center area of the instance. In this case, the segmentation module further includes a third unit, configured to determine at least one instance center area of the first image based on the center area prediction result of each pixel point in the plurality of pixel points; the The second unit is specifically configured to, based on the prediction result of the relative position of the center of the first pixel point, determine the instance center area corresponding to each first pixel point from the at least one instance center area.

在一種可選的實施方式中,所述第三單元具體用於,基於所述多個像素點中每個像素點的中心區域預測結果,對所述第一圖像進行連通域搜索處理,得到至少一個實例中心區域。In an optional implementation manner, the third unit is specifically configured to, based on the prediction result of the central area of each pixel in the plurality of pixels, perform a connected domain search process on the first image, to obtain At least one instance central area.

在一種可選的實施方式中,所述第三單元具體用於,基於所述多個像素點中每個像素點的中心區域預測結果,使用隨機遊走算法對所述第一圖像進行連通域搜索處理,得到至少一個實例中心區域。In an optional implementation manner, the third unit is specifically configured to, based on the prediction result of the central area of each pixel point in the plurality of pixel points, use a random walk algorithm to perform a connected domain analysis on the first image The search process yields at least one instance center region.

在一種可選的實施方式中,所述第二單元具體用於:基於所述第一像素點的位置信息和所述第一像素點的中心相對位置預測結果,確定所述第一像素點的中心預測位置;基於所述第一像素點的中心預測位置和所述至少一個實例中心區域的位置信息,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域。In an optional implementation manner, the second unit is specifically configured to: determine the position of the first pixel based on the position information of the first pixel and the prediction result of the relative position of the center of the first pixel. Center prediction position; based on the center prediction position of the first pixel point and the position information of the at least one instance center area, determine the instance center area corresponding to the first pixel point from the at least one instance center area.

在一種可選的實施方式中,所述第二單元具體用於:響應於所述第一像素點的中心預測位置屬於所述至少一個實例中心區域中的第一實例中心區域,將所述第一實例中心區域確定為所述第一像素點對應的實例中心區域。In an optional implementation manner, the second unit is specifically configured to: in response to that the predicted center position of the first pixel belongs to a first instance center area in the at least one instance center area, convert the first instance center area to the first instance center area. An example center area is determined as an example center area corresponding to the first pixel point.

在一種可選的實施方式中,所述第二單元具體用於:響應於所述第一像素點的中心預測位置不屬於所述至少一個實例中心區域中的任意實例中心區域,將所述至少一個實例中心區域中與所述第一像素點的中心預測位置距離最近的實例中心區域確定為所述第一像素點對應的實例中心區域。In an optional implementation manner, the second unit is specifically configured to: in response to that the predicted center position of the first pixel does not belong to any instance center area in the at least one instance center area, change the at least one instance center area to the at least one instance center area. In an instance central area, the instance central area that is closest to the predicted center position of the first pixel point is determined as the instance central area corresponding to the first pixel point.

在一種可選的實施方式中,所述預測模塊包括機率預測單元和判斷單元,其中:所述機率預測單元,用於對所述第一圖像進行處理,得到所述第一圖像中多個像素點的中心區域預測機率;所述判斷單元,用於基於第一閾值對所述多個像素點的中心區域預測機率進行二值化處理,得到所述多個像素點中每個像素點的中心區域預測結果。In an optional implementation manner, the prediction module includes a probability prediction unit and a judgment unit, wherein: the probability prediction unit is configured to process the first image to obtain a probability prediction unit in the first image. The prediction probability of the central area of the pixel points; the judgment unit is configured to perform binarization processing on the prediction probability of the central area of the plurality of pixel points based on the first threshold, to obtain each pixel point of the plurality of pixel points The prediction result of the central area.

在一種可選的實施方式中,所述預測模塊具體用於,將第一圖像輸入到神經網路進行處理,輸出所述第一圖像中多個像素點的預測結果。In an optional implementation manner, the prediction module is specifically configured to input the first image into a neural network for processing, and output prediction results of multiple pixels in the first image.

本申請實施例第三方面提供另一種電子設備,包括處理器以及記憶體,所述記憶體用於儲存電腦程式,所述電腦程式被配置成由所述處理器執行,所述處理器用於執行如本申請實施例第一方面任一方法中所描述的部分或全部步驟。A third aspect of an embodiment of the present application provides another electronic device, including a processor and a memory, where the memory is used for storing a computer program, the computer program is configured to be executed by the processor, and the processor is used for executing Part or all of the steps described in any method in the first aspect of the embodiments of the present application.

本申請實施例第四方面提供一種電腦可讀儲存介質,所述電腦可讀儲存介質用於儲存電腦程式,其中,所述電腦程式使得電腦執行如本申請實施例第一方面任一方法中所描述的部分或全部步驟。A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, wherein the computer program causes the computer to execute the method described in any of the methods in the first aspect of the embodiments of the present application. some or all of the steps described.

本申請實施例中,通過對第一圖像進行處理,獲得上述第一圖像中多個像素點的預測結果,上述預測結果包括語義預測結果和中心相對位置預測結果,其中,上述語義預測結果指示上述像素點位於實例區域或背景區域,上述中心相對位置預測結果指示上述像素點與實例中心之間的相對位置,基於上述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定上述第一圖像的實例分割結果,可以使圖像處理中的實例分割具備速度快、精度高的優點。In the embodiment of the present application, by processing the first image, the prediction results of multiple pixels in the first image are obtained, and the prediction results include semantic prediction results and center relative position prediction results, wherein the semantic prediction results Indicate that the above-mentioned pixel points are located in the instance area or the background area, and the above-mentioned relative position prediction result of the center indicates the relative position between the above-mentioned pixel point and the center of the instance, based on the semantic prediction result of each pixel point in the above-mentioned multiple pixel points and the relative position prediction of the center As a result, by determining the instance segmentation result of the first image, the instance segmentation in image processing can have the advantages of high speed and high precision.

下面將結合本申請實施例中的附圖,對本申請實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本申請一部分實施例,而不是全部的實施例。基於本申請中的實施例,本領域普通技術人員在沒有作出創造性勞動前提下所獲得的所有其他實施例,都屬於本申請保護的範圍。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

本申請的說明書和申請專利範圍及上述附圖中的術語“第一”、“第二”等是用於區別不同對象,而不是用於描述特定順序。此外,術語“包括”和“具有”以及它們任何變形,意圖在於覆蓋不排他的包含。例如包含了一系列步驟或單元的過程、方法、系統、產品或設備沒有限定於已列出的步驟或單元,而是可選地還包括沒有列出的步驟或單元,或可選地還包括對於這些過程、方法、產品或設備固有的其他步驟或單元。The terms "first", "second" and the like in the description and the scope of the patent application of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.

在本文中提及“實施例”意味著,結合實施例描述的特定特徵、結構或特性可以包含在本申請的至少一個實施例中。在說明書中的各個位置出現該短語並不一定均是指相同的實施例,也不是與其它實施例互斥的獨立的或備選的實施例。本領域技術人員顯式地和隱式地理解的是,本文所描述的實施例可以與其它實施例相結合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

本申請實施例所涉及到的電子設備可以允許多個其他終端設備進行訪問。上述電子設備包括終端設備,具體實現中,上述終端設備包括但不限於諸如具有觸摸敏感表面(例如,觸摸屏顯示器和/或觸摸板)的移動電話、膝上型電腦或平板電腦之類的其它便攜式設備。還應當理解的是,在某些實施例中,所述終端設備並非便攜式通信設備,而是具有觸摸敏感表面(例如,觸摸屏顯示器和/或觸摸板)的臺式電腦。The electronic device involved in the embodiments of the present application may allow access by multiple other terminal devices. The aforementioned electronic devices include terminal devices, which in specific implementations include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (eg, touch screen displays and/or touch pads). equipment. It should also be understood that, in some embodiments, the terminal device is not a portable communication device, but a desktop computer with a touch-sensitive surface (eg, a touch screen display and/or a touch pad).

本申請實施例中的深度學習的概念源於人工神經網路的研究。含多隱層的多層感知器就是一種深度學習結構。深度學習通過組合低層特徵形成更加抽象的高層表示屬性類別或特徵,以發現數據的分布式特徵表示。The concept of deep learning in the embodiments of the present application originates from the research of artificial neural network. A multilayer perceptron with multiple hidden layers is a deep learning structure. Deep learning combines low-level features to form more abstract high-level representation attribute categories or features to discover distributed feature representations of data.

深度學習是機器學習中一種基於對數據進行表徵學習的方法。觀測值(例如一幅圖像)可以使用多種方式來表示,如每個像素點強度值的向量,或者更抽象地表示成一系列邊、特定形狀的區域等。而使用某些特定的表示方法更容易從實例中學習任務(例如,人臉識別或面部表情識別)。深度學習的好處是用非監督式或半監督式的特徵學習和分層特徵提取高效算法來替代手工獲取特徵。深度學習是機器學習研究中的一個新的領域,其動機在於建立、模擬人腦進行分析學習的神經網路,從而可以模仿人腦的機制來解釋數據,例如圖像、聲音和文本。Deep learning is a method in machine learning based on representational learning of data. An observation (such as an image) can be represented in a variety of ways, such as a vector of intensity values for each pixel, or more abstractly as a series of edges, regions of a specific shape, etc. Instead, it is easier to learn tasks from examples (e.g., face recognition or facial expression recognition) using some specific representation. The benefit of deep learning is to replace handcrafted features with efficient algorithms for unsupervised or semi-supervised feature learning and hierarchical feature extraction. Deep learning is a new field in machine learning research. Its motivation is to build and simulate the neural network of the human brain for analysis and learning, so that the mechanism of the human brain can be imitated to interpret data, such as images, sounds and texts.

同機器學習方法一樣,深度機器學習方法也有監督學習與無監督學習之分。不同的學習框架下建立的學習模型很是不同。例如,卷積神經網路(Convolutional neural network,CNN)就是一種深度的監督學習下的機器學習模型,也可稱為基於深度學習的網路結構模型,而深度置信網(Deep Belief Net,DBN)就是一種無監督學習下的機器學習模型。Like machine learning methods, deep machine learning methods also have supervised learning and unsupervised learning. The learning models established under different learning frameworks are very different. For example, a convolutional neural network (CNN) is a machine learning model under deep supervised learning, and can also be called a network structure model based on deep learning, while a deep belief network (Deep Belief Net, DBN) It is a machine learning model under unsupervised learning.

下面對本申請實施例進行詳細介紹,應理解,本公開實施例可以應用於對圖像進行細胞核分割或者其他具有封閉結構的實例的分割,本公開實施例對此不做限定。The embodiments of the present application will be described in detail below. It should be understood that the embodiments of the present disclosure may be applied to segmentation of cell nuclei or other instances having a closed structure for images, which are not limited in the embodiments of the present disclosure.

請參閱圖1,圖1是本申請實施例公開的一種圖像處理方法的流程示意圖,如圖1所示,該圖像處理方法包括如下步驟。Please refer to FIG. 1 , which is a schematic flowchart of an image processing method disclosed in an embodiment of the present application. As shown in FIG. 1 , the image processing method includes the following steps.

101、對第一圖像進行處理,獲得上述第一圖像中多個像素點的預測結果,上述預測結果包括語義預測結果和中心相對位置預測結果,其中,上述語義預測結果指示上述像素點位於實例區域或背景區域,上述中心相對位置預測結果指示上述像素點與實例中心之間的相對位置。101. Process the first image to obtain prediction results of multiple pixels in the first image, where the prediction results include semantic prediction results and center relative position prediction results, wherein the semantic prediction results indicate that the pixels are located at For instance area or background area, the above-mentioned relative center position prediction result indicates the relative position between the above-mentioned pixel point and the instance center.

可選地,在101中,通過對第一圖像進行處理,得到第一圖像包含的多個像素點中國每個像素點的預測結果,其中,多個像素點可以為第一圖像的所有或部分像素點,本公開實施例對此不做限定。上述第一圖像,可以包括通過各種圖像採集設備(比如顯微鏡)獲得的病理圖像,比如細胞核圖像等,本公開實施例對第一圖像的獲取方式以及實例的具體實現不做限定。Optionally, in 101, by processing the first image, a prediction result of each pixel of a plurality of pixels included in the first image is obtained, wherein the plurality of pixels may be All or part of the pixel points are not limited in this embodiment of the present disclosure. The above-mentioned first image may include pathological images obtained by various image acquisition devices (such as microscopes), such as cell nucleus images, etc. The embodiment of the present disclosure does not limit the acquisition method of the first image and the specific implementation of the example. .

在本公開實施例中,可以通過多種方式對第一圖像進行處理,例如,利用實例分割算法對第一圖像進行處理,或者,可以將上述第一圖像輸入到神經網路進行處理,輸出上述第一圖像中多個像素點的預測結果,本公開實施例對此不做限定。In this embodiment of the present disclosure, the first image may be processed in various ways, for example, the first image may be processed by using an instance segmentation algorithm, or the above-mentioned first image may be input into a neural network for processing, Output the prediction results of the plurality of pixels in the first image, which is not limited in this embodiment of the present disclosure.

在一個可選例子中,可以通過基於深度學習的神經網路來獲得上述第一圖像中多個像素點的預測結果,比如深層融合網路(Deep Layer Aggregation,DLANet),但本公開實施例對神經網路的具體實現不作限定。深層融合網路,也叫深層聚合網路,通過更深入的聚合來擴充標準體系結構,以更好地融合各層的信息,深層融合以迭代和分層方式合併特徵層次結構,使網路具有更高的準確性和更少的參數。使用樹型構造取代以往架構的線性構造,實現了對於網路的梯度回傳長度的對數級別壓縮,而不是線性壓縮,使得學習到的特徵更具備描述能力,可以有效提高上述數值指標的預測精度。In an optional example, the prediction results of multiple pixels in the first image can be obtained through a deep learning-based neural network, such as a deep layer aggregation network (DLANet). The specific implementation of the neural network is not limited. Deep fusion network, also called deep aggregation network, expands the standard architecture through deeper aggregation to better integrate the information of each layer. Deep fusion merges the feature hierarchy in an iterative and hierarchical manner, making the network more High accuracy and fewer parameters. The tree structure is used to replace the linear structure of the previous architecture, and the logarithmic level compression of the gradient return length of the network is realized instead of linear compression, which makes the learned features more descriptive and can effectively improve the prediction accuracy of the above numerical indicators .

在一些可能的實現方式中,可以對第一圖像進行語義分割處理,得到第一圖像中多個像素點的語義預測結果,並基於多個像素點的語義預測結果確定第一圖像的實例分割結果。其中,語義分割處理用於將第一圖像中的像素點按照語義含義的不同進行分組(Grouping)/分割(Segmentation)。例如,可以確定第一圖像包含的多個像素點中每個像素點是實例還是背景,即位於實例區域還是位於背景區域。In some possible implementation manners, semantic segmentation processing may be performed on the first image to obtain semantic prediction results of multiple pixels in the first image, and based on the semantic prediction results of multiple pixels, Instance segmentation results. The semantic segmentation process is used for grouping/segmenting the pixels in the first image according to different semantic meanings. For example, it can be determined whether each pixel of the plurality of pixels included in the first image is an instance or a background, that is, located in an instance area or a background area.

像素點級別的語義分割可以對圖像中的每個像素點都劃分出對應的類別,即實現像素點級別的分類;而類的具體對象,即為實例。實例分割不但要進行像素點級別的分類,還需在具體的類別基礎上區別開不同的實例。比如說第一圖像中有三個細胞核1、2、3,其語義分割結果都是細胞核,而實例分割結果卻是不同的對象。Pixel-level semantic segmentation can divide each pixel in the image into a corresponding category, that is, to achieve pixel-level classification; and the specific object of the category is an instance. Instance segmentation not only needs to perform pixel-level classification, but also needs to distinguish different instances on the basis of specific categories. For example, there are three cell nuclei 1, 2, and 3 in the first image, and the semantic segmentation results are all cell nuclei, but the instance segmentation results are different objects.

在本公開實施例中,對於第一圖像,可選地,可以對第一圖像中的每一個像素點進行獨立的實例判斷,判斷其所屬的語義分割類別以及所屬的實例ID。例如一張圖像中有三個細胞核,則每個細胞核的語義分割類別都是1,但不同細胞核的ID分別是1,2,3,則可以通過上述細胞核ID來區分不同的細胞核。In the embodiment of the present disclosure, for the first image, optionally, each pixel in the first image may be independently instance judged to judge the semantic segmentation category to which it belongs and the instance ID to which it belongs. For example, if there are three nuclei in an image, the semantic segmentation category of each nucleus is 1, but the IDs of different nuclei are 1, 2, and 3, respectively, and different nuclei can be distinguished by the above-mentioned nucleus ID.

在一些可能的實現方式中,像素點的語義預測結果可以指示上述像素點位於實例區域或背景區域。也就是說,像素點的語義預測結果指示該像素點為實例或者背景。In some possible implementations, the semantic prediction result of the pixel point may indicate that the above-mentioned pixel point is located in the instance area or the background area. That is, the semantic prediction result of a pixel indicates that the pixel is an instance or background.

上述實例區域可以理解為實例所在的區域,背景區域為圖像中除實例以外的其他區域。比如,假設第一圖像為細胞圖像,則像素點的語義預測結果可以包括用於指示像素點在細胞圖像中為細胞核區域還是背景區域的指示信息。在本公開實施例中,可以通過多種方式指示像素點為實例區域還是背景區域。一些可能的實施方式中,像素點的語義預測結果可以為兩個預設數值中的一個,其中,這兩個預設數值分別對應於實例區域和背景區域。例如,像素點的語義預測結果可以為0或正整數(例如1),其中,0表示背景區域,正整數(例如1)表示實例區域,但本公開實施例不限於此。The above instance area can be understood as the area where the instance is located, and the background area is other areas in the image other than the instance. For example, assuming that the first image is a cell image, the semantic prediction result of the pixel point may include indication information for indicating whether the pixel point is a nucleus region or a background region in the cell image. In the embodiment of the present disclosure, whether the pixel point is an instance area or a background area may be indicated in various ways. In some possible implementations, the semantic prediction result of the pixel point may be one of two preset values, wherein the two preset values correspond to the instance area and the background area, respectively. For example, the semantic prediction result of a pixel point may be 0 or a positive integer (eg, 1), where 0 represents a background area, and a positive integer (eg, 1) represents an instance area, but the embodiment of the present disclosure is not limited thereto.

可選的,上述語義預測結果可以是二值化結果。此時,可以對第一圖像進行處理,得到多個像素點中每個像素點的實例區域預測機率,其中,實例區域預測機率指示該像素點位於實例區域的機率,然後,基於第二閾值對上述多個像素點中每個像素點的實例區域預測機率進行二值化處理,得到所述多個像素點中每個像素點的語義預測結果。Optionally, the above semantic prediction result may be a binarized result. At this time, the first image can be processed to obtain the instance area prediction probability of each pixel in the plurality of pixel points, wherein the instance area prediction probability indicates the probability that the pixel is located in the instance area, and then, based on the second threshold Binarization is performed on the instance region prediction probability of each pixel point in the plurality of pixel points to obtain a semantic prediction result of each pixel point in the plurality of pixel points.

在一個例子中,上述二值化處理的第二閾值可以為0.5,此時,將實例區域預測機率大於或等於0.5的像素點確定為位於實例區域的像素點,並將實例區域預測機率小於0.5的像素點確定為位於背景區域的像素點。相應地,作為一個例子,將實例區域預測機率大於或等於0.5的像素點的語義預測結果確定為1,並將實例區域預測機率小於0.5的像素點的語義預測結果確定為0,但本公開實施例不限於此。In one example, the second threshold of the binarization process may be 0.5. In this case, pixels with a predicted probability of the instance area greater than or equal to 0.5 are determined as pixels located in the instance area, and the predicted probability of the instance area is less than 0.5. The pixels of are determined as the pixels located in the background area. Correspondingly, as an example, the semantic prediction result of the pixel point with the prediction probability of the instance region greater than or equal to 0.5 is determined to be 1, and the semantic prediction result of the pixel point of the instance region prediction probability of less than 0.5 is determined to be 0. The example is not limited to this.

在一些可能的實現方式中,像素點的預測結果包括像素點的中心相對位置預測結果,用於指示上述像素點與該像素點所屬實例中心之間的相對位置。在一個例子中,像素點的中心相對位置預測結果可以包括對像素點的中心向量的預測結果,例如,像素點的中心相對位置預測結果可表示為向量(x,y),分別表示像素點的坐標與實例中心的坐標在橫軸和縱軸上的差值。可選地,像素點的中心相對位置預測結果還可以通過其他方式實現,本公開實施例對此不做限定。In some possible implementations, the prediction result of the pixel point includes the prediction result of the relative position of the center of the pixel point, which is used to indicate the relative position between the above-mentioned pixel point and the center of the instance to which the pixel point belongs. In one example, the prediction result of the relative center position of the pixel point may include the prediction result of the center vector of the pixel point. The difference between the coordinates and the coordinates of the instance center on the horizontal and vertical axes. Optionally, the prediction result of the relative center position of the pixel point may also be achieved in other manners, which is not limited in this embodiment of the present disclosure.

可選地,可以基於像素點的中心相對位置預測結果和該像素點的位置信息,確定像素點的實例中心預測位置,即像素點所屬實例的中心的預測位置,並基於像素點的實例中心預測位置,確定像素點所屬的實例,但本公開實施例對此不做限定。Optionally, based on the prediction result of the relative position of the center of the pixel and the position information of the pixel, determine the predicted position of the instance center of the pixel, that is, the predicted position of the center of the instance to which the pixel belongs, and predict based on the instance center of the pixel. position, to determine the instance to which the pixel point belongs, but this is not limited in this embodiment of the present disclosure.

在一個可選例子中,可以基於對第一圖像的處理,確定第一圖像中的至少一個實例中心的位置信息,並基於像素點的實例中心預測位置和至少一個實例中心的位置信息,確定像素點所屬的實例。In an optional example, the position information of the center of at least one instance in the first image may be determined based on the processing of the first image, and the position information of the instance center of the pixel point and the position information of the at least one instance center may be predicted, Determines the instance to which the pixel belongs.

在另一個例子中,可以將實例中心所屬的一小塊區域定義為實例中心區域,即實例中心區域是在該實例區域內並且小於該實例區域的區域,並且該實例中心區域的幾何中心與該實例區域的幾何中心重疊或鄰近,例如,實例中心區域的中心為實例中心。可選地,該實例中心區域可以為圓形、橢圓或其他形狀,上述實例中心區域可以根據需要進行設置,本申請實施例對實例中心區域的具體實現不做限制。In another example, a small area to which the instance center belongs can be defined as the instance center area, that is, the instance center area is an area within the instance area and smaller than the instance area, and the geometric center of the instance center area is the same as the instance center area. The geometric centers of the instance areas overlap or are adjacent, for example, the center of the instance center area is the instance center. Optionally, the central area of the instance may be a circle, an ellipse, or other shapes, and the central area of the above instance may be set as required, and the embodiment of the present application does not limit the specific implementation of the central area of the instance.

此時,可選地,可以確定第一圖像中的至少一個實例中心區域,並基於像素點的實例中心預測位置與至少一個實例中心區域之間的位置關係,從至少一個實例中心區域中確定像素點所屬的實例,但本公開實施例對其具體實現不做限定。At this time, optionally, at least one instance center area in the first image may be determined, and based on the positional relationship between the predicted position of the instance center of the pixel and the at least one instance center area, the at least one instance center area may be determined from the at least one instance center area. The example to which the pixel point belongs, but the specific implementation thereof is not limited in the embodiments of the present disclosure.

可選地,像素點的預測結果還包括像素點的中心區域預測結果,指示像素點是否位於實例中心區域,相應地,可以基於多個像素點中每個像素點的中心區域預測結果,確定第一圖像的至少一個實例中心區域。Optionally, the prediction result of the pixel point also includes the prediction result of the center area of the pixel point, indicating whether the pixel point is located in the center area of the instance. At least one instance central region of an image.

在一個例子中,可以通過神經網路對第一圖像進行處理,得到第一圖像包含的多個像素點中每個像素點的中心區域預測結果。In one example, the first image may be processed through a neural network to obtain the prediction result of the central area of each pixel point among the plurality of pixel points included in the first image.

在一些可能的實現方式中,上述神經網路可以是通過監督訓練方式進行訓練得到的。訓練過程中利用的樣本圖像可以標注有實例信息,可以基於樣本圖像標注的實例信息確定實例的中心區域,並將確定的實例的中心區域作為監督進行神經網路的訓練。In some possible implementation manners, the above-mentioned neural network may be obtained by training in a supervised training manner. The sample images used in the training process can be marked with instance information, and the central area of the instance can be determined based on the instance information marked by the sample image, and the determined central area of the instance can be used as supervision to train the neural network.

可選地,可以基於實例信息,確定實例中心,並將包含實例中心的預設尺寸或面積的區域確定為實例的中心區域。可選地,還可以對樣本圖像進行腐蝕處理,得到腐蝕處理後的樣本圖像,並基於腐蝕處理後的樣本圖像確定實例的中心區域。Optionally, the instance center may be determined based on the instance information, and an area including a preset size or area of the instance center may be determined as the center area of the instance. Optionally, the sample image may also be corroded to obtain a corroded sample image, and the central region of the instance may be determined based on the corroded sample image.

圖像的腐蝕操作是表示用某種結構元素對圖像進行探測,以便找出在圖像內部可以放下該結構元素的區域。本申請實施例中提到的圖像腐蝕處理可以包括上述腐蝕操作,腐蝕操作是結構元素在被腐蝕圖像中平移填充的過程。從腐蝕後的結果來看,圖像前景區域縮小,區域邊界變模糊,同時一些比較小的孤立的前景區域被完全腐蝕掉,達到了濾波的效果。The erosion operation of an image means that the image is probed with a certain structuring element in order to find the area inside the image where the structuring element can be placed. The image erosion processing mentioned in the embodiments of the present application may include the above-mentioned erosion operation, and the erosion operation is a process in which structural elements are translated and filled in the etched image. From the results after the erosion, the foreground area of the image is reduced, the boundary of the area becomes blurred, and some relatively small isolated foreground areas are completely eroded, achieving the effect of filtering.

比如,針對每一個實例遮罩,首先利用5×5的卷積核對實例遮罩(mask)進行圖像腐蝕處理,然後,將實例包括的多個像素點的坐標進行平均,得到實例的中心位置,並確定實例中的所有像素點到達該實例的中心位置的最大距離,並將與實例的中心位置之間的距離小於上述最大距離的30%的像素點確定為實例的中心區域的像素點,即得到實例的中心區域。這樣,由樣本圖像中的實例遮罩縮小一圈後,進行圖像二值化處理獲得中心區域預測的二值圖遮罩。For example, for each instance mask, first use a 5×5 convolution kernel to perform image erosion processing on the instance mask, and then average the coordinates of multiple pixels included in the instance to obtain the center position of the instance , and determine the maximum distance from all the pixels in the instance to the central position of the instance, and determine the pixels whose distance from the central position of the instance is less than 30% of the above-mentioned maximum distance as the pixel in the central area of the instance, That is, the central area of the instance is obtained. In this way, after the instance mask in the sample image is reduced by one circle, the image binarization process is performed to obtain the predicted binary image mask of the central area.

此外,可選地,可以基於樣本圖像中標注的實例中包含的像素點的坐標以及實例的中心位置,獲得像素點的中心相對位置信息,即上述像素點與實例中心之間的相對位置信息,例如由像素點到實例中心的向量,並將該相對位置信息作為監督進行神經網路的訓練,但本公開實施例不限於此。In addition, optionally, the relative position information of the center of the pixel point, that is, the relative position information between the above-mentioned pixel point and the center of the instance, can be obtained based on the coordinates of the pixel point included in the instance marked in the sample image and the center position of the instance. , for example, a vector from a pixel point to an instance center, and the relative position information is used as supervision to train a neural network, but the embodiment of the present disclosure is not limited to this.

在本公開實施例中,可以通過對第一圖像進行處理,得到第一圖像包含的多個像素點中每個像素點的中心區域預測結果。在一些可能的實現方式中,可以對上述第一圖像進行處理,得到上述第一圖像的多個像素點中每個像素點的中心區域預測機率;並基於第一閾值對上述多個像素點的中心區域預測機率進行二值化處理,得到上述多個像素點中每個像素點的中心區域預測結果。In the embodiment of the present disclosure, the prediction result of the center region of each pixel point among the plurality of pixel points included in the first image can be obtained by processing the first image. In some possible implementations, the first image may be processed to obtain the prediction probability of the central area of each pixel in the plurality of pixels of the first image; The center area prediction probability of the point is binarized to obtain the center area prediction result of each pixel point in the above-mentioned multiple pixel points.

其中,像素點的中心區域預測機率可以指像素點位於實例中心區域的機率。The prediction probability of the central area of the pixel point may refer to the probability that the pixel point is located in the central area of the instance.

可選地,不位於實例中心區域的像素點可以是背景區域的像素點或者實例區域的像素點。Optionally, the pixels not located in the central area of the instance may be pixels of the background area or pixels of the instance area.

在本公開實施例中,二值化處理可以為固定閾值的二值化處理或者自適應閾值的二值化處理。例如雙峰法、P參數法、迭代法和OTSU法等,本公開實施例對二值化處理的具體實現不做限定。In this embodiment of the present disclosure, the binarization process may be a binarization process with a fixed threshold or a binarization process with an adaptive threshold. For example, the bimodal method, the P-parameter method, the iterative method, and the OTSU method, etc., the specific implementation of the binarization processing is not limited in the embodiments of the present disclosure.

可選地,上述二值化處理的第一閾值或第二閾值可以是預設的或者是根據實際情況確定的,本公開實施例對此不做限定。Optionally, the first threshold or the second threshold in the binarization process may be preset or determined according to an actual situation, which is not limited in this embodiment of the present disclosure.

在一些可能的實現方式中,通過判斷像素點的中心區域預測機率與上述第一閾值之間的大小關係,來獲得像素點的中心區域預測結果。比如第一閾值可以為0.5,此時,可選地,將中心區域預測機率大於或等於0.5的像素點確定為位於實例中心區域的像素點,並將中心區域預測機率小於0.5的像素點確定為不位於實例中心區域的像素點,從而得到每個像素點的中心區域預測結果。例如,將中心區域預測機率大於或等於0.5的像素點的中心區域預測結果確定為1,並將中心區域預測機率小於0.5的像素點的中心區域預測結果確定為0,但本公開實施例不限於此。In some possible implementations, the prediction result of the center area of the pixel point is obtained by judging the magnitude relationship between the prediction probability of the center area of the pixel point and the above-mentioned first threshold. For example, the first threshold may be 0.5. In this case, optionally, the pixels with the prediction probability of the central region greater than or equal to 0.5 are determined as the pixels located in the central region of the instance, and the pixels with the prediction probability of the central region less than 0.5 are determined as Pixels not located in the central area of the instance, so as to obtain the prediction result of the central area of each pixel. For example, the prediction result of the central area of the pixels with the prediction probability of the central area greater than or equal to 0.5 is determined as 1, and the prediction result of the central area of the pixels with the prediction probability of the central area of less than 0.5 is determined as 0, but the embodiment of the present disclosure is not limited to this.

在獲得上述預測結果之後可以執行步驟102。Step 102 may be performed after the above prediction result is obtained.

102、基於上述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定上述第一圖像的實例分割結果。102. Determine the instance segmentation result of the first image based on the semantic prediction result and the center relative position prediction result of each pixel point in the plurality of pixel points.

在步驟101中,獲得了上述語義預測結果和上述中心相對位置預測結果之後,可以確定位於實例區域的至少一個像素點以及上述至少一個像素點與其所屬實例中心之間的相對位置信息。In step 101, after the semantic prediction result and the center relative position prediction result are obtained, at least one pixel located in the instance area and relative position information between the at least one pixel and the instance center to which it belongs can be determined.

在一些可能的實現方式中,可以基於上述多個像素點中每個像素點的語義預測結果,從上述多個像素點中確定位於實例區域的至少一個第一像素點;基於第一像素點的中心相對位置預測結果,確定第一像素點所屬的實例。In some possible implementations, at least one first pixel point located in the instance area may be determined from the plurality of pixel points based on the semantic prediction result of each pixel point in the above-mentioned plurality of pixel points; The relative position prediction result of the center determines the instance to which the first pixel belongs.

可以根據多個像素點中每個像素點的語義預測結果,確定出位於實例區域的至少一個第一像素點,具體地,將多個像素點中語義預測結果指示位於實例區域的像素點確定為第一像素點。At least one first pixel point located in the instance area can be determined according to the semantic prediction result of each pixel point in the plurality of pixel points. Specifically, the semantic prediction result of the plurality of pixel points indicates that the pixel point located in the instance area is determined as the first pixel.

進一步地,對於位於實例區域的像素點(即上述第一像素點),可以根據像素點的中心相對位置預測結果,判斷該像素點所屬的實例,其中,第一圖像的實例分割結果包括至少一個實例中每個實例包括的像素點,換句話說,包括位於實例區域的每個像素點所屬的實例。在一些可能的實現方式中,可以通過不同的實例標識或標號(例如實例ID)來區分不同的實例,其中,可選地,實例ID可以為大於0的整數,比如實例a的實例ID為1,實例b的實例ID為2,背景對應的實例ID為0,則可以得到第一圖像的多個像素點中每個像素點對應的實例標識,或者得到第一圖像的至少一個第一像素點中每個第一像素點的實例標識,即位於背景區域的像素點不具有對應的實例標識,本公開實施例對此不做限定。Further, for a pixel located in the instance area (that is, the above-mentioned first pixel), the instance to which the pixel belongs can be determined according to the prediction result of the relative position of the center of the pixel, wherein the instance segmentation result of the first image includes at least The pixels included in each instance in an instance, in other words, include the instance to which each pixel located in the instance area belongs. In some possible implementations, different instances may be distinguished by different instance identifiers or labels (eg, instance IDs), wherein, optionally, the instance ID may be an integer greater than 0, for example, the instance ID of instance a is 1 , the instance ID of instance b is 2, and the instance ID corresponding to the background is 0, then the instance identifier corresponding to each pixel in the multiple pixels of the first image can be obtained, or at least one first image of the first image can be obtained. The instance identifier of each first pixel point in the pixel points, that is, the pixel point located in the background area does not have a corresponding instance identifier, which is not limited in this embodiment of the present disclosure.

對於細胞實例分割中的像素點,若其語義預測結果為細胞且表示其中心相對位置預測結果的中心向量指向某個中心區域,則將此像素點分配給該細胞的細胞核區域(細胞核語義區域),按照上述步驟對全部像素點進行分配,可以獲得細胞分割結果。For a pixel in cell instance segmentation, if its semantic prediction result is a cell and the center vector representing the prediction result of the relative position of its center points to a certain central area, then this pixel is assigned to the nucleus area of the cell (nuclear semantic area) , and all the pixels are allocated according to the above steps, and the cell segmentation result can be obtained.

在數位顯微鏡中進行細胞核分割可以提取細胞核的高質量形態學特徵,也可以進行細胞核的計算病理學分析。這些信息是判斷例如癌症級別、藥物治療有效性的重要依據。在過去人們常用大津算法(Otsu)和水線(也稱分水嶺或流域,watershed)閾值算法來解決細胞核實例分割的問題,但由於細胞核形態的多樣性,上述方法效果不佳。實例分割可以依靠卷積神經網路(Convolutional Neural Network,CNN),主要有如下兩種算法的變體:名叫MaskRCNN(Mask Regions with CNN features)和簡單梳理全卷積網路(Fully Convolutional Network,FCN)的目標實例分割框架。但是,MaskRCN的缺點在於超參數繁多,對於具體問題要求人員具備很高的專業認知才能得到較好的結果,且該方法運行緩慢。FCN需要特殊的圖像後處理才能把黏合的細胞分成多個實例,這也需要從業人員較高的專業知識。Nucleus segmentation in digital microscopy enables extraction of high-quality morphological features of nuclei, as well as computational pathology analysis of nuclei. This information is an important basis for judging, for example, the level of cancer and the effectiveness of drug treatment. In the past, people used Otsu algorithm (Otsu) and waterline (also known as watershed or watershed) threshold algorithm to solve the problem of nucleus instance segmentation, but due to the diversity of nucleus morphology, the above methods are not effective. Instance segmentation can rely on Convolutional Neural Network (CNN), there are two variants of the following algorithms: MaskRCNN (Mask Regions with CNN features) and Fully Convolutional Network (Fully Convolutional Network, FCN) target instance segmentation framework. However, the disadvantage of MaskRCN is that there are many hyperparameters, and it requires personnel to have a high professional cognition for specific problems to obtain better results, and the method runs slowly. FCN requires special image post-processing to separate adhered cells into multiple instances, which also requires high expertise from practitioners.

本申請實施例中使用表示像素點相對於所屬實例的中心的位置關係的中心向量來建模,使圖像處理中的實例分割具備速度快、精度高的優點。對於細胞分割問題,上述FCN將部分實例收縮為邊界類,然後使用針對性的後處理算法來修整邊界所屬實例的預測,相比之下中心向量建模可以基於數據更精確的預測細胞核的邊界狀態,也無需複雜的專業後處理算法;上述MaskRCNN先通過矩形截取出每個獨立實例的圖像再進行細胞、背景的二類預測,但細胞表現為聚集在一起的多個不規則類橢圓形,矩形截取後一個實例處於中心,別的實例仍然部分處於邊緣,不利於接下來的二類分割。相比之下中心向量建模也不會有這類問題,可以對於細胞核邊界得出精確的預測,從而提高了整體預測精度。In the embodiment of the present application, a center vector representing the positional relationship of a pixel with respect to the center of the instance to which it belongs is used for modeling, so that instance segmentation in image processing has the advantages of high speed and high precision. For the cell segmentation problem, the above FCN shrinks some instances into boundary classes, and then uses a targeted post-processing algorithm to trim the prediction of the instance to which the boundary belongs. In contrast, center vector modeling can more accurately predict the boundary state of the nucleus based on the data. , and there is no need for complex professional post-processing algorithms; the above MaskRCNN first cuts out the image of each independent instance through a rectangle, and then performs the second-class prediction of cells and backgrounds, but the cells appear as multiple irregular ovals clustered together. After the rectangle is intercepted, one instance is at the center, and other instances are still partially at the edge, which is not conducive to the next two-class segmentation. In contrast, center vector modeling does not have such problems, and can obtain accurate predictions for the boundary of the cell nucleus, thereby improving the overall prediction accuracy.

本申請實施例可以應用於臨床的輔助診斷中。醫生在獲得了病人的器官組織切片數位掃描圖像後,可以將圖像輸入本申請實施例中的流程,得出每一個獨立細胞核的像素點遮罩,醫生可以以此為依據,計算該器官的細胞密度、細胞形態特徵,進而得出更準確的醫學判斷。The embodiments of the present application can be applied to clinical auxiliary diagnosis. After obtaining the digitally scanned image of the patient's organ tissue slice, the doctor can input the image into the process in the embodiment of the present application to obtain the pixel mask of each independent cell nucleus. The doctor can use this as a basis to calculate the organ. cell density and cell morphological characteristics, and then draw more accurate medical judgments.

本申請實施例通過對第一圖像進行處理,獲得上述第一圖像中多個像素點的預測結果,上述預測結果包括語義預測結果和中心相對位置預測結果,其中,上述語義預測結果指示上述像素點位於實例區域或背景區域,上述中心相對位置預測結果指示上述像素點與實例中心之間的相對位置,基於上述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定上述第一圖像的實例分割結果,可以使圖像處理中的實例分割具備速度快、精度高的優點。In this embodiment of the present application, by processing the first image, the prediction results of multiple pixels in the first image are obtained, and the prediction results include a semantic prediction result and a center relative position prediction result, wherein the semantic prediction result indicates the above The pixel point is located in the instance area or the background area, and the above-mentioned relative position prediction result of the center indicates the relative position between the above-mentioned pixel point and the center of the instance, based on the semantic prediction result and the center relative position prediction result of each pixel point in the above-mentioned multiple pixel points, Determining the instance segmentation result of the first image above can enable instance segmentation in image processing to have the advantages of high speed and high precision.

請參閱圖2,圖2是本申請實施例公開的另一種圖像處理方法的流程示意圖,圖2是在圖1的基礎上進一步優化得到的。執行本申請實施例步驟的主體可以為前述的一種電子設備。如圖2所示,該圖像處理方法包括如下步驟:Please refer to FIG. 2 . FIG. 2 is a schematic flowchart of another image processing method disclosed in an embodiment of the present application, and FIG. 2 is obtained by further optimization on the basis of FIG. 1 . The main body performing the steps of the embodiments of the present application may be the aforementioned electronic device. As shown in Figure 2, the image processing method includes the following steps:

201、對第二圖像進行預處理,得到第一圖像,以使得上述第一圖像滿足預設對比度和/或預設灰度值。201. Preprocess the second image to obtain a first image, so that the first image satisfies a preset contrast and/or a preset gray value.

本申請實施例中提到的第二圖像可以為通過各種圖像採集設備(比如顯微鏡)獲得的多模態病理圖像,上述多模態可以理解為其圖像類型可以是多樣化的,並且其圖像大小、色彩、解析度等特徵可能不相同,呈現出的圖像風格不一樣,即上述第二圖像可以為一張或者多張。在病理切片的製作以及成像的過程中,由於其組織類型、獲取途徑、成像設備等因素的不同,得到的病理影像數據通常差異很大。例如,不同顯微鏡下採集的病理圖像,其解析度會有很大的差異。通過光學顯微鏡可以獲取病理組織的彩色圖像(解析度較低),而電子顯微鏡通常只能採集到灰度圖像(但解析度較高)。然而,對於一套臨床可用的病理系統,通常需要分析不同類型的、由不同成像設備獲取的病理組織。The second image mentioned in the embodiment of the present application may be a multimodal pathological image obtained by various image acquisition devices (such as microscopes). In addition, the image size, color, resolution and other characteristics of the images may be different, and the presented image styles may be different, that is, the above-mentioned second image may be one or more images. In the process of making pathological slices and imaging, the pathological image data obtained are usually very different due to differences in tissue types, acquisition methods, imaging equipment and other factors. For example, the resolution of pathological images collected under different microscopes will vary greatly. Color images (lower resolution) of pathological tissue can be acquired with light microscopy, whereas electron microscopes typically only acquire grayscale images (but higher resolution). However, for a clinically available pathology system, it is often necessary to analyze different types of pathological tissues acquired by different imaging devices.

包含上述第二圖像的數據集中,不同病人、不同器官、不同染色方法的圖片複雜多樣,因此可以首先通過步驟201降低第二圖像的多樣性。In the data set including the above-mentioned second image, pictures of different patients, different organs, and different staining methods are complex and diverse, so the diversity of the second image can be reduced first through step 201 .

執行本申請實施例步驟的主體可以為前述的一種電子設備。電子設備中可以儲存有上述預設對比度和/或上述預設灰度值,可以將上述第二圖像轉換為滿足上述預設對比度和/或上述預設灰度值的第一圖像後,再執行步驟202。The main body performing the steps of the embodiments of the present application may be the aforementioned electronic device. The above-mentioned preset contrast and/or the above-mentioned preset gray value may be stored in the electronic device, and after the above-mentioned second image can be converted into a first image satisfying the above-mentioned preset contrast and/or the above-mentioned preset gray value, Step 202 is executed again.

本申請實施例中提到的對比度指的是一幅圖像中明暗區域最亮的白和最暗的黑之間不同亮度層級的測量,差異範圍越大代表對比越大,差異範圍越小代表對比越小。The contrast mentioned in the embodiment of this application refers to the measurement of different brightness levels between the brightest white and the darkest black in the light and dark areas of an image. The larger the difference range is, the greater the contrast is, and the smaller the difference range is The smaller the contrast.

由於景物各點的顏色及亮度不同,攝成的黑白照片上或電視接收機重現的黑白圖像上各點呈現不同程度的灰色。把白色與黑色之間按對數關係分成若干級,稱為“灰度等級”。灰度等級的範圍一般從0到255,白色為255,黑色為0,故黑白圖片也稱灰度圖像,在醫學、圖像識別領域有很廣泛的用途。Due to the different color and brightness of each point of the scene, each point on the black-and-white photo taken or the black-and-white image reproduced by the TV receiver appears to be gray in different degrees. The relationship between white and black is divided into several levels according to the logarithmic relationship, which is called "gray level". The gray scale generally ranges from 0 to 255, white is 255, and black is 0, so black and white pictures are also called grayscale images, which are widely used in the fields of medicine and image recognition.

可選的,上述預處理還可以對上述第二圖像的圖像大小、圖像解析度、圖像格式等圖像參數進行統一。比如,可以對第二圖像進行剪裁,獲得預設圖像尺寸的第一圖像,比如統一為256*256尺寸的第一圖像。電子設備還可以儲存有預設圖像大小和/或預設圖像格式,在預處理時可以轉換獲得滿足上述預設圖像大小和/或預設圖像格式的第一圖像。Optionally, the preprocessing may further unify image parameters such as image size, image resolution, and image format of the second image. For example, the second image may be cropped to obtain a first image with a preset image size, for example, a first image with a uniform size of 256*256. The electronic device may also store a preset image size and/or a preset image format, and may convert a first image that satisfies the preset image size and/or preset image format during preprocessing.

電子設備可以借助圖像超解析度(Image Super Resolution)以及圖像轉換等技術,將不同病理組織、不同成像設備獲取的多模態病理圖像進行統一,使它們可以作為本申請實施例中的圖像處理流程的輸入。此步驟也可以稱為圖像的歸一化過程。轉換為統一風格的圖像,更便於後續對圖像的統一處理。The electronic device can unify the multimodal pathological images obtained by different pathological tissues and different imaging devices with the help of technologies such as Image Super Resolution (Image Super Resolution) and image conversion, so that they can be used as the images in the embodiments of the present application. Input to the image processing pipeline. This step can also be referred to as the normalization process of the image. Converting to an image of a unified style is more convenient for subsequent unified processing of the image.

圖像超解析度技術是指用圖像處理的方法,通過軟體算法(強調不變動成像硬體設備)的方式將已有的低解析度(LR)圖像轉換成高解析度(HR)圖像的技術,可分為超解析度復原和超解析度圖像重建(Super resolution image reconstruction,SRIR)。目前,圖像超解析度研究可分為三個主要範疇:基於插值、基於重建和基於學習的方法。超解析度重建的核心思想就是用時間帶寬(獲取同一場景的多幀圖像序列)換取空間解析度,實現時間解析度向空間解析度的轉換。通過上述預處理可以獲得高解析度的第一圖像,對於醫生做出正確的診斷是非常有幫助的,如果能夠提供高分辨的圖像,電腦視覺中的模式識別的性能也就會大大提高。Image super-resolution technology refers to the use of image processing methods to convert existing low-resolution (LR) images into high-resolution (HR) images by means of software algorithms (emphasis on unchanged imaging hardware). Image technology can be divided into super-resolution restoration and super-resolution image reconstruction (Super resolution image reconstruction, SRIR). Currently, image super-resolution research can be divided into three main categories: interpolation-based, reconstruction-based, and learning-based methods. The core idea of super-resolution reconstruction is to exchange temporal bandwidth (obtaining multiple frame image sequences of the same scene) for spatial resolution, so as to realize the conversion from temporal resolution to spatial resolution. Through the above preprocessing, a high-resolution first image can be obtained, which is very helpful for doctors to make a correct diagnosis. If high-resolution images can be provided, the performance of pattern recognition in computer vision will be greatly improved. .

202、對上述第一圖像進行處理,獲得上述第一圖像中多個像素點的預測結果,上述預測結果包括語義預測結果、中心相對位置預測結果和中心區域預測結果,其中,上述語義預測結果指示上述像素點位於實例區域或背景區域,上述中心相對位置預測結果指示上述像素點與實例中心之間的相對位置,上述中心區域預測結果指示上述像素點是否位於上述實例中心區域。202. Process the first image to obtain prediction results of multiple pixels in the first image, where the prediction results include semantic prediction results, center relative position prediction results, and center area prediction results, wherein the semantic prediction results The result indicates that the pixel point is located in the instance area or the background area, the center relative position prediction result indicates the relative position between the pixel point and the instance center, and the center area prediction result indicates whether the pixel point is located in the instance center area.

其中,上述步驟202可以參考圖1所示實施例的步驟101中的具體描述,此處不再贅述。The above step 202 may refer to the specific description in step 101 of the embodiment shown in FIG. 1 , and details are not repeated here.

203、基於上述多個像素點中每個像素點的語義預測結果,從上述多個像素點中確定位於實例區域的至少一個第一像素點。203. Based on the semantic prediction result of each pixel point in the plurality of pixel points, determine at least one first pixel point located in the instance region from the plurality of pixel points.

基於上述多個像素點中每個像素點的語義預測結果,可以判斷出每個像素點位於實例區域還是背景區域,從而可以從上述多個像素點中確定位於上述實例區域的至少一個第一像素點。Based on the semantic prediction result of each pixel in the plurality of pixels, it can be determined whether each pixel is located in the instance area or the background area, so that at least one first pixel located in the instance area can be determined from the plurality of pixels point.

上述實例區域可以理解為實例所在的區域,背景區域為圖像中除實例以外的其他區域。比如,假設第一圖像為細胞圖像,則像素點的語義預測結果可以包括用於指示像素點在細胞圖像中為細胞核區域還是背景區域的指示信息。在本公開實施例中,可以通過多種方式指示像素點為實例區域還是背景區域。一些可能的實施方式中,像素點的語義預測結果可以為兩個預設數值中的一個,其中,這兩個預設數值分別對應於實例區域和背景區域。例如,像素點的語義預測結果可以為0或正整數(例如1),其中,0表示背景區域,正整數(例如1)表示實例區域,但本公開實施例不限於此。The above instance area can be understood as the area where the instance is located, and the background area is other areas in the image other than the instance. For example, assuming that the first image is a cell image, the semantic prediction result of the pixel point may include indication information for indicating whether the pixel point is a nucleus region or a background region in the cell image. In the embodiment of the present disclosure, whether the pixel point is an instance area or a background area may be indicated in various ways. In some possible implementations, the semantic prediction result of the pixel point may be one of two preset values, wherein the two preset values correspond to the instance area and the background area, respectively. For example, the semantic prediction result of a pixel point may be 0 or a positive integer (eg, 1), where 0 represents a background area, and a positive integer (eg, 1) represents an instance area, but the embodiment of the present disclosure is not limited thereto.

204、基於上述多個像素點中每個像素點的中心區域預測結果,確定上述第一圖像的至少一個實例中心區域。204. Determine at least one instance center region of the first image based on the prediction result of the center region of each pixel point in the plurality of pixel points.

具體的,可以將實例中心所屬的一小塊區域定義為實例中心區域,即實例中心區域是在該實例區域內並且小於該實例區域的區域,並且該實例中心區域的幾何中心與該實例區域的幾何中心重疊或鄰近,例如,實例中心區域的中心為實例中心。可選地,該實例中心區域可以為圓形、橢圓或其他形狀,上述實例中心區域可以根據需要進行設置,本申請實施例對實例中心區域的具體實現不做限制。Specifically, a small area to which the instance center belongs can be defined as the instance center area, that is, the instance center area is an area within the instance area and smaller than the instance area, and the geometric center of the instance center area is the same as the instance area. The geometric centers overlap or are adjacent, for example, the center of the instance center area is the instance center. Optionally, the central area of the instance may be a circle, an ellipse, or other shapes, and the central area of the above instance may be set as required, and the embodiment of the present application does not limit the specific implementation of the central area of the instance.

上述中心相對位置預測結果可以指示上述像素點與實例中心之間的相對位置。在一個例子中,像素點的中心相對位置預測結果可以包括像素點的中心向量預測結果,例如,像素點的中心相對位置預測結果為(x,y),分別表示像素點的坐標與實例中心的坐標在橫軸和縱軸上的差值。可選地,像素點的中心相對位置預測結果還可以通過其他方式實現,本公開實施例對此不做限定。The above-mentioned relative position prediction result of the center may indicate the relative position between the above-mentioned pixel point and the center of the instance. In an example, the prediction result of the relative center position of the pixel point may include the prediction result of the center vector of the pixel point. For example, the prediction result of the relative center position of the pixel point is (x, y), which respectively represent the coordinates of the pixel point and the center of the instance. The difference between the coordinates on the horizontal and vertical axes. Optionally, the prediction result of the relative center position of the pixel point may also be achieved in other manners, which is not limited in this embodiment of the present disclosure.

本申請實施例中上述中心區域預測結果可以指示上述像素點是否位於實例中心區域,由此可以通過參考中心區域預測結果,確定位於實例中心區域的像素點,而這些像素點可以組成實例中心區域,由此可以確定出上述至少一個實例中心區域。In this embodiment of the present application, the above-mentioned central area prediction result may indicate whether the above-mentioned pixel points are located in the central area of the instance. Therefore, the pixels located in the central area of the instance may be determined by referring to the central area prediction result, and these pixels may form the central area of the instance. Thereby, the above-mentioned at least one example central region can be determined.

可選的,可以基於所述多個像素點中每個像素點的中心區域預測結果,對所述第一圖像進行連通域搜索處理,得到至少一個實例中心區域。Optionally, based on the prediction result of the center area of each pixel point in the plurality of pixel points, a connected domain search process may be performed on the first image to obtain at least one instance center area.

其中,連通區域(Connected Component)一般是指圖像中具有相同像素點值且位置相鄰的前景像素點組成的圖像區域(Region,Blob)。上述連通域搜索可以理解為連通區域分析(Connected Component Analysis,Connected Component Labeling),用於將圖像中的各個連通區域找出並標記。Among them, the connected region (Connected Component) generally refers to the image region (Region, Blob) composed of foreground pixels with the same pixel value and adjacent positions in the image. The above connected domain search can be understood as connected region analysis (Connected Component Analysis, Connected Component Labeling), which is used to find and label each connected region in the image.

連通區域分析是一種在國際電腦視覺與模式識別會議(Conference on Computer Vision and Pattern Recognition,CVPR)和圖像分析處理的眾多應用領域中較為常用和基本的方法。例如:光學字元辨識(Optical Character Recognition,OCR)識別中字元分割提取(車牌識別、文本識別、字幕識別等)、視覺跟蹤中的運動前景目標分割與提取(行人入侵檢測、遺留物體檢測、基於視覺的車輛檢測與跟蹤等)、醫學圖像處理(感興趣目標區域提取)等等。也就是說,在需要將前景目標提取出來以便後續進行處理的應用場景中都能夠用到連通區域分析方法,通常連通區域分析處理的對象是一張二值化後的圖像(二值圖像)。Connected region analysis is a commonly used and basic method in many application fields of the International Conference on Computer Vision and Pattern Recognition (CVPR) and image analysis and processing. For example: character segmentation and extraction in Optical Character Recognition (OCR) recognition (license plate recognition, text recognition, subtitle recognition, etc.), segmentation and extraction of moving foreground targets in visual tracking (pedestrian intrusion detection, legacy object detection, based on Visual vehicle detection and tracking, etc.), medical image processing (extraction of target regions of interest), etc. That is to say, the connected area analysis method can be used in application scenarios where foreground objects need to be extracted for subsequent processing. Usually, the object of connected area analysis and processing is a binarized image (binary image ).

對於集合S存在一條通路的條件是,通路的像素點的某種排列使得相鄰像素點滿足某種鄰接關係。例如,假設點p到點q之間有A1、A2、A3.....An個像素點,且相鄰像素點都滿足某種鄰接。則p和q間存在通路。如果通路首尾相連,則稱閉合通路。S集合中的一點p只存在一條通路,則稱為一個連通分量,如果S只有一個連通分量,則稱為一個連通集。The condition for the existence of a path for the set S is that a certain arrangement of the pixel points of the path makes the adjacent pixel points satisfy a certain adjacency relationship. For example, suppose there are A1, A2, A3...An pixels between point p and point q, and the adjacent pixels all satisfy a certain adjacency. Then there is a path between p and q. If the passages are connected end to end, it is called a closed passage. A point p in the set of S has only one path, it is called a connected component, and if S has only one connected component, it is called a connected set.

對於R為一個圖像子集,如果R連通的,則稱R為一個區域。對於所有不連接的K個區域,其並集Rk構成了圖像的前景,Rk的補集稱為背景。For R is an image subset, if R is connected, then R is called a region. For all K regions that are not connected, their union Rk constitutes the foreground of the image, and the complement of Rk is called the background.

基於上述每個像素點的中心區域預測結果,對上述第一圖像進行連通域搜索處理,可以得到至少一個實例中心區域,再執行步驟205。Based on the prediction result of the center area of each pixel point, the connected domain search process is performed on the first image, and at least one instance center area can be obtained, and then step 205 is performed.

具體的,對於二值化處理後的第一圖像,可以找中心區域為1的連通域,以確定實例中心區域,為每個連通域分配一個獨立ID。Specifically, for the first image after binarization, a connected domain with a central region of 1 can be found to determine the central region of the instance, and an independent ID is assigned to each connected domain.

對於細胞分割,可以基於細胞核中的像素點的坐標和表示該像素點相對於所屬實例的中心的位置關係的中心向量,確定上述中心向量的指向位置是否處於上述中心區域,若像素點的中心向量的指向位置處於中心區域,則為該像素點分配細胞核的ID,否則,表示該像素點不屬於任意一個細胞核,則可以就近分配。For cell segmentation, it can be determined whether the pointing position of the above-mentioned center vector is in the above-mentioned central area based on the coordinates of the pixel in the nucleus and the center vector representing the positional relationship of the pixel with respect to the center of the instance to which it belongs. If the pointing position is in the central area, the ID of the cell nucleus is assigned to the pixel point, otherwise, it means that the pixel point does not belong to any cell nucleus, and it can be assigned nearby.

可選的,可以使用隨機遊走算法對所述第一圖像進行連通域搜索處理,得到至少一個實例中心區域。Optionally, a random walk algorithm may be used to perform a connected domain search process on the first image to obtain at least one instance central region.

隨機遊走(random walk)也稱隨機漫步,隨機行走等,是指基於過去的表現,無法預測將來的發展步驟和方向。隨機遊走的核心概念是指任何無規則行走者所帶的守恆量都各自對應著一個擴散運輸定律,接近於布朗運動,是布朗運動理想的數學狀態。本申請實施例中針對圖像處理的隨機遊走(random walk)的基本思想是,將圖像看成由固定的頂點和邊組成的連通帶權無向圖,從未標記頂點開始隨機漫步,首次到達各類標記頂點的機率代表了未標記點歸屬於標記類的可能性,把最大的機率所在類的標簽賦給未標記頂點,完成分割。通過上述隨機遊走算法可以實現對不屬於任意一個中心區域的像素的分配,以獲得上述至少一個實例中心區域。Random walk, also known as random walk, random walk, etc., refers to the inability to predict future development steps and directions based on past performance. The core concept of random walk is that the conserved quantity carried by any random walker corresponds to a law of diffusion and transportation, which is close to Brownian motion and is the ideal mathematical state of Brownian motion. The basic idea of the random walk for image processing in this embodiment of the present application is to regard the image as a connected weighted undirected graph composed of fixed vertices and edges, and randomly walk from unmarked vertices. The probability of reaching various marked vertices represents the possibility that the unmarked point belongs to the marked class, and the label of the class with the greatest probability is assigned to the unmarked vertex to complete the segmentation. The above-mentioned random walk algorithm can realize the assignment of pixels that do not belong to any central area, so as to obtain the above-mentioned at least one instance central area.

可選的,可以通過上述深度層級融合網路模型輸出像素點連接圖,在上述連通域搜索處理後可以得出實例分割結果。可選的,可以在上述實例分割結果中對每個實例區域賦予隨機色彩以便於可視化。Optionally, a pixel point connection graph can be output through the above-mentioned deep-level fusion network model, and an instance segmentation result can be obtained after the above-mentioned connected domain search processing. Optionally, random colors can be assigned to each instance region in the above instance segmentation result for easy visualization.

其中,上述步驟203和步驟204也可以不分先後次序執行;在確定上述至少一個實例中心區域之後,可以執行步驟205。Wherein, the above-mentioned steps 203 and 204 may also be performed in no particular order; after the above-mentioned at least one instance central region is determined, step 205 may be performed.

205、基於上述至少一個第一像素點中每個第一像素點的中心相對位置預測結果,從上述至少一個實例中心區域中確定上述每個第一像素點對應的實例中心區域。205 . Based on the prediction result of the relative center position of each first pixel in the at least one first pixel, determine an example center region corresponding to each first pixel from the at least one example center region.

具體的,可以基於上述第一像素點的位置信息和上述第一像素點的中心相對位置預測結果,確定上述第一像素點的中心預測位置。Specifically, the predicted position of the center of the first pixel can be determined based on the position information of the first pixel and the prediction result of the relative position of the center of the first pixel.

在步驟202中可以獲得像素點的位置信息,具體可以為像素點的坐標,而上述第一像素點為位於上述實例區域的像素點,上述第一像素點的中心相對位置預測結果指示上述第一像素點與實例中心之間的相對位置,可見根據上述第一像素點的坐標和上述第一像素點的中心相對位置預測結果,可以確定上述第一像素點的中心預測位置。上述中心預測位置可以指示預測的上述第一像素點所屬的實例中心區域的中心位置。In step 202, the position information of the pixel point can be obtained, which can be the coordinates of the pixel point, and the first pixel point is the pixel point located in the example area, and the prediction result of the relative position of the center of the first pixel point indicates the first pixel point. For the relative position between the pixel point and the center of the instance, it can be seen that the predicted center position of the first pixel point can be determined according to the coordinates of the first pixel point and the prediction result of the relative position of the center of the first pixel point. The above-mentioned central predicted position may indicate the central position of the central region of the instance to which the above-mentioned predicted first pixel point belongs.

進一步地,基於上述第一像素點的中心預測位置和上述至少一個實例中心區域的位置信息,可以從上述至少一個實例中心區域中確定上述第一像素點對應的實例中心區域。Further, based on the predicted center position of the first pixel point and the position information of the at least one instance center area, the instance center area corresponding to the first pixel point may be determined from the at least one instance center area.

在步驟204中,獲得上述實例中心區域時,可以獲得上述實例中心區域的位置信息,也可以由坐標表示,進而可以基於第一像素點的中心預測位置和至少一個實例中心區域的位置信息,判斷上述第一像素點的中心預測位置是否屬於上述至少一個實例中心區域,以此從上述至少一個實例中心區域中確定第一像素點對應的實例中心區域。In step 204, when obtaining the central area of the above instance, the position information of the central area of the above instance can be obtained, which can also be represented by coordinates, and then can be determined based on the predicted position of the center of the first pixel and the position information of the central area of at least one instance. Whether the predicted center position of the first pixel belongs to the at least one instance center area, the instance center area corresponding to the first pixel is determined from the at least one instance center area.

具體的,可以響應於上述第一像素點的中心預測位置屬於上述至少一個實例中心區域中的第一實例中心區域,將上述第一實例中心區域確定為上述第一像素點對應的實例中心區域。Specifically, the first instance central area may be determined as the instance central area corresponding to the first pixel in response to that the predicted center position of the first pixel belongs to the first instance central area in the at least one instance central area.

若上述第一像素點的中心預測位置屬於上述至少一個實例中心區域中的第一實例中心區域,將上述第一實例中心區域確定為上述第一像素點對應的實例中心區域,可以將該像素點分配給該實例中心區域。If the predicted center position of the above-mentioned first pixel belongs to the first instance central area in the above-mentioned at least one instance central area, the above-mentioned first instance central area is determined as the instance central area corresponding to the above-mentioned first pixel point, and the pixel point can be Assigned to the central region of this instance.

可選的,響應於所述第一像素點的中心預測位置不屬於所述至少一個實例中心區域中的任意實例中心區域,將所述至少一個實例中心區域中與所述第一像素點的中心預測位置距離最近的實例中心區域確定為所述第一像素點對應的實例中心區域。Optionally, in response to that the predicted center position of the first pixel does not belong to any instance central area in the at least one instance central area, the at least one instance central area is compared with the center of the first pixel. The instance central area with the closest predicted position distance is determined as the instance central area corresponding to the first pixel point.

若上述第一像素點的中心預測位置不屬於上述至少一個實例中心區域中的第一實例中心區域,則不將該像素點分配給上述第一實例中心區域,而是就近分配,將至少一個實例中心區域中與第一像素點的中心預測位置距離最近的實例中心區域確定為該第一像素點對應的實例中心區域。If the predicted center position of the above-mentioned first pixel does not belong to the central area of the first instance in the above-mentioned at least one instance central area, the pixel is not allocated to the above-mentioned first instance central area, but is allocated nearby, and the at least one instance The instance central area in the central area that is closest to the predicted center position of the first pixel is determined as the instance central area corresponding to the first pixel.

本申請實施例在上述步驟202的輸出可以有三個分支,第一個是語義判斷分支,包含2個通道,以輸出每個像素點位於實例區域或者背景區域;第二個是中心區域分支,包含2個通道,以輸出每個像素點位於中心區域或者非中心區域;第三個是中心向量分支,包括2個通道,以輸出每個像素點與實例中心之間的相對位置,具體可以包含像素點指向其所屬實例的幾何中心的向量橫縱分量。The output of the above-mentioned step 202 in this embodiment of the present application may have three branches. The first is the semantic judgment branch, including two channels, to output that each pixel is located in the instance area or the background area; the second is the center area branch, including 2 channels to output each pixel in the central area or non-central area; the third is the center vector branch, including 2 channels, to output the relative position between each pixel and the center of the instance, which can include pixels The vertical and horizontal components of the vector that point to the geometric center of the instance to which it belongs.

在本申請實施例中實例分割對象可以為細胞核,由於上述中心區域為一個細胞核的中心區域,在確定上述中心區域後,實際初步確定了細胞核的位置,可以為每個細胞核分配數字編號,即上述實例ID。In the embodiment of the present application, the instance segmentation object may be a cell nucleus. Since the above-mentioned central area is the central area of a cell nucleus, after the above-mentioned central area is determined, the position of the cell nucleus is actually preliminarily determined, and a numerical number can be assigned to each cell nucleus, that is, the above-mentioned Instance ID.

具體的,設輸入的第二圖片為[高,寬,3]的3通道圖片,本申請實施例在步驟202可以得到三個[高,寬,2]的數組,依次為每個像素點的語義預測機率、中心區域預測機率和中心相對位置預測結果。然後,可以對上述中心區域預測機率進行門限值為0.5的二值化,再通過上述連通域搜索處理得到每個細胞核的中心區域,並且賦予其獨立的數字編號,上述每個細胞分配的數字編號即為前述實例ID,以便於區分不同細胞核。Specifically, assuming that the input second picture is a 3-channel picture of [height, width, 3], in this embodiment of the present application, in step 202, three arrays of [height, width, 2] may be obtained, which are in turn of each pixel. Semantic prediction probability, center region prediction probability, and center relative position prediction results. Then, the prediction probability of the central region can be binarized with a threshold value of 0.5, and then the central region of each cell nucleus can be obtained through the above-mentioned connected domain search processing, and given an independent digital number, the above-mentioned digital number assigned to each cell That is, the aforementioned instance ID, in order to distinguish different nuclei.

比如在步驟203中已經確定一個像素點a的語義預測結果為細胞核而非背景(確定其屬於細胞核語義區域),在步驟202中已經獲得了該像素點a的中心向量,若該像素點a的中心向量指向在步驟204中獲得的至少一個實例中心區域中的第一中心區域,則說明該像素點a與該第一中心區域有對應關係,具體表現為,該像素點a屬於該第一中心區域所在的細胞核A,第一中心區域為該細胞核A的中心區域。For example, in step 203, it has been determined that the semantic prediction result of a pixel a is the nucleus instead of the background (it is determined that it belongs to the semantic region of the nucleus), and the center vector of the pixel a has been obtained in step 202. The center vector points to the first center area in the center area of at least one instance obtained in step 204, which means that the pixel point a has a corresponding relationship with the first center area, and the specific performance is that the pixel point a belongs to the first center The cell nucleus A where the region is located, and the first central region is the central region of the cell nucleus A.

以細胞分割為例,通過上述步驟,可以分割出細胞核與圖像背景,具體可以對全部屬於細胞核的像素點進行分配,確定每個像素點所屬的細胞核、所屬的細胞核中心區域或者所述的細胞核的中心,實現對細胞進行更精準的分割,獲得精確的實例分割結果。Taking cell segmentation as an example, through the above steps, the nucleus and the image background can be segmented. Specifically, all the pixels belonging to the nucleus can be allocated, and the nucleus to which each pixel belongs, the nucleus center area to which it belongs, or the nucleus can be determined. to achieve more accurate segmentation of cells and obtain accurate instance segmentation results.

本申請實施例中使用中心向量來建模。FCN將部分實例收縮為邊界類,然後使用針對性的後處理算法來修整邊界所屬實例的預測,每個像素點三類輸出:背景、細胞核內部、細胞核邊界,不能細緻處理邊界預測,相比之下,中心向量可以基於數據更精確的預測細胞核的邊界狀態,也無需複雜的專業後處理算法。MaskRCNN先通過矩形截取出每個獨立實例的圖像再進行細胞、背景的二類預測,但細胞表現為聚集在一起的多個不規則類橢圓形,矩形截取後一個實例處於中心,別的實例仍然部分處於邊緣,無法避免的要包含別的實例的細胞在截取圖片中,不利於接下來的二類分割,相比之下,通過上述中心向量建模方法也不會有這類問題,中心向量可以對於細胞核邊界得出精確的預測,從而提高了整體預測精度。In the embodiment of the present application, the center vector is used for modeling. FCN shrinks some instances into boundary classes, and then uses targeted post-processing algorithms to trim the predictions of the instances to which the boundaries belong. Each pixel has three types of output: background, nucleus interior, and nucleus boundary. It cannot handle the boundary prediction in detail. In this way, the center vector can more accurately predict the boundary state of the nucleus based on the data, and does not require complex professional post-processing algorithms. MaskRCNN first cuts out the image of each independent instance through a rectangle, and then performs the second-class prediction of cells and backgrounds, but the cells appear as multiple irregular ovals that are clustered together. It is still partly on the edge, and it is inevitable that cells containing other instances will be included in the captured image, which is not conducive to the next two-class segmentation. In contrast, the above center vector modeling method will not have such problems. The vectors can lead to accurate predictions for the nucleus boundaries, thereby improving the overall prediction accuracy.

使用本申請實施例中的中心向量方法,不僅運行速度快,可以達到每秒3圖的處理量,而且無需從業人員較高的領域知識,就能在任意實例分割問題中獲取一定標注數據後處理取得較好的結果。Using the center vector method in the embodiment of the present application, not only the running speed is fast, the processing capacity of 3 images per second can be achieved, but also certain annotation data can be obtained in any instance segmentation problem without the need for high domain knowledge of practitioners. get better results.

本申請實施例可以應用於臨床的輔助診斷中。醫生在獲得了病人的器官組織切片數位掃描圖像後,可以將圖像輸入本申請實施例中的流程,得出每一個獨立細胞核的像素點遮罩,醫生可以以此為依據,計算該器官的細胞密度、細胞形態特徵,進而得出更準確的醫學判斷。The embodiments of the present application can be applied to clinical auxiliary diagnosis. After obtaining the digitally scanned image of the patient's organ tissue slice, the doctor can input the image into the process in the embodiment of the present application to obtain the pixel mask of each independent cell nucleus. The doctor can use this as a basis to calculate the organ. cell density and cell morphological characteristics, and then draw more accurate medical judgments.

本申請實施例通過對第二圖像進行預處理,得到第一圖像,以使得上述第一圖像滿足預設對比度和/或預設灰度值,對上述第一圖像進行處理,獲得上述第一圖像中多個像素點的預測結果,上述預測結果包括語義預測結果、中心相對位置預測結果和中心區域預測結果,其中,上述語義預測結果指示上述像素點位於實例區域或背景區域,上述中心相對位置預測結果指示上述像素點與實例中心之間的相對位置,上述中心區域預測結果指示上述像素點是否位於實例中心區域,再基於上述多個像素點中每個像素點的語義預測結果,從上述多個像素點中確定位於實例區域的至少一個第一像素點,並且基於上述多個像素點中每個像素點的中心區域預測結果,確定上述第一圖像的至少一個實例中心區域,基於上述至少一個第一像素點中每個第一像素點的中心相對位置預測結果,以及從上述至少一個實例中心區域中確定上述每個第一像素點對應的實例中心區域,實現實例的精準分割,可以使圖像處理中的實例分割具備速度快、精度高的優點。In this embodiment of the present application, the first image is obtained by preprocessing the second image, so that the first image satisfies the preset contrast and/or the preset gray value, and the first image is processed to obtain the first image. The prediction results of a plurality of pixel points in the above-mentioned first image, the above-mentioned prediction results include semantic prediction results, center relative position prediction results and central area prediction results, wherein the semantic prediction results indicate that the pixel points are located in the instance area or the background area, The above-mentioned relative position prediction result of the center indicates the relative position between the above-mentioned pixel and the center of the instance, the above-mentioned central area prediction result indicates whether the above-mentioned pixel is located in the central area of the instance, and then based on the semantic prediction result of each pixel in the above-mentioned multiple pixels , determine at least one first pixel point located in the example area from the above-mentioned multiple pixel points, and determine at least one example center area of the above-mentioned first image based on the prediction result of the center area of each pixel point in the above-mentioned multiple pixel points , based on the prediction result of the relative position of the center of each first pixel point in the above at least one first pixel point, and from the above at least one instance center area, determine the instance center area corresponding to each first pixel point above, so as to realize the accuracy of the instance Segmentation can make instance segmentation in image processing have the advantages of high speed and high precision.

請參閱圖3,圖3是本申請實施例公開的一種細胞實例分割結果示意圖,如圖所示,以細胞實例分割為例,使用本申請實施例中的方法進行處理,同時具備速度快、精度高的特點。結合圖3可以便於更清楚地理解圖1和圖2所述實施例中的方法。通過深度層級融合網路模型可以獲得更準確的預測指標,使用已有數據集對其進行標注,前述實施例中的語義預測結果、中心區域預測結果和中心相對位置預測結果,體現在圖3中分別包括對像素點A、像素點B、像素點C和像素點D的語義標注、中心標注和中心向量標注。如圖所示一個細胞核可包括細胞核語義區域和細胞核中心區域,針對圖中像素點,若像素點的語義標注為1,說明該像素點屬於細胞核,為0則為圖像背景;若像素點的中心標注為1則說明該像素點為細胞核區域的中心,此時該像素點的中心向量標注為(0,0),可作為其他像素點的參考(比如圖中的像素點A和像素點D,像素點A的確定也可以代表一個細胞核的確定)。每個像素點都對應一個坐標,而中心向量標注則是像素點相對於細胞核中心的像素點的坐標,比如像素點B相對於像素點A的中心向量標注為(-5,-5),而屬中心的像素點的中心向量標注則為(0,0),比如像素點A和像素點D。在本申請實施例中可以判斷出上述像素點B屬於上述像素點A所屬的細胞核中心區域,即將像素點B分配給像素點A所屬的細胞核區域,但不在該中心區域內而是在上述細胞核語義區域內,類似地完成全部分割過程,獲得精確的細胞實例分割結果。Please refer to FIG. 3 . FIG. 3 is a schematic diagram of a cell instance segmentation result disclosed in the embodiment of the present application. As shown in the figure, taking the cell instance segmentation as an example, the method in the embodiment of the present application is used for processing, which has high speed and precision at the same time. high characteristic. In conjunction with FIG. 3 , it may facilitate a clearer understanding of the methods in the embodiments described in FIGS. 1 and 2 . More accurate prediction indicators can be obtained through the deep-level fusion network model, and the existing data sets are used to mark them. The semantic prediction results, the center area prediction results and the center relative position prediction results in the foregoing embodiment are shown in Figure 3 It includes semantic annotation, center annotation and center vector annotation of pixel point A, pixel point B, pixel point C and pixel point D, respectively. As shown in the figure, a cell nucleus can include the nucleus semantic area and the nucleus center area. For the pixel in the figure, if the semantic label of the pixel is 1, it means that the pixel belongs to the nucleus, and if it is 0, it is the image background; If the center is marked as 1, it means that the pixel is the center of the nucleus area. At this time, the center vector of the pixel is marked as (0, 0), which can be used as a reference for other pixels (such as pixel A and pixel D in the figure). , the determination of pixel A can also represent the determination of a cell nucleus). Each pixel corresponds to a coordinate, and the center vector label is the coordinate of the pixel relative to the pixel at the center of the nucleus. For example, the center vector of pixel B relative to pixel A is labeled (-5, -5), and The center vector label of the center pixel is (0, 0), such as pixel A and pixel D. In the embodiment of the present application, it can be determined that the pixel point B belongs to the central area of the cell nucleus to which the pixel point A belongs, that is, the pixel point B is allocated to the nucleus area to which the pixel point A belongs, but not in the central area but in the nucleus semantics of the above-mentioned cell. In the region, the entire segmentation process is similarly completed to obtain accurate cell instance segmentation results.

上述主要從方法側執行過程的角度對本申請實施例的方案進行了介紹。可以理解的是,電子設備為了實現上述功能,其包含了執行各個功能相應的硬體結構和/或軟體模塊。本領域技術人員應該很容易意識到,結合本文中所公開的實施例描述的各示例的單元及算法步驟,本申請能夠以硬體或硬體和電腦軟體的結合形式來實現。某個功能究竟以硬體還是電腦軟體驅動硬體的方式來執行,取決於技術方案的特定應用和設計約束條件。專業技術人員可以對特定的應用使用不同方法來實現所描述的功能,但是這種實現不應認為超出本申請的範圍。The foregoing mainly introduces the solutions of the embodiments of the present application from the perspective of the method-side execution process. It can be understood that, in order to realize the above-mentioned functions, the electronic device includes corresponding hardware structures and/or software modules for executing each function. Those skilled in the art should easily realize that the present application can be implemented in the form of hardware or a combination of hardware and computer software, in conjunction with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for a particular application, but such implementations should not be considered beyond the scope of this application.

本申請實施例可以根據上述方法示例對電子設備進行功能單元的劃分,例如,可以對應各個功能劃分各個功能單元,也可以將兩個或兩個以上的功能集成在一個處理單元中。上述集成的單元既可以採用硬體的形式實現,也可以採用軟體功能單元的形式實現。需要說明的是,本申請實施例中對單元的劃分是示意性的,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式。In this embodiment of the present application, the electronic device may be divided into functional units according to the foregoing method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software functional units. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and other division methods may be used in actual implementation.

請參閱圖4,圖4是本申請實施例公開的一種電子設備的結構示意圖。如圖4所示,該電子設備400包括:預測模塊410和分割模塊420,其中:所述預測模塊410,用於對第一圖像進行處理,獲得所述第一圖像中多個像素點的預測結果,所述預測結果包括語義預測結果和中心相對位置預測結果,其中,所述語義預測結果指示所述像素點位於實例區域或背景區域,所述中心相對位置預測結果指示所述像素點與實例中心之間的相對位置。Please refer to FIG. 4 , which is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. As shown in FIG. 4 , the electronic device 400 includes: a prediction module 410 and a segmentation module 420, wherein: the prediction module 410 is configured to process the first image to obtain a plurality of pixel points in the first image The prediction result includes a semantic prediction result and a center relative position prediction result, wherein the semantic prediction result indicates that the pixel point is located in the instance area or the background area, and the center relative position prediction result indicates that the pixel point is located The relative position to the center of the instance.

所述分割模塊420,用於基於所述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定所述第一圖像的實例分割結果。The segmentation module 420 is configured to determine an instance segmentation result of the first image based on the semantic prediction result and the center relative position prediction result of each pixel point in the plurality of pixel points.

可選的,所述電子設備400還包括預處理模塊430,用於對第二圖像進行預處理,得到所述第一圖像,以使得所述第一圖像滿足預設對比度和/或預設灰度值。Optionally, the electronic device 400 further includes a preprocessing module 430 for preprocessing the second image to obtain the first image, so that the first image satisfies a preset contrast and/or Default grayscale value.

可選的,所述分割模塊420包括第一單元421和第二單元422,其中:所述第一單元421,用於基於所述多個像素點中每個像素點的語義預測結果,從所述多個像素點中確定位於實例區域的至少一個第一像素點;所述第二單元422,用於基於所述至少一個第一像素點中每個第一像素點的中心相對位置預測結果,確定所述每個第一像素點所屬的實例。Optionally, the segmentation module 420 includes a first unit 421 and a second unit 422, wherein: the first unit 421 is configured to, based on the semantic prediction result of each pixel point in the plurality of pixel points, Determining at least one first pixel point located in the instance area among the plurality of pixel points; the second unit 422 is configured to predict the result based on the relative position of the center of each first pixel point in the at least one first pixel point, An instance to which each of the first pixel points belongs is determined.

可選的,所述預測結果還包括:中心區域預測結果,所述中心區域預測結果指示所述像素點是否位於實例中心區域,所述分割模塊420還包括第三單元423,用於基於所述多個像素點中每個像素點的中心區域預測結果,確定所述第一圖像的至少一個實例中心區域;所述第二單元422具體用於,基於所述至少一個第一像素點中每個第一像素點的中心相對位置預測結果,從所述至少一個實例中心區域中確定所述每個第一像素點對應的實例中心區域。Optionally, the prediction result further includes: a center area prediction result, where the center area prediction result indicates whether the pixel is located in the instance center area, and the segmentation module 420 further includes a third unit 423, for The center area prediction result of each pixel point in the plurality of pixel points, to determine at least one instance center area of the first image; the second unit 422 is specifically configured to, based on each of the at least one first pixel point, The relative position prediction result of the centers of the first pixel points, and the instance center area corresponding to each first pixel point is determined from the at least one instance center area.

可選的,所述第三單元423具體用於,基於所述多個像素點中每個像素點的中心區域預測結果,對所述第一圖像進行連通域搜索處理,得到至少一個實例中心區域。Optionally, the third unit 423 is specifically configured to perform a connected domain search process on the first image based on the prediction result of the center area of each pixel in the plurality of pixels to obtain at least one instance center. area.

可選的,所述第二單元422具體用於:基於所述第一像素點的位置信息和所述第一像素點的中心相對位置預測結果,確定所述第一像素點的中心預測位置;基於所述第一像素點的中心預測位置和所述至少一個實例中心區域的位置信息,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域。Optionally, the second unit 422 is specifically configured to: determine the center prediction position of the first pixel point based on the position information of the first pixel point and the prediction result of the relative center position of the first pixel point; An example center region corresponding to the first pixel point is determined from the at least one example center region based on the predicted center position of the first pixel point and the position information of the at least one example center region.

可選的,所述第二單元422具體用於:響應於所述第一像素點的中心預測位置屬於所述至少一個實例中心區域中的第一實例中心區域,將所述第一實例中心區域確定為所述第一像素點對應的實例中心區域。Optionally, the second unit 422 is specifically configured to: in response to that the predicted center position of the first pixel belongs to the first instance center area in the at least one instance center area, to assign the first instance center area to the first instance center area. It is determined as the instance central area corresponding to the first pixel point.

可選的,所述第二單元422具體用於:響應於所述第一像素點的中心預測位置不屬於所述至少一個實例中心區域中的任意實例中心區域,將所述至少一個實例中心區域中與所述第一像素點的中心預測位置距離最近的實例中心區域確定為所述第一像素點對應的實例中心區域。Optionally, the second unit 422 is specifically configured to: in response to that the predicted center position of the first pixel point does not belong to any instance center area in the at least one instance center area, place the at least one instance center area into the at least one instance center area. The instance central region in the 100 that is closest to the predicted center position of the first pixel is determined as the instance central region corresponding to the first pixel.

可選的,所述預測模塊410包括機率預測單元411和判斷單元412,其中:所述機率預測單元411,用於對所述第一圖像進行處理,得到所述第一圖像中多個像素點的中心區域預測機率;所述判斷單元412,用於基於第一閾值對所述多個像素點的中心區域預測機率進行二值化處理,得到所述多個像素點中每個像素點的中心區域預測結果。Optionally, the prediction module 410 includes a probability prediction unit 411 and a determination unit 412, wherein: the probability prediction unit 411 is configured to process the first image to obtain multiple The prediction probability of the central area of the pixel point; the judgment unit 412 is configured to perform binarization processing on the prediction probability of the central area of the plurality of pixel points based on the first threshold, to obtain each pixel point in the plurality of pixel points The prediction result of the central area.

可選的,所述預測模塊410具體用於,將第一圖像輸入到神經網路進行處理,輸出所述第一圖像中多個像素點的預測結果。Optionally, the prediction module 410 is specifically configured to input the first image into a neural network for processing, and output prediction results of multiple pixels in the first image.

本申請實施例中使用中心向量來建模。FCN將部分實例收縮為邊界類,然後使用針對性的後處理算法來修整邊界所屬實例的預測,每個像素點三類輸出:背景、細胞核內部、細胞核邊界,不能細緻處理邊界預測,相比之下,中心向量可以基於數據更精確的預測細胞核的邊界狀態,也無需複雜的專業後處理算法。MaskRCNN先通過矩形截取出每個獨立實例的圖像再進行細胞、背景的二類預測,但細胞表現為聚集在一起的多個不規則類橢圓形,矩形截取後一個實例處於中心,別的實例仍然部分處於邊緣,無法避免的要包含別的實例的細胞在截取圖片中,不利於接下來的二類分割,相比之下,通過電子設備400執行上述中心向量建模方法也不會有這類問題,中心向量可以對於細胞核邊界得出精確的預測,從而提高了整體預測精度。In the embodiment of the present application, the center vector is used for modeling. FCN shrinks some instances into boundary classes, and then uses targeted post-processing algorithms to trim the predictions of the instances to which the boundaries belong. Each pixel has three types of output: background, nucleus interior, and nucleus boundary. It cannot handle the boundary prediction in detail. In this way, the center vector can more accurately predict the boundary state of the nucleus based on the data, and does not require complex professional post-processing algorithms. MaskRCNN first cuts out the image of each independent instance through a rectangle, and then performs the second-class prediction of cells and backgrounds, but the cells appear as multiple irregular ovals that are clustered together. It is still partially on the edge, and it is unavoidable that cells of other instances will be included in the captured image, which is not conducive to the next two-class segmentation. In contrast, executing the above center vector modeling method through the electronic device 400 will not have this effect. For class problems, the center vector can make accurate predictions for the nucleus boundaries, thereby improving the overall prediction accuracy.

使用本申請實施例中的電子設備400,可以實現前述圖1和圖2實施例中的圖像處理方法,通過中心向量方法進行實例分割,不僅運行速度快,可以達到每秒3圖的處理量,而且無需從業人員較高的領域知識,就能在任意實例分割問題中獲取一定標注數據後處理取得較好的結果。Using the electronic device 400 in the embodiment of the present application, the image processing method in the above-mentioned embodiments of FIG. 1 and FIG. 2 can be implemented, and instance segmentation is performed by the center vector method, which not only runs fast, but also can achieve a processing capacity of 3 images per second. , and without the need of high domain knowledge of practitioners, it is possible to obtain certain labeled data in any instance segmentation problem and post-processing to achieve better results.

實施圖4所示的電子設備400,電子設備400可以通過對第一圖像進行處理,獲得上述第一圖像中多個像素點的預測結果,上述預測結果包括語義預測結果和中心相對位置預測結果,其中,上述語義預測結果指示上述像素點位於實例區域或背景區域,上述中心相對位置預測結果指示上述像素點與實例中心之間的相對位置,基於上述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定上述第一圖像的實例分割結果,可以使圖像處理中的實例分割具備速度快、精度高的優點。Implementing the electronic device 400 shown in FIG. 4 , the electronic device 400 can process the first image to obtain prediction results of multiple pixels in the first image, where the prediction results include semantic prediction results and center relative position prediction. As a result, the semantic prediction result indicates that the pixel is located in the instance area or the background area, and the center relative position prediction result indicates the relative position between the pixel and the instance center, based on the The semantic prediction result and the center relative position prediction result determine the instance segmentation result of the first image, so that instance segmentation in image processing has the advantages of high speed and high precision.

請參閱圖5,圖5是本申請實施例公開的另一種電子設備的結構示意圖。如圖5所示,該電子設備500包括處理器501和記憶體502,其中,電子設備500還可以包括匯流排503,處理器501和記憶體502可以通過匯流排503相互連接,匯流排503可以是外設部件互連標準(Peripheral Component Interconnect,PCI)匯流排或擴展工業標準結構(Extended Industry Standard Architecture,EISA)匯流排等。匯流排503可以分為地址匯流排、數據匯流排、控制匯流排等。為便於表示,圖5中僅用一條粗線表示,但並不表示僅有一根匯流排或一種類型的匯流排。其中,電子設備500還可以包括輸入輸出設備504,輸入輸出設備504可以包括顯示屏,例如液晶顯示屏。記憶體502用於儲存電腦程式;處理器501用於調用儲存在記憶體502中的電腦程式執行上述圖1和圖2實施例中提到的部分或全部方法步驟。Please refer to FIG. 5 , which is a schematic structural diagram of another electronic device disclosed in an embodiment of the present application. As shown in FIG. 5 , the electronic device 500 includes a processor 501 and a memory 502 , wherein the electronic device 500 may further include a bus bar 503 , the processor 501 and the memory 502 can be connected to each other through the bus bar 503 , and the bus bar 503 can It is a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus bar or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus bar and the like. The bus 503 can be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 5, but it does not mean that there is only one busbar or one type of busbar. The electronic device 500 may further include an input/output device 504, and the input/output device 504 may include a display screen, such as a liquid crystal display screen. The memory 502 is used to store the computer program; the processor 501 is used to call the computer program stored in the memory 502 to execute some or all of the method steps mentioned in the above embodiments of FIG. 1 and FIG. 2 .

實施圖5所示的電子設備500,電子設備500可以通過對第一圖像進行處理,獲得上述第一圖像中多個像素點的預測結果,上述預測結果包括語義預測結果和中心相對位置預測結果,其中,上述語義預測結果指示上述像素點位於實例區域或背景區域,上述中心相對位置預測結果指示上述像素點與實例中心之間的相對位置,基於上述多個像素點中每個像素點的語義預測結果和中心相對位置預測結果,確定上述第一圖像的實例分割結果,可以使圖像處理中的實例分割具備速度快、精度高的優點。Implementing the electronic device 500 shown in FIG. 5 , the electronic device 500 can process the first image to obtain prediction results of multiple pixels in the first image, where the prediction results include semantic prediction results and center relative position prediction. As a result, the semantic prediction result indicates that the pixel is located in the instance area or the background area, and the center relative position prediction result indicates the relative position between the pixel and the instance center, based on the The semantic prediction result and the center relative position prediction result determine the instance segmentation result of the first image, so that instance segmentation in image processing has the advantages of high speed and high precision.

本申請實施例還提供一種電腦儲存介質,其中,該電腦儲存介質用於儲存電腦程式,該電腦程式使得電腦執行如上述方法實施例中記載的任何一種圖像處理方法的部分或全部步驟。Embodiments of the present application further provide a computer storage medium, wherein the computer storage medium is used to store a computer program, and the computer program enables the computer to execute part or all of the steps of any image processing method described in the above method embodiments.

需要說明的是,對於前述的各方法實施例,為了簡單描述,故將其都表述為一系列的動作組合,但是本領域技術人員應該知悉,本申請並不受所描述的動作順序的限制,因為依據本申請,某些步驟可以採用其他順序或者同時進行。其次,本領域技術人員也應該知悉,說明書中所描述的實施例均屬於優選實施例,所涉及的動作和模塊並不一定是本申請所必須的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or concurrently. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

在上述實施例中,對各個實施例的描述都各有側重,某個實施例中沒有詳述的部分,可以參見其他實施例的相關描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

在本申請所提供的幾個實施例中,應該理解到,所揭露的裝置,可通過其它的方式實現。例如,以上所描述的裝置實施例僅僅是示意性的,例如所述單元的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式,例如多個單元或組件可以結合或者可以集成到另一個系統,或一些特徵可以忽略,或不執行。另一點,所顯示或討論的相互之間的耦合或直接耦合或通信連接可以是通過一些介面,裝置或單元的間接耦合或通信連接,可以是電性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.

所述作為分離部件說明的單元(模塊)可以是或者也可以不是物理上分開的,作為單元顯示的部件可以是或者也可以不是物理單元,即可以位於一個地方,或者也可以分佈到多個網路單元上。可以根據實際的需要選擇其中的部分或者全部單元來實現本實施例方案的目的。The units (modules) described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple networks. on the road unit. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申請各個實施例中的各功能單元可以集成在一個處理單元中,也可以是各個單元單獨物理存在,也可以兩個或兩個以上單元集成在一個單元中。上述集成的單元既可以採用硬體的形式實現,也可以採用軟體功能單元的形式實現。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software functional units.

所述集成的單元如果以軟體功能單元的形式實現並作為獨立的產品銷售或使用時,可以儲存在一個電腦可讀取記憶體中。基於這樣的理解,本申請的技術方案本質上或者說對現有技術做出貢獻的部分或者該技術方案的全部或部分可以以軟體產品的形式體現出來,該電腦軟體產品儲存在一個記憶體中,包括若干指令用以使得一台電腦設備(可為個人電腦、服務器或者網路設備等)執行本申請各個實施例所述方法的全部或部分步驟。而前述的記憶體包括:U盤、唯讀記憶體(Read-Only Memory,ROM)、隨機存取記憶體(Random Access Memory,RAM)、移動硬盤、磁碟或者光盤等各種可以儲存程式代碼的介質。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art, or all or part of the technical solution, and the computer software product is stored in a memory, Several instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), mobile hard disk, magnetic disk or CD, etc. medium.

本領域普通技術人員可以理解上述實施例的各種方法中的全部或部分步驟是可以通過程式來指令相關的硬體來完成,該程式可以儲存於一電腦可讀記憶體中,記憶體可以包括:隨身碟、唯讀記憶體、隨機存取器、磁盤或光盤等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: Pen drive, read-only memory, random access device, magnetic disk or CD, etc.

以上對本申請實施例進行了詳細介紹,本文中應用了具體個例對本申請的原理及實施方式進行了闡述,以上實施例的說明只是用於幫助理解本申請的方法及其核心思想;同時,對於本領域的一般技術人員,依據本申請的思想,在具體實施方式及應用範圍上均會有改變之處,綜上所述,本說明書內容不應理解為對本申請的限制。The embodiments of the present application have been introduced in detail above, and the principles and implementations of the present application are described in this paper by using specific examples. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application; at the same time, for Persons of ordinary skill in the art, based on the idea of the present application, will have changes in the specific implementation manner and application scope. In summary, the contents of this specification should not be construed as limitations on the present application.

101、102、201、202、203、204、205:步驟 400、500:電子設備 410:預測模塊 411:機率預測單元 412:判斷單元 420:分割模塊 421:第一單元 422:第二單元 423:第三單元 430:預處理模塊 501:處理器 502:記憶體 503:匯流排 504:輸入輸出設備101, 102, 201, 202, 203, 204, 205: Steps 400, 500: Electronic equipment 410: Prediction Module 411: Probabilistic prediction unit 412: Judgment unit 420: Split Module 421: Unit 1 422: Unit Two 423: Unit 3 430: preprocessing module 501: Processor 502: memory 503: Busbar 504: I/O device

為了更清楚地說明本申請實施例中的技術方案,下面將對實施例中所需要使用的附圖作簡單地介紹。 圖1是本申請實施例公開的一種圖像處理方法的流程示意圖。 圖2是本申請實施例公開的另一種圖像處理方法的流程示意圖。 圖3是本申請實施例公開的一種細胞實例分割結果示意圖。 圖4是本申請實施例公開的一種電子設備的結構示意圖。 圖5是本申請實施例公開的另一種電子設備的結構示意圖。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the accompanying drawings required in the embodiments will be briefly introduced below. FIG. 1 is a schematic flowchart of an image processing method disclosed in an embodiment of the present application. FIG. 2 is a schematic flowchart of another image processing method disclosed in an embodiment of the present application. FIG. 3 is a schematic diagram of a cell instance segmentation result disclosed in an embodiment of the present application. FIG. 4 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. FIG. 5 is a schematic structural diagram of another electronic device disclosed in an embodiment of the present application.

101、102:步驟 101, 102: Steps

Claims (9)

一種圖像處理方法,包括:將第一圖像輸入到深度學習的神經網路進行處理,輸出所述第一圖像中多個像素點各自的預測結果,所述預測結果包括語義預測結果、中心相對位置預測結果和中心區域預測結果,其中,所述語義預測結果指示所述像素點位於實例區域或背景區域,所述中心相對位置預測結果指示所述像素點與實例中心之間的相對位置,所述中心區域預測結果指示所述像素點是否位於實例中心區域;基於所述多個像素點中每個像素點的語義預測結果,從所述多個像素點中確定位於實例區域的至少一個第一像素點;針對每個所述第一像素點,基於所述第一像素點的中心相對位置預測結果和中心區域預測結果,確定所述每個第一像素點所屬的實例。 An image processing method, comprising: inputting a first image into a deep learning neural network for processing, and outputting respective prediction results of multiple pixels in the first image, wherein the prediction results include semantic prediction results, The center relative position prediction result and the center area prediction result, wherein the semantic prediction result indicates that the pixel point is located in the instance area or the background area, and the center relative position prediction result indicates the relative position between the pixel point and the instance center , the central area prediction result indicates whether the pixel point is located in the instance central area; based on the semantic prediction result of each pixel point in the plurality of pixel points, at least one pixel located in the instance area is determined from the plurality of pixel points A first pixel point; for each of the first pixel points, determine the instance to which each first pixel point belongs based on the prediction result of the relative position of the center of the first pixel point and the prediction result of the center area. 如申請專利範圍第1項所述的圖像處理方法,在對第一圖像進行處理之前,還包括:對第二圖像進行預處理,得到所述第一圖像,以使得所述第一圖像滿足預設對比度和/或預設灰度值。 The image processing method according to item 1 of the scope of the application, before processing the first image, further comprising: preprocessing the second image to obtain the first image, so that the first image is An image satisfies a preset contrast ratio and/or a preset grayscale value. 如申請專利範圍第1項所述的圖像處理方法,基於所述第一像素點的中心相對位置預測結果和中心區域預測結果,確定所述第一像素點所屬的實例,包括:基於所述多個像素點中每個像素點的中心區域預測結果,確 定所述第一圖像的至少一個實例中心區域;基於所述第一像素點的中心相對位置預測結果,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域。 According to the image processing method described in item 1 of the scope of the application, determining the instance to which the first pixel belongs based on the prediction result of the relative position of the center of the first pixel and the prediction result of the center area, comprising: based on the The prediction result of the central area of each pixel in multiple pixels, determining at least one instance central area of the first image; and determining an instance central area corresponding to the first pixel point from the at least one instance central area based on the prediction result of the relative center position of the first pixel point. 如申請專利範圍第3項所述的圖像處理方法,基於所述多個像素點中每個像素點的中心區域預測結果,確定所述第一圖像的至少一個實例中心區域,包括:基於所述多個像素點中每個像素點的中心區域預測結果,對所述第一圖像進行連通域搜索處理,得到所述至少一個實例中心區域。 According to the image processing method according to item 3 of the scope of the application, determining at least one instance center region of the first image based on the prediction result of the center region of each pixel point in the plurality of pixel points, comprising: based on For the prediction result of the central area of each pixel point in the plurality of pixel points, a connected domain search process is performed on the first image to obtain the at least one instance central area. 如申請專利範圍第3或4項所述的圖像處理方法,基於所述第一像素點的中心相對位置預測結果,從所述至少一個實例中心區域中確定每個所述第一像素點對應的實例中心區域,包括:基於所述第一像素點的位置信息和所述第一像素點的中心相對位置預測結果,確定所述第一像素點的中心預測位置,所述中心預測位置表示預測的所述第一像素點所屬的實例中心區域的中心位置;基於所述第一像素點的中心預測位置和所述至少一個實例中心區域的位置信息,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域。 According to the image processing method according to claim 3 or 4, based on the prediction result of the relative position of the center of the first pixel point, it is determined from the at least one instance center area that each first pixel point corresponds to The example center area of the The center position of the instance central area to which the first pixel point belongs; based on the predicted center position of the first pixel point and the position information of the at least one instance central area, determine from the at least one instance central area The example center area corresponding to the first pixel point. 如申請專利範圍第5項所述的圖像處理方法,基於所述第一像素點的中心預測位置和所述至少一個實例中心區域的位 置信息,從所述至少一個實例中心區域中確定所述第一像素點對應的實例中心區域,包括:響應於所述第一像素點的中心預測位置屬於所述至少一個實例中心區域中的第一實例中心區域,將所述第一實例中心區域確定為所述第一像素點對應的實例中心區域;或者響應於所述第一像素點的中心預測位置不屬於所述至少一個實例中心區域中的任意實例中心區域,將所述至少一個實例中心區域中與所述第一像素點的中心預測位置距離最近的實例中心區域確定為所述第一像素點對應的實例中心區域。 The image processing method according to item 5 of the scope of the patent application, based on the predicted position of the center of the first pixel point and the position of the center region of the at least one instance and determining the instance central area corresponding to the first pixel point from the at least one instance central area, including: responding to the center prediction position of the first pixel point belonging to the first pixel in the at least one instance central area An instance central area, the first instance central area is determined as the instance central area corresponding to the first pixel point; or in response to the center prediction position of the first pixel point not belonging to the at least one instance central area In any instance central area of the at least one instance central area, the instance central area that is closest to the predicted center position of the first pixel point in the at least one instance central area is determined as the instance central area corresponding to the first pixel point. 一種電子設備,包括:預測模塊,將第一圖像輸入到深度學習的神經網路進行處理,輸出所述第一圖像中多個像素點的預測結果,所述預測結果包括語義預測結果、中心相對位置預測結果和中心區域預測結果,其中,所述語義預測結果指示所述像素點位於實例區域或背景區域,所述中心相對位置預測結果指示所述像素點與實例中心之間的相對位置,所述中心區域預測結果指示所述像素點是否位於實例中心區域;分割模塊,用於基於所述多個像素點中每個像素點的語義預測結果,從所述多個像素點中確定位於實例區域的至少一個第一像素點;針對每個所述第一像素點,基於所述第一像素點的中心相對位置預測結果和中心區域預測結果,確定所述每個第一像素點所屬的實例。 An electronic device, comprising: a prediction module, which inputs a first image into a deep learning neural network for processing, and outputs prediction results of a plurality of pixels in the first image, where the prediction results include semantic prediction results, The center relative position prediction result and the center area prediction result, wherein the semantic prediction result indicates that the pixel point is located in the instance area or the background area, and the center relative position prediction result indicates the relative position between the pixel point and the instance center , the central area prediction result indicates whether the pixel is located in the central area of the instance; the segmentation module is configured to determine, from the plurality of pixel points, based on the semantic prediction result of each pixel point in the plurality of pixel points At least one first pixel point of the instance area; for each of the first pixel points, based on the prediction result of the relative position of the center of the first pixel point and the prediction result of the center area, determine which each first pixel point belongs to. instance. 一種電子設備,包括處理器以及記憶體,所述記憶體用於儲存電腦程式,所述電腦程式被配置成由所述處理器執行,所述處理器用於執行如申請專利範圍第1至6項中任一項所述的圖像處理方法。 An electronic device, comprising a processor and a memory, the memory is used for storing a computer program, the computer program is configured to be executed by the processor, and the processor is used for executing the invention as described in items 1 to 6 of the patent application scope The image processing method described in any one of. 一種電腦可讀儲存介質,所述電腦可讀儲存介質用於儲存電腦程式,其中,所述電腦程式使得電腦執行如申請專利範圍第1至6項中任一項所述的圖像處理方法。 A computer-readable storage medium is used for storing a computer program, wherein the computer program enables a computer to execute the image processing method described in any one of items 1 to 6 of the patent application scope.
TW108133167A 2018-09-15 2019-09-16 Image processing method, electronic device, and storage medium TWI777092B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811077349.XA CN109389129B (en) 2018-09-15 2018-09-15 Image processing method, electronic device and storage medium
CN201811077349.X 2018-09-15

Publications (2)

Publication Number Publication Date
TW202014984A TW202014984A (en) 2020-04-16
TWI777092B true TWI777092B (en) 2022-09-11

Family

ID=65418521

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108133167A TWI777092B (en) 2018-09-15 2019-09-16 Image processing method, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN109389129B (en)
TW (1) TWI777092B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7026826B2 (en) * 2018-09-15 2022-02-28 北京市商▲湯▼科技▲開▼▲發▼有限公司 Image processing methods, electronic devices and storage media
CN110096609A (en) * 2019-03-15 2019-08-06 平安城市建设科技(深圳)有限公司 Source of houses searching method, device, equipment and computer readable storage medium
CN110032985A (en) * 2019-04-22 2019-07-19 清华大学深圳研究生院 A kind of automatic detection recognition method of haemocyte
CN112215790A (en) * 2019-06-24 2021-01-12 杭州迪英加科技有限公司 KI67 index analysis method based on deep learning
CN110288530A (en) * 2019-06-28 2019-09-27 北京金山云网络技术有限公司 A kind of pair of image carries out the processing method and processing device of super-resolution rebuilding
CN111027469B (en) * 2019-12-09 2024-03-01 上海联影智能医疗科技有限公司 Human body part recognition method, computer device, and readable storage medium
CN111160140B (en) * 2019-12-13 2023-04-18 浙江大华技术股份有限公司 Image detection method and device
CN111382717B (en) * 2020-03-17 2022-09-09 腾讯科技(深圳)有限公司 Table identification method and device and computer readable storage medium
CN111724441A (en) * 2020-05-28 2020-09-29 上海商汤智能科技有限公司 Image annotation method and device, electronic equipment and storage medium
US11657279B2 (en) 2020-06-16 2023-05-23 National Taiwan University Of Science And Technology Electronic device and method for document segmentation
TWI776489B (en) * 2020-06-16 2022-09-01 國立臺灣科技大學 Electronic device and method for document segmentation
CN112308867B (en) * 2020-11-10 2022-07-22 上海商汤智能科技有限公司 Tooth image processing method and device, electronic equipment and storage medium
TWI769647B (en) * 2021-01-04 2022-07-01 鴻海精密工業股份有限公司 Method and device for determining cell density, computer device and storage medium
TWI782777B (en) * 2021-11-02 2022-11-01 英屬開曼群島商睿能創意公司 Image capturing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102324092A (en) * 2011-09-09 2012-01-18 华南理工大学 Method for automatically cutting granular object in digital image
US20160090041A1 (en) * 2014-09-30 2016-03-31 Fuji Jukogyo Kabushiki Kaisha Vehicle sightline guidance apparatus
CN108460411A (en) * 2018-02-09 2018-08-28 北京市商汤科技开发有限公司 Example dividing method and device, electronic equipment, program and medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009071689A (en) * 2007-09-14 2009-04-02 Sony Corp Image processing apparatus, image processing method, and imaging apparatus
JP2009253727A (en) * 2008-04-08 2009-10-29 Brother Ind Ltd Image processing device, image forming device, and image processing program
CN103745472B (en) * 2014-01-15 2016-11-23 西安电子科技大学 SAR image segmentation method based on condition triple Markov field
CN104867126B (en) * 2014-02-25 2017-10-17 西安电子科技大学 Based on point to constraint and the diameter radar image method for registering for changing region of network of triangle
US10303979B2 (en) * 2016-11-16 2019-05-28 Phenomic Ai Inc. System and method for classifying and segmenting microscopy images with deep multiple instance learning
CN106780536A (en) * 2017-01-13 2017-05-31 深圳市唯特视科技有限公司 A kind of shape based on object mask network perceives example dividing method
CN107084992B (en) * 2017-04-20 2020-04-21 佛山市南海区广工大数控装备协同创新研究院 Capsule detection method and system based on machine vision
CN107993215A (en) * 2017-11-27 2018-05-04 象辑知源(武汉)科技有限公司 A kind of weather radar image processing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102324092A (en) * 2011-09-09 2012-01-18 华南理工大学 Method for automatically cutting granular object in digital image
US20160090041A1 (en) * 2014-09-30 2016-03-31 Fuji Jukogyo Kabushiki Kaisha Vehicle sightline guidance apparatus
CN108460411A (en) * 2018-02-09 2018-08-28 北京市商汤科技开发有限公司 Example dividing method and device, electronic equipment, program and medium

Also Published As

Publication number Publication date
TW202014984A (en) 2020-04-16
CN109389129B (en) 2022-07-08
CN109389129A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
TWI777092B (en) Image processing method, electronic device, and storage medium
US20210118144A1 (en) Image processing method, electronic device, and storage medium
WO2021036616A1 (en) Medical image processing method, medical image recognition method and device
US10402979B2 (en) Imaging segmentation using multi-scale machine learning approach
CN108510482B (en) Cervical cancer detection device based on colposcope images
Kruthiventi et al. Saliency unified: A deep architecture for simultaneous eye fixation prediction and salient object segmentation
CN110428432B (en) Deep neural network algorithm for automatically segmenting colon gland image
CN111524106B (en) Skull fracture detection and model training method, device, equipment and storage medium
Wang et al. Smartphone-based wound assessment system for patients with diabetes
Roth et al. A new 2.5 D representation for lymph node detection using random sets of deep convolutional neural network observations
Bozorgtabar et al. Skin lesion segmentation using deep convolution networks guided by local unsupervised learning
TWI786330B (en) Image processing method, electronic device, and storage medium
US20220189142A1 (en) Ai-based object classification method and apparatus, and medical imaging device and storage medium
Wen et al. Gcsba-net: Gabor-based and cascade squeeze bi-attention network for gland segmentation
Elloumi et al. Ocular diseases diagnosis in fundus images using a deep learning: approaches, tools and performance evaluation
WO2024016812A1 (en) Microscopic image processing method and apparatus, computer device, and storage medium
Dogar et al. Attention augmented distance regression and classification network for nuclei instance segmentation and type classification in histology images
CN110473176B (en) Image processing method and device, fundus image processing method and electronic equipment
US20220319208A1 (en) Method and apparatus for obtaining feature of duct tissue based on computer vision, and intelligent microscope
US20160140748A1 (en) Automated animation for presentation of images
Shen et al. Multicontext multitask learning networks for mass detection in mammogram
Zhang et al. Artifact detection in endoscopic video with deep convolutional neural networks
US20220309610A1 (en) Image processing method and apparatus, smart microscope, readable storage medium and device
Shaharabany et al. End-to-end segmentation of medical images via patch-wise polygons prediction
CN114387489A (en) Power equipment identification method and device and terminal equipment

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent