TWI876278B - Image processing method, neural network training method, device and medium - Google Patents
Image processing method, neural network training method, device and medium Download PDFInfo
- Publication number
- TWI876278B TWI876278B TW112106458A TW112106458A TWI876278B TW I876278 B TWI876278 B TW I876278B TW 112106458 A TW112106458 A TW 112106458A TW 112106458 A TW112106458 A TW 112106458A TW I876278 B TWI876278 B TW I876278B
- Authority
- TW
- Taiwan
- Prior art keywords
- image
- neural network
- target
- reconstructed images
- sensing values
- Prior art date
Links
Landscapes
- Image Analysis (AREA)
- Radar Systems Or Details Thereof (AREA)
Abstract
本發明實施例提供了一種圖像處理方法、神經網路的訓練方法、裝置及介質,該方法包括:對第一圖像進行通道劃分,得到第二圖像;通過目標神經網路對第二圖像進行壓縮取樣和圖像重建得到第二圖像對應的至少兩個重建圖像;將第二圖像和至少兩個重建圖像進行融合處理,得到目標圖像,目標圖像的解析度高於第一圖像的解析度。An embodiment of the present invention provides an image processing method, a neural network training method, an apparatus and a medium, the method comprising: performing channel segmentation on a first image to obtain a second image; performing compression sampling and image reconstruction on the second image through a target neural network to obtain at least two reconstructed images corresponding to the second image; fusing the second image and the at least two reconstructed images to obtain a target image, wherein the resolution of the target image is higher than the resolution of the first image.
Description
本發明屬於電子設備技術領域,具體是關於一種圖像處理方法、神經網路的訓練方法、裝置、電子設備及可讀存儲介質。The present invention belongs to the field of electronic equipment technology, and specifically relates to an image processing method, a neural network training method, a device, an electronic device and a readable storage medium.
隨著電子技術的發展,越來越多的使用者使用電子設備進行拍照,圖像的顯示效果越來越受到人們的重視。然而,在使用電子設備拍照的過程中,可能導致電子設備拍攝到的圖像的清晰度較低,進而降低了圖像品質,影響了圖像的顯示效果。With the development of electronic technology, more and more users use electronic devices to take pictures, and the display effect of images has attracted more and more attention. However, in the process of using electronic devices to take pictures, the clarity of the images taken by the electronic devices may be low, thereby reducing the image quality and affecting the display effect of the image.
本發明實施例的目的是一種圖像處理方法、神經網路的訓練方法、裝置及介質,能夠解決電子設備拍攝到的圖像的清晰度較低,圖像品質較差的問題。The purpose of the embodiments of the present invention is to provide an image processing method, a neural network training method, a device and a medium, which can solve the problem of low clarity and poor image quality of images taken by electronic equipment.
第一方面,本發明實施例提供了一種圖像處理方法,該方法包括: 對第一圖像進行通道劃分,得到第二圖像; 通過目標神經網路對該第二圖像進行壓縮取樣和圖像重建得到該第二圖像對應的至少兩個重建圖像; 將該第二圖像和該至少兩個重建圖像進行融合處理,得到目標圖像,該目標圖像的解析度高於該第一圖像的解析度。 In a first aspect, an embodiment of the present invention provides an image processing method, the method comprising: Performing channel segmentation on a first image to obtain a second image; Performing compression sampling and image reconstruction on the second image through a target neural network to obtain at least two reconstructed images corresponding to the second image; Performing fusion processing on the second image and the at least two reconstructed images to obtain a target image, the resolution of the target image being higher than the resolution of the first image.
第二方面,本發明實施例提供了一種神經網路的訓練方法,該方法包括: 獲取至少兩個第三圖像; 通過神經網路對每一該第三圖像進行壓縮取樣得到該第三圖像對應的至少兩個感測值; 通過該神經網路基於該至少兩個感測值進行圖像重建,得到至少兩個重建圖像,該感測值與該重建圖像一一對應; 基於每個第三圖像與對應的每個重建圖像之間的圖像損失,確定損失函數值; 根據該損失函數值對該神經網路進行反覆運算訓練,得到目標神經網路。 In a second aspect, an embodiment of the present invention provides a neural network training method, the method comprising: Obtaining at least two third images; Compressing and sampling each of the third images through a neural network to obtain at least two sensing values corresponding to the third image; Reconstructing an image based on the at least two sensing values through the neural network to obtain at least two reconstructed images, the sensing values corresponding to the reconstructed images one by one; Determining a loss function value based on the image loss between each third image and each corresponding reconstructed image; Repeatedly calculating and training the neural network according to the loss function value to obtain a target neural network.
第三方面,本發明實施例提供了一種圖像處理裝置,該裝置包括: 劃分模組,用於對第一圖像進行通道劃分,得到第二圖像; 第一處理模組,用於通過目標神經網路對該第二圖像進行壓縮取樣和圖像重建得到該第二圖像對應的至少兩個重建圖像; 第二處理模組,用於將該第二圖像和該至少兩個重建圖像進行融合處理,得到目標圖像,該目標圖像的解析度高於該第一圖像的解析度。 In a third aspect, an embodiment of the present invention provides an image processing device, which includes: A segmentation module, used to perform channel segmentation on a first image to obtain a second image; A first processing module, used to perform compression sampling and image reconstruction on the second image through a target neural network to obtain at least two reconstructed images corresponding to the second image; A second processing module, used to perform fusion processing on the second image and the at least two reconstructed images to obtain a target image, wherein the resolution of the target image is higher than the resolution of the first image.
第四方面,本發明實施例提供了一種神經網路的訓練裝置,該裝置包括: 獲取模組,用於獲取至少兩個第三圖像; 第一訓練模組,用於通過神經網路對每一該第三圖像進行壓縮取樣得到該第三圖像對應的至少兩個感測值; 第二訓練模組,用於通過該神經網路基於該至少兩個感測值進行圖像重建,得到至少兩個重建圖像,該感測值與該重建圖像一一對應; 第三訓練模組,用於基於每個第三圖像與對應的每個重建圖像之間的圖像損失,確定損失函數值; 第四訓練模組,用於根據該損失函數值對該神經網路進行反覆運算訓練,得到目標神經網路。 In a fourth aspect, an embodiment of the present invention provides a neural network training device, the device comprising: An acquisition module, used to acquire at least two third images; A first training module, used to compress and sample each third image through a neural network to obtain at least two sensing values corresponding to the third image; A second training module, used to reconstruct an image based on the at least two sensing values through the neural network to obtain at least two reconstructed images, wherein the sensing values correspond to the reconstructed images one by one; A third training module, used to determine a loss function value based on the image loss between each third image and each corresponding reconstructed image; The fourth training module is used to repeatedly train the neural network according to the loss function value to obtain the target neural network.
第五方面,本發明實施例提供了一種電子設備,該電子設備包括處理器、記憶體及存儲在該記憶體上並可在該處理器上運行的程式或指令,該程式或指令被該處理器執行時實現如第一方面所述的方法的步驟,或者實現如第二方面所述的方法的步驟。In a fifth aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.
第六方面,本發明實施例提供了一種可讀存儲介質,該可讀存儲介質上存儲程式或指令,該程式或指令被處理器執行時實現如第一方面所述的方法的步驟,或者實現如第二方面所述的方法的步驟。In a sixth aspect, an embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.
第七方面,本發明實施例提供了一種晶片,該晶片包括處理器和通信介面,該通信介面和該處理器耦合,該處理器用於運行程式或指令,實現如第一方面所述的方法,或者實現如第二方面所述的方法。In the seventh aspect, an embodiment of the present invention provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect, or to implement the method described in the second aspect.
第八方面,本發明實施例提供一種電腦程式產品,該程式產品被存儲在存儲介質中,該程式產品被至少一個處理器執行以實現如第一方面所述的方法,或者實現如第二方面所述的方法。In an eighth aspect, an embodiment of the present invention provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect, or to implement the method described in the second aspect.
本發明實施例中,對第一圖像進行通道劃分,得到第二圖像;通過目標神經網路對第二圖像進行壓縮取樣和圖像重建得到第二圖像對應的至少兩個重建圖像。進而將第二圖像和至少兩個重建圖像進行融合處理,以此提高圖像的影像細節,實現對圖像的重建補償,得到解析度高於第一圖像目標圖像。通過上述方式,在拍攝過程中輸出圖像品質較高的目標圖像,提高拍攝圖像的顯示效果。In the embodiment of the present invention, the first image is channel-divided to obtain the second image; the second image is compressed and sampled and reconstructed by the target neural network to obtain at least two reconstructed images corresponding to the second image. The second image and the at least two reconstructed images are then fused to improve the image details, achieve image reconstruction compensation, and obtain a target image with a higher resolution than the first image. In the above manner, a target image with higher image quality is output during the shooting process, and the display effect of the shot image is improved.
下面將結合本發明實施例中的附圖,對本發明實施例中的技術方案進行清楚地描述,顯然,所描述的實施例是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員獲得的所有其他實施例,都屬於本發明保護的範圍。The following will be combined with the drawings in the embodiments of the present invention to clearly describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present invention.
本發明的說明書和申請專利範圍中的術語「第一」、「第二」等是用於區別類似的物件,而不用於描述特定的順序或先後次序。應該理解這樣使用的資料在適當情況下可以互換,以便本發明的實施例能夠以除了在這裡圖示或描述的那些以外的順序實施,且「第一」、「第二」等所區分的對象通常為一類,並不限定物件的個數,例如第一物件可以是一個,也可以是多個。此外,說明書以及申請專利範圍中「和/或」表示所連線物件的至少其中之一,字元「/」,一般表示前後關聯物件是一種「或」的關係。The terms "first", "second", etc. in the specification and patent application of the present invention are used to distinguish similar objects, rather than to describe a specific order or precedence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and patent application indicates at least one of the connected objects, and the character "/" generally indicates that the objects associated before and after are in an "or" relationship.
下面結合附圖,通過具體的實施例及其應用場景對本發明實施例提供的圖像處理方法進行詳細地說明。The image processing method provided by the embodiment of the present invention is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
本發明實施例提供了一種圖像處理方法,請參閱圖1,圖1是本發明實施例提供的圖像處理方法的流程圖。本發明實施例提供的圖像處理方法包括以下步驟: S101,對第一圖像進行通道劃分,得到第二圖像。 The embodiment of the present invention provides an image processing method. Please refer to Figure 1, which is a flow chart of the image processing method provided by the embodiment of the present invention. The image processing method provided by the embodiment of the present invention includes the following steps: S101, channel-divide the first image to obtain the second image.
本發明實施例提供的圖像處理方法可以應用於電子設備,上述第一圖像可以是電子設備拍攝到的圖像。應理解,在其他實施例中,上述第一圖像也可以是電子設備通過其他途徑獲取到的圖像,例如,從互聯網下載的圖像。The image processing method provided by the embodiment of the present invention can be applied to an electronic device, and the first image can be an image taken by the electronic device. It should be understood that in other embodiments, the first image can also be an image obtained by the electronic device through other channels, for example, an image downloaded from the Internet.
第一圖像包括三個顏色通道,分別為R通道、G通道和B通道。本步驟中,對第一圖像進行通道劃分,得到第二圖像,其中,第二圖像包括第一圖像對應的三個顏色通道,即R通道、G通道和B通道。例如,第一圖像為二維圖像且圖像維度為10*8,則第二圖像為一維圖像且圖像維度為80*1。The first image includes three color channels, namely, R channel, G channel and B channel. In this step, the first image is channel-divided to obtain a second image, wherein the second image includes three color channels corresponding to the first image, namely, R channel, G channel and B channel. For example, if the first image is a two-dimensional image and the image dimension is 10*8, then the second image is a one-dimensional image and the image dimension is 80*1.
S102,通過目標神經網路對該第二圖像進行壓縮取樣和圖像重建得到該第二圖像對應的至少兩個重建圖像。S102: compressing and sampling the second image and reconstructing the image through a target neural network to obtain at least two reconstructed images corresponding to the second image.
本步驟中,可以通過訓練完成的神經網路,即目標神經網路對第二圖像進行壓縮取樣,獲得第二圖像對應的感測值,並通過訓練完成的神經網路基於該感測值進行圖像重建,獲得至少兩個重建圖像。其中,上述重建圖像攜帶有第二圖像的顯示內容特徵資訊,上述顯示內容特徵資訊表徵第二圖像的顯示細節。In this step, the second image can be compressed and sampled by the trained neural network, i.e., the target neural network, to obtain the sensing value corresponding to the second image, and the trained neural network can reconstruct the image based on the sensing value to obtain at least two reconstructed images. The reconstructed image carries the display content feature information of the second image, and the display content feature information represents the display details of the second image.
可選地,上述神經網路可以為基於壓縮感知(Compressed Sensing,CS)的神經網路,也可以為基於其他功能的神經網路,在此不做具體限定。Optionally, the above neural network may be a neural network based on compressed sensing (CS), or a neural network based on other functions, which is not specifically limited here.
具體的如何通過目標神經網路對第二圖像進行壓縮取樣和圖像重建的實施方式請參閱後續實施例。For the specific implementation of how to perform compression sampling and image reconstruction on the second image through the target neural network, please refer to the subsequent embodiments.
S103,將該第二圖像和該至少兩個重建圖像進行融合處理,得到目標圖像。S103: fusing the second image and the at least two reconstructed images to obtain a target image.
本步驟中,在獲得第二圖像對應的至少兩個重建圖像之後,對第二圖像和至少兩個重建圖像進行圖像融合,獲得目標圖像,其中,目標圖像的解析度高於第一圖像的解析度。In this step, after obtaining at least two reconstructed images corresponding to the second image, the second image and the at least two reconstructed images are fused to obtain a target image, wherein the resolution of the target image is higher than the resolution of the first image.
可選地,可以基於最大像素值和最小像素值的方式對第二圖像和至少兩個重建圖像進行圖像融合,或者可以基於像素加權平均的方式對第二圖像和至少兩個重建圖像進行圖像融合,或者通過其他方式進行圖像之間的圖像融合,在此不做具體限定。Optionally, the second image and at least two reconstructed images can be fused based on maximum pixel value and minimum pixel value, or the second image and at least two reconstructed images can be fused based on pixel weighted averaging, or the images can be fused in other ways, which are not specifically limited here.
為便於理解本實施例提供的技術方案,請參閱圖2,如圖2所示,首先執行步驟201對第一圖像進行通道劃分,獲得第二圖像;步驟202通過訓練完成的神經網路對第二圖像進行壓縮取樣和圖像重建,獲得多個重建圖像;步驟203對第二圖像和多個重建圖像進行圖像融合,獲得解析度高於第一圖像的目標圖像。To facilitate understanding of the technical solution provided by this embodiment, please refer to Figure 2. As shown in Figure 2, first execute step 201 to perform channel division on the first image to obtain a second image; step 202 compresses and samples the second image and reconstructs the image through the trained neural network to obtain multiple reconstructed images; step 203 fuses the second image and the multiple reconstructed images to obtain a target image with a higher resolution than the first image.
本發明實施例中,對第一圖像進行通道劃分,得到第二圖像;通過目標神經網路對第二圖像進行壓縮取樣和圖像重建得到第二圖像對應的至少兩個重建圖像。進而將第二圖像和至少兩個重建圖像進行融合處理,以此提高圖像的影像細節,實現對圖像的重建補償,得到解析度高於第一圖像目標圖像。通過上述方式,在拍攝過程中輸出圖像品質較高的目標圖像,提高拍攝圖像的顯示效果。In the embodiment of the present invention, the first image is channel-divided to obtain the second image; the second image is compressed and sampled and reconstructed by the target neural network to obtain at least two reconstructed images corresponding to the second image. The second image and the at least two reconstructed images are then fused to improve the image details, achieve image reconstruction compensation, and obtain a target image with a higher resolution than the first image. In the above manner, a target image with higher image quality is output during the shooting process, and the display effect of the shot image is improved.
可選地,該通過目標神經網路對該第二圖像進行壓縮取樣和圖像重建得到該第二圖像對應的至少兩個重建圖像包括: 通過目標神經網路對該第二圖像進行壓縮取樣,得到該第二圖像對應的至少兩個感測值; 通過該目標神經網路基於該至少兩個感測值進行圖像重建,得到該第二圖像對應的至少兩個重建圖像。 Optionally, the method of compressing and sampling the second image and reconstructing the image through the target neural network to obtain at least two reconstructed images corresponding to the second image includes: Compressing and sampling the second image through the target neural network to obtain at least two sensing values corresponding to the second image; Reconstructing the image based on the at least two sensing values through the target neural network to obtain at least two reconstructed images corresponding to the second image.
本實施例中,首先通過目標神經網路對第二圖像進行壓縮取樣,獲得第二圖像對應的至少兩個感測值,其中,上述感測值可以理解為對圖像進行壓縮取樣後的樣本,且感測值的維度低於對應的第二圖像的圖像維度。In this embodiment, the second image is first compressed and sampled through the target neural network to obtain at least two sensing values corresponding to the second image, wherein the above sensing values can be understood as samples after the image is compressed and sampled, and the dimension of the sensing value is lower than the image dimension of the corresponding second image.
再通過目標神經網路基於至少兩個感測值進行圖像重建,獲得第二圖像對應的至少兩個重建圖像,其中,感測值與該重建圖像一一對應。Then, the target neural network performs image reconstruction based on at least two sensing values to obtain at least two reconstructed images corresponding to the second image, wherein the sensing values correspond to the reconstructed images one by one.
應理解,具體的如何通過神經網路對圖像進行壓縮取樣的實施方式,請參閱後續實施例。圖像重建的過程可以理解為通過神經網路對圖像進行壓縮採樣的逆過程,本實施例中可以使用重構演算法基於感測值進行圖像重建,例如,上述重構演算法為L0-norm演算法,或者L1-norm演算法。It should be understood that the specific implementation method of how to compress and sample images through a neural network is described in the subsequent embodiments. The image reconstruction process can be understood as the inverse process of compressing and sampling images through a neural network. In this embodiment, a reconstruction algorithm can be used to reconstruct the image based on the sensed value. For example, the above-mentioned reconstruction algorithm is an L0-norm algorithm or an L1-norm algorithm.
下面將具體闡述如何通過目標神經網路對第二圖像進行壓縮取樣: 可選地,該通過目標神經網路對該第二圖像進行壓縮取樣,得到該第二圖像對應的至少兩個感測值包括: 在通過目標神經網路對該第二圖像進行一次壓縮取樣的過程中,在該參數表中隨機選取與該第二圖像的圖像維度存在映射關係的壓縮感知陣列; 通過該壓縮感知陣列對該第二圖像進行壓縮取樣,得到該第二圖像對應的至少兩個感測值。 The following specifically describes how to compress and sample the second image through the target neural network: Optionally, compressing and sampling the second image through the target neural network to obtain at least two sensing values corresponding to the second image includes: In the process of compressing and sampling the second image through the target neural network, randomly selecting a compressed sensing array in the parameter table that has a mapping relationship with the image dimension of the second image; Compressing and sampling the second image through the compressed sensing array to obtain at least two sensing values corresponding to the second image.
需要說明的是,目標神經網路包括參數表,上述參數表用於表徵壓縮感知陣列和第二圖像的圖像維度之間的映射關係,且一個第二圖像的圖像維度與至少一個壓縮感知陣列存在映射關係。可選地,上述參數表還可以表徵第二圖像對應的感測值的維度、壓縮感知陣列和第二圖像的圖像維度之間的映射關係。It should be noted that the target neural network includes a parameter table, and the parameter table is used to characterize the mapping relationship between the compressed perception array and the image dimension of the second image, and the image dimension of a second image has a mapping relationship with at least one compressed perception array. Optionally, the parameter table can also characterize the dimension of the sensing value corresponding to the second image, the mapping relationship between the compressed perception array and the image dimension of the second image.
本實施例中,在一次壓縮採樣的過程中,可以在參數表中隨機選取與第二圖像的圖像維度存在映射關係的壓縮感知陣列,並通過該壓縮感知陣列對第二圖像進行壓縮取樣,獲得第二圖像對應的感測值。In this embodiment, during a compression sampling process, a compression perception array having a mapping relationship with the image dimension of the second image can be randomly selected from the parameter table, and the second image is compressed and sampled through the compression perception array to obtain the sensing value corresponding to the second image.
具體而言,第二圖像可以理解為是一列N維的向量,參數表中與第二圖像的圖像維度存在映射關係的壓縮感知陣列可以理解為是M*N維的向量,其中,M小於N,基於壓縮感知陣列對第二圖像進行壓縮取樣獲得的感測值為一列M維的向量,以此實現了對第二圖像的壓縮。Specifically, the second image can be understood as a column of N-dimensional vectors, and the compressed perception array in the parameter table that has a mapping relationship with the image dimension of the second image can be understood as an M*N-dimensional vector, where M is less than N. The sensing value obtained by compressing and sampling the second image based on the compressed perception array is a column of M-dimensional vectors, thereby achieving compression of the second image.
應理解,可以對第二圖像進行多次壓縮採樣,在每次壓縮採樣的過程中,在參數表隨機選取不同的壓縮感知陣列對第二圖像進行壓縮取樣,獲得不同的感測值,進而在後續基於感測值進行圖像重建的步驟中,可以得到多個重建圖像,且每個重建圖像包括的顯示內容特徵資訊所表徵的顯示細節不同,以此確保融合重建圖像所得到的目標圖像具備豐富的顯示細節,進而提高目標圖像的顯示效果。It should be understood that the second image can be compressed and sampled multiple times. In each compression sampling process, different compression sensing arrays are randomly selected from the parameter table to compress and sample the second image, and different sensing values are obtained. Then, in the subsequent step of reconstructing the image based on the sensing values, multiple reconstructed images can be obtained, and the display details represented by the display content feature information included in each reconstructed image are different, thereby ensuring that the target image obtained by fusing the reconstructed images has rich display details, thereby improving the display effect of the target image.
可選地,該將該第二圖像和該至少兩個重建圖像進行融合處理,得到目標圖像,包括: 對該第二圖像對應的至少兩個重建圖像進行特徵點提取,得到該第二圖像對應的至少兩個特徵點圖像; 對該至少兩個特徵點圖像和該第二圖像進行圖像融合處理,得到第三圖像。 Optionally, the second image and the at least two reconstructed images are fused to obtain a target image, including: Extracting feature points from at least two reconstructed images corresponding to the second image to obtain at least two feature point images corresponding to the second image; Performing image fusion processing on the at least two feature point images and the second image to obtain a third image.
如上所述,重建圖像包括顯示內容特徵資訊,上述顯示內容特徵資訊可以表徵第二圖像的顯示細節。As mentioned above, the reconstructed image includes display content feature information, and the display content feature information can represent the display details of the second image.
本實施例中,可以對第二圖像對應的至少兩個重建圖像進行特徵點提取,獲得第二圖像對應的至少兩個特徵點圖像,其中,特徵點圖像與重建圖像一一對應,且特徵點圖像包括對應的重建圖像的圖像特徵點。可選地,可以基於圖像的紋理資訊對圖像進行特徵點提取,或者基於圖像的灰度資訊對圖像進行特徵點提取,或者通過其他方式提取圖像的特徵點,在此不做具體限定。In this embodiment, feature point extraction can be performed on at least two reconstructed images corresponding to the second image to obtain at least two feature point images corresponding to the second image, wherein the feature point images correspond to the reconstructed images one by one, and the feature point images include image feature points of the corresponding reconstructed images. Optionally, feature point extraction can be performed on the image based on texture information of the image, or based on grayscale information of the image, or feature points of the image can be extracted by other methods, which are not specifically limited here.
在獲得至少兩個特徵點圖像之後,對上述至少兩個特徵點圖像和第二圖像進行圖像融合處理,獲得目標圖像。After obtaining at least two feature point images, image fusion processing is performed on the at least two feature point images and the second image to obtain a target image.
本實施例中,通過對重建圖像進行特徵點提取,獲得包含圖像顯示細節的特徵點圖像,進而對第二圖像和至少兩個特徵點圖像進行圖像融合,獲得具備豐富顯示細節的目標圖像,提高了目標圖像的解析度和顯示效果。In this embodiment, feature points are extracted from the reconstructed image to obtain a feature point image containing image display details, and then the second image and at least two feature point images are fused to obtain a target image with rich display details, thereby improving the resolution and display effect of the target image.
在其他實施例中,在獲得第二圖像對應的至少兩個重建圖像之後,對第二圖像和第二圖像對應的至少兩個重建圖像進行圖像融合,獲得目標圖像。In other embodiments, after obtaining at least two reconstructed images corresponding to the second image, the second image and the at least two reconstructed images corresponding to the second image are fused to obtain a target image.
為便於理解本發明實施例提供的圖像處理方法,請參閱圖3,如圖3所示,對第一圖像進行通道拆分,獲得第二圖像;將第二圖像輸入至壓縮感知神經網路中,獲得該第二圖像對應的多個重建圖像;提取重建圖像的特徵點,進而將提取特徵點得到的多個特徵點圖像和第二圖像進行圖像融合,獲得清晰度較高的目標圖像。In order to facilitate understanding of the image processing method provided by the embodiment of the present invention, please refer to Figure 3. As shown in Figure 3, channel splitting is performed on the first image to obtain a second image; the second image is input into the compressed sensing neural network to obtain multiple reconstructed images corresponding to the second image; feature points of the reconstructed image are extracted, and then the multiple feature point images obtained by extracting the feature points are image-fused with the second image to obtain a target image with higher definition.
本發明實施例提供了一種神經網路的訓練方法,請參閱圖4,圖4是本發明實施例提供的神經網路的訓練方法的流程圖。本發明實施例提供的神經網路的訓練方法包括以下步驟: S401,獲取至少兩個第三圖像。 The present invention provides a neural network training method. Please refer to Figure 4, which is a flow chart of the neural network training method provided by the present invention. The neural network training method provided by the present invention includes the following steps: S401, obtaining at least two third images.
上述第三圖像可以是預先設置的圖像。The third image may be a preset image.
S402,通過神經網路對每一該第三圖像進行壓縮取樣得到該第三圖像對應的至少兩個感測值。S402: compress and sample each of the third images through a neural network to obtain at least two sensing values corresponding to the third image.
上述神經網路可以為壓縮感知神經網路。The above neural network can be a compression-aware neural network.
本步驟中,將每個第三圖像輸入至壓縮感知神經網路中,對第三圖像進行壓縮取樣獲得第三圖像對應的至少兩個感測值,具體的實施方式請參閱後續實施例。In this step, each third image is input into the compression perception neural network, and the third image is compressed and sampled to obtain at least two sensing values corresponding to the third image. For the specific implementation method, please refer to the subsequent embodiments.
S403,通過該神經網路基於該至少兩個感測值進行圖像重建,得到至少兩個重建圖像。S403, reconstructing an image based on the at least two sensing values through the neural network to obtain at least two reconstructed images.
本步驟中,在獲得至少兩個感測值之後,可以通過神經網路基於至少兩個感測值進行圖像重建,獲得至少兩個重建圖像,其中,感測值與重建圖像一一對應。In this step, after obtaining at least two sensing values, image reconstruction can be performed based on the at least two sensing values through a neural network to obtain at least two reconstructed images, wherein the sensing values correspond to the reconstructed images one by one.
可選地,可以使用重構演算法基於感測值進行圖像重建,例如,上述重構演算法為L0-norm演算法,或者L1-norm演算法。Optionally, a reconstruction algorithm may be used to reconstruct the image based on the sensing values. For example, the reconstruction algorithm is an L0-norm algorithm or an L1-norm algorithm.
S404,基於每個第三圖像與對應的每個重建圖像之間的圖像損失,確定損失函數值。S404: Determine a loss function value based on the image loss between each third image and each corresponding reconstructed image.
S405,根據該損失函數值對該神經網路進行反覆運算訓練,得到目標神經網路。S405, repeatedly performing calculation training on the neural network according to the loss function value to obtain a target neural network.
本步驟中,可以根據第三圖像與對應的重建圖像之間的圖像損失確定損失函數值,並基於該損失函數值調整神經網路,實現對神經網路的反覆運算訓練。In this step, the loss function value can be determined according to the image loss between the third image and the corresponding reconstructed image, and the neural network can be adjusted based on the loss function value to achieve repeated calculation training of the neural network.
可選地,在上述損失函數值小於或等於預設閾值的情況下,表示第三圖像與對應的重建圖像之間的圖像損失在可允許範圍內,神經網路訓練完成,則獲得訓練完成的目標神經網路。Optionally, when the above loss function value is less than or equal to a preset threshold, it means that the image loss between the third image and the corresponding reconstructed image is within an allowable range, and the neural network training is completed, and a trained target neural network is obtained.
可選地,該通過神經網路對每一該第三圖像進行壓縮取樣得到該第三圖像對應的至少兩個感測值包括: 在通過神經網路對該第三圖像進行一次壓縮取樣的過程中,隨機生成壓縮感知陣列; 通過該壓縮感知陣列對該第三圖像進行壓縮取樣,得到該第三圖像對應的感測值。 Optionally, the method of compressing and sampling each third image through a neural network to obtain at least two sensing values corresponding to the third image includes: randomly generating a compressed sensing array during a process of compressing and sampling the third image through a neural network; compressing and sampling the third image through the compressed sensing array to obtain sensing values corresponding to the third image.
本實施例中,在一次壓縮採樣的過程中,可以隨機生成壓縮感知矩陣,並通過該壓縮感知陣列對第三圖像進行壓縮取樣,獲得第三圖像對應的感測值。In this embodiment, during a compression sampling process, a compression sensing matrix can be randomly generated, and the third image is compressed and sampled by the compression sensing array to obtain the sensing value corresponding to the third image.
示例性的,第三圖像的維度為N,隨機生成的壓縮感知矩陣的數量為M,壓縮感知矩陣的維度為M*N,則通過該壓縮感知陣列對第四圖像進行壓縮取樣,生成的感測值的維度為M。Exemplarily, the dimension of the third image is N, the number of randomly generated compressed perception matrices is M, and the dimension of the compressed perception matrix is M*N. Then, the fourth image is compressed and sampled through the compressed perception array, and the dimension of the generated sensing value is M.
應理解,在對神經網路進行訓練的過程中,還可以基於每次壓縮取樣過程中第三圖像的維度、隨機生成的壓縮感知矩陣的維度以及感測值的維度,生成參數表,其中,上述參數表用於表徵第三圖像對應的感測值的維度、壓縮感知陣列和第三圖像的圖像維度之間的映射關係。It should be understood that in the process of training the neural network, a parameter table can also be generated based on the dimension of the third image in each compression sampling process, the dimension of the randomly generated compressed perception matrix, and the dimension of the sensing value, wherein the above parameter table is used to characterize the mapping relationship between the dimension of the sensing value corresponding to the third image, the compressed perception array, and the image dimension of the third image.
為便於理解本實施例提供的神經網路的訓練方法的整體方案,請參閱圖5,如圖5所示,步驟501通過神經網路對每個第三圖像進行壓縮取樣,獲得每個第三圖像對應的至少兩個感測值;步驟502基於每次壓縮取樣過程中第三圖像的維度、隨機生成的壓縮感知矩陣的維度以及感測值的維度,生成參數表;步驟503通過神經網路基於至少兩個感測值進行圖像重建,獲得至少兩個重建圖像;步驟504根據第三圖像與對應的每個重建圖像之間的圖像損失,對神經網路進行反覆運算訓練。To facilitate understanding of the overall scheme of the neural network training method provided in this embodiment, please refer to Figure 5. As shown in Figure 5, step 501 compresses and samples each third image through the neural network to obtain at least two sensing values corresponding to each third image; step 502 generates a parameter table based on the dimension of the third image in each compression sampling process, the dimension of the randomly generated compressed perception matrix, and the dimension of the sensing value; step 503 reconstructs the image based on at least two sensing values through the neural network to obtain at least two reconstructed images; step 504 repeatedly calculates and trains the neural network according to the image loss between the third image and each corresponding reconstructed image.
下面結合附圖,通過具體的實施例及其應用場景對本發明實施例提供的圖像處理裝置進行詳細地說明。The image processing device provided by the embodiment of the present invention is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
如圖6所示,圖像處理裝置600包括: 劃分模組601,用於對第一圖像進行通道劃分,得到第二圖像; 第一處理模組602,用於通過目標神經網路對該第二圖像進行壓縮取樣和圖像重建得到該第二圖像對應的至少兩個重建圖像; 第二處理模組603,用於將該第二圖像和該至少兩個重建圖像進行融合處理,得到目標圖像,該目標圖像的解析度高於該第一圖像的解析度。 As shown in FIG6 , the image processing device 600 includes: A segmentation module 601, used to perform channel segmentation on the first image to obtain a second image; A first processing module 602, used to perform compression sampling and image reconstruction on the second image through a target neural network to obtain at least two reconstructed images corresponding to the second image; A second processing module 603, used to perform fusion processing on the second image and the at least two reconstructed images to obtain a target image, the resolution of which is higher than the resolution of the first image.
可選地,該第一處理模組602,具體用於: 通過目標神經網路對該第二圖像進行壓縮取樣,得到該第二圖像對應的至少兩個感測值; 通過該目標神經網路基於該至少兩個感測值進行圖像重建,得到該第二圖像對應的至少兩個重建圖像,該感測值與該重建圖像一一對應。 Optionally, the first processing module 602 is specifically used to: compress and sample the second image through the target neural network to obtain at least two sensing values corresponding to the second image; reconstruct the image based on the at least two sensing values through the target neural network to obtain at least two reconstructed images corresponding to the second image, and the sensing values correspond to the reconstructed images one by one.
可選地,該神經網路包括參數表,該參數表用於表徵壓縮感知陣列和該第二圖像的圖像維度之間的映射關係; 該第一處理模組602,還具體用於: 在通過目標神經網路對該第二圖像進行一次壓縮取樣的過程中,在該參數表中隨機選取與該第二圖像的圖像維度存在映射關係的壓縮感知陣列; 通過該壓縮感知陣列對該第二圖像進行壓縮取樣,得到該第二圖像對應的至少兩個感測值。 Optionally, the neural network includes a parameter table, which is used to characterize the mapping relationship between the compressed perception array and the image dimension of the second image; The first processing module 602 is also specifically used to: In the process of performing a compression sampling on the second image through the target neural network, randomly select a compressed perception array in the parameter table that has a mapping relationship with the image dimension of the second image; Compress the second image through the compressed perception array to obtain at least two sensing values corresponding to the second image.
可選地,該第二處理模組603,具體用於: 對該第二圖像對應的至少兩個重建圖像進行特徵點提取,得到該第二圖像對應的至少兩個特徵點圖像,該特徵點圖像與該重建圖像一一對應; 對該至少兩個特徵點圖像和該第二圖像進行圖像融合處理,得到目標圖像。 Optionally, the second processing module 603 is specifically used to: Extract feature points from at least two reconstructed images corresponding to the second image to obtain at least two feature point images corresponding to the second image, and the feature point images correspond one-to-one to the reconstructed image; Perform image fusion processing on the at least two feature point images and the second image to obtain a target image.
本發明實施例中,對第一圖像進行通道劃分,得到第二圖像,通過目標神經網路對第二圖像進行壓縮取樣和圖像重建得到第二圖像對應的至少兩個重建圖像。進而將第二圖像和至少兩個重建圖像進行融合處理,以此提高圖像的影像細節,實現對圖像的重建補償,得到解析度高於第一圖像目標圖像。通過上述方式,在拍攝過程中輸出圖像品質較高的目標圖像,提高拍攝圖像的顯示效果。In the embodiment of the present invention, the first image is channel-divided to obtain the second image, and the second image is compressed and sampled and reconstructed by the target neural network to obtain at least two reconstructed images corresponding to the second image. The second image and the at least two reconstructed images are then fused to improve the image details, achieve image reconstruction compensation, and obtain a target image with a higher resolution than the first image. In the above manner, a target image with higher image quality is output during the shooting process, and the display effect of the shot image is improved.
下面結合附圖,通過具體的實施例及其應用場景對本發明實施例提供的神經網路的訓練裝置進行詳細地說明。The neural network training device provided by the embodiment of the present invention is described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
如圖7所示,神經網路的訓練裝置700包括: 獲取模組701,用於獲取至少兩個第三圖像; 第一訓練模組702,用於通過神經網路對每一該第三圖像進行壓縮取樣得到該第三圖像對應的至少兩個感測值; 第二訓練模組703,用於通過該神經網路基於該至少兩個感測值進行圖像重建,得到至少兩個重建圖像,該感測值與該重建圖像一一對應; 第三訓練模組704,用於基於每個第三圖像與對應的每個重建圖像之間的圖像損失,確定損失函數值; 第四訓練模組705,用於根據該損失函數值對該神經網路進行反覆運算訓練,得到目標神經網路。 As shown in FIG7 , the neural network training device 700 includes: An acquisition module 701, used to acquire at least two third images; A first training module 702, used to compress and sample each third image through a neural network to obtain at least two sensing values corresponding to the third image; A second training module 703, used to reconstruct an image based on the at least two sensing values through the neural network to obtain at least two reconstructed images, wherein the sensing values correspond to the reconstructed images one by one; A third training module 704, used to determine a loss function value based on the image loss between each third image and each corresponding reconstructed image; The fourth training module 705 is used to repeatedly train the neural network according to the loss function value to obtain the target neural network.
可選地,該第一訓練模組702,具體用於: 在通過神經網路對該第三圖像進行一次壓縮取樣的過程中,隨機生成壓縮感知陣列; 通過該壓縮感知陣列對該第三圖像進行壓縮取樣,得到該第三圖像對應的感測值。 Optionally, the first training module 702 is specifically used to: Randomly generate a compressed perception array during a process of compressing and sampling the third image through a neural network; Compress and sample the third image through the compressed perception array to obtain a sensing value corresponding to the third image.
本發明實施例中的圖像處理裝置或神經網路的訓練裝置可以是電子設備,也可以是電子設備中的部件、例如積體電路或晶片。該電子設備可以是終端,也可以為除終端之外的其他設備。示例性的,電子設備可以為手機、平板電腦、筆記型電腦、掌上型電腦、車載電子設備、移動上網裝置(Mobile Internet Device,MID)、增強現實(augmented reality,AR)/虛擬實境(virtual reality,VR)設備、機器人、可穿戴設備、超級移動個人電腦(ultra-mobile personal computer,UMPC)、上網本或者個人數位助理(personal digital assistant,PDA)等,還可以為伺服器、網路附屬記憶體(Network Attached Storage,NAS)、個人電腦(personal computer,PC)、電視機(television,TV)、櫃員機或者自助機等,本發明實施例不作具體限定。The image processing device or neural network training device in the embodiment of the present invention can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices except the terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), an augmented reality (AR)/virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It may also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiments of the present invention are not specifically limited.
本發明實施例中的圖像處理裝置或神經網路的訓練裝置可以為具有作業系統的裝置。該作業系統可以為安卓(Android)作業系統,可以為ios作業系統,還可以為其他可能的作業系統,本發明實施例不作具體限定。The image processing device or neural network training device in the embodiment of the present invention may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present invention.
本發明實施例提供的圖像處理裝置能夠實現圖1的方法實施例實現的各個過程,為避免重複,這裡不再贅述。The image processing device provided in the embodiment of the present invention can implement each process implemented in the method embodiment of FIG. 1 , and will not be described again here to avoid repetition.
本發明實施例提供的神經網路的訓練裝置能夠實現圖4的方法實施例實現的各個過程,為避免重複,這裡不再贅述。The neural network training device provided in the embodiment of the present invention can implement each process implemented in the method embodiment of FIG. 4 , and will not be described again here to avoid repetition.
可選地,如圖8所示,本發明實施例還提供一種電子設備800,包括處理器801,記憶體802,存儲在記憶體802上並可在該處理器801上運行的程式或指令,該程式或指令被處理器801執行時實現上述圖像處理方法實施例的各個過程,或者實現上述神經網路的訓練方法實施例的各個過程,且能達到相同的技術效果,為避免重複,這裡不再贅述。Optionally, as shown in FIG8 , the embodiment of the present invention further provides an electronic device 800, including a processor 801, a memory 802, and a program or instruction stored in the memory 802 and executable on the processor 801. When the program or instruction is executed by the processor 801, the various processes of the above-mentioned image processing method embodiment are implemented, or the various processes of the above-mentioned neural network training method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
需要說明的是,本發明實施例中的電子設備包括上述所述的移動電子設備和非移動電子設備。It should be noted that the electronic devices in the embodiments of the present invention include the mobile electronic devices and non-mobile electronic devices mentioned above.
圖9為實現本發明實施例的一種電子設備的硬體結構示意圖。FIG9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present invention.
該電子設備900包括但不限於:射頻單元901、網路模組902、音訊輸出單元903、輸入單元904、感測器905、顯示單元906、使用者輸入單元907、介面單元908、記憶體909、以及處理器910等部件。The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.
本領域技術人員可以理解,電子設備900還可以包括給各個部件供電的電源(比如電池),電源可以通過電源管理系統與處理器910邏輯相連,從而通過電源管理系統實現管理充電、放電、以及功耗管理等功能。圖9中示出的電子設備結構並不構成對電子設備的限定,電子設備可以包括比圖示更多或更少的部件,或者組合某些部件,或者不同的部件佈置,在此不再贅述。Those skilled in the art can understand that the electronic device 900 can also include a power source (such as a battery) for supplying power to various components. The power source can be logically connected to the processor 910 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The electronic device structure shown in FIG9 does not constitute a limitation on the electronic device. The electronic device can include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be elaborated here.
其中,處理器910,還用於對第一圖像進行通道劃分,得到第二圖像; 通過目標神經網路對該第二圖像進行壓縮取樣和圖像重建得到該第二圖像對應的至少兩個重建圖像; 對該第二圖像和該第二圖像對應的至少兩個重建圖像進行融合處理,得到目標圖像。 The processor 910 is also used to perform channel segmentation on the first image to obtain a second image; perform compression sampling and image reconstruction on the second image through the target neural network to obtain at least two reconstructed images corresponding to the second image; perform fusion processing on the second image and at least two reconstructed images corresponding to the second image to obtain a target image.
可選地,處理器910,還用於通過目標神經網路對該第二圖像進行壓縮取樣,得到該第二圖像對應的至少兩個感測值; 通過該目標神經網路基於該至少兩個感測值進行圖像重建,得到該第二圖像對應的至少兩個重建圖像。 Optionally, the processor 910 is further used to compress and sample the second image through the target neural network to obtain at least two sensing values corresponding to the second image; and reconstruct the image based on the at least two sensing values through the target neural network to obtain at least two reconstructed images corresponding to the second image.
可選地,處理器910,還用於在通過目標神經網路對該第二圖像進行一次壓縮取樣的過程中,在該參數表中隨機選取與該第二圖像的圖像維度存在映射關係的壓縮感知陣列; 通過該壓縮感知陣列對該第二圖像進行壓縮取樣,得到該第二圖像對應的至少兩個感測值。 Optionally, the processor 910 is further used to randomly select a compressed perception array in the parameter table that has a mapping relationship with the image dimension of the second image during a process of performing a compression sampling on the second image through the target neural network; The second image is compressed and sampled through the compressed perception array to obtain at least two sensing values corresponding to the second image.
可選地,處理器910,還用於對該第二圖像對應的至少兩個重建圖像進行特徵點提取,得到該第二圖像對應的至少兩個特徵點圖像; 對該至少兩個特徵點圖像和該第二圖像進行圖像融合處理,得到第三圖像。 Optionally, the processor 910 is further used to extract feature points from at least two reconstructed images corresponding to the second image to obtain at least two feature point images corresponding to the second image; Perform image fusion processing on the at least two feature point images and the second image to obtain a third image.
可選地,輸入單元904,還用於獲取至少兩個第三圖像; 處理器910,還用於通過神經網路對每一該第三圖像進行壓縮取樣得到該第三圖像對應的至少兩個感測值; 通過該神經網路基於該至少兩個感測值進行圖像重建,得到至少兩個重建圖像,該感測值與該重建圖像一一對應; 基於每個第三圖像與對應的每個重建圖像之間的圖像損失,確定損失函數值; 根據該損失函數值對該神經網路進行反覆運算訓練,得到目標神經網路。 Optionally, the input unit 904 is also used to obtain at least two third images; The processor 910 is also used to compress and sample each of the third images through a neural network to obtain at least two sensing values corresponding to the third image; Reconstruct the image based on the at least two sensing values through the neural network to obtain at least two reconstructed images, and the sensing values correspond to the reconstructed images one by one; Determine the loss function value based on the image loss between each third image and each corresponding reconstructed image; Repeatedly train the neural network according to the loss function value to obtain a target neural network.
可選地,處理器910,還用於在通過神經網路對該第三圖像進行一次壓縮取樣的過程中,隨機生成壓縮感知陣列; 通過該壓縮感知陣列對該第三圖像進行壓縮取樣,得到該第三圖像對應的感測值。應理解的是,本發明實施例中,輸入單元904可以包括圖形處理器(Graphics Processing Unit,GPU)9041和麥克風9042,圖形處理器9041對在視頻捕獲模式或圖像捕獲模式中由圖像捕獲裝置(如攝像頭)獲得的靜態圖片或視頻的圖像資料進行處理。顯示單元906可包括顯示面板9061,可以採用液晶顯示器、有機發光二極體等形式來配置顯示面板9061。使用者輸入單元907包括觸控面板9071以及其他輸入裝置9072中的至少一種。觸控面板9071,也稱為觸控式螢幕。觸控面板9071可包括觸摸檢測裝置和觸摸控制器兩個部分。其他輸入裝置9072可以包括但不限於實體鍵盤、功能鍵(比如音量控制按鍵、開關按鍵等)、軌跡球、滑鼠、操作桿,在此不再贅述。 Optionally, the processor 910 is also used to randomly generate a compressed perception array in the process of performing a compression sampling on the third image through the neural network; The third image is compressed and sampled through the compressed perception array to obtain the sensing value corresponding to the third image. It should be understood that in the embodiment of the present invention, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
記憶體909可用於存儲軟體程式以及各種資料。記憶體909可主要包括存儲程式或指令的第一存儲區和存儲資料的第二存儲區,其中,第一存儲區可存儲作業系統、至少一個功能所需的應用程式或指令(比如聲音播放功能、圖像播放功能等)等。此外,記憶體909可以包括易失性記憶體或非易失性記憶體,或者,記憶體909可以包括易失性和非易失性記憶體兩者。其中,非易失性記憶體可以是唯讀記憶體(Read-Only Memory,ROM)、可程式設計唯讀記憶體(Programmable ROM,PROM)、可擦除可程式設計唯讀記憶體(Erasable PROM,EPROM)、電可擦除可程式設計唯讀記憶體(Electrically EPROM,EEPROM)或快閃記憶體。易失性記憶體可以是隨機存取記憶體(Random Access Memory,RAM),靜態隨機存取記憶體(Static RAM,SRAM)、動態隨機存取記憶體(Dynamic RAM,DRAM)、同步動態隨機存取記憶體(Synchronous DRAM,SDRAM)、雙倍數據速率同步動態隨機存取記憶體(Double Data Rate SDRAM,DDRSDRAM)、增強型同步動態隨機存取記憶體(Enhanced SDRAM,ESDRAM)、同步連接動態隨機存取記憶體(Synch link DRAM,SLDRAM)和直接記憶體匯流排隨機存取記憶體(Direct Rambus RAM,DRRAM)。本發明實施例中的記憶體909包括但不限於這些和任意其它適合類型的記憶體。The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM) or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 909 in embodiments of the present invention includes but is not limited to these and any other suitable types of memory.
處理器910可包括一個或多個處理單元;可選的,處理器910集成應用處理器和調製解調處理器,其中,應用處理器主要處理關於作業系統、使用者介面和應用程式等的操作,調製解調處理器主要處理無線通訊信號,如基帶處理器。可以理解的是,上述調製解調處理器也可以不集成到處理器910中。The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the above-mentioned modem processor may not be integrated into the processor 910.
本發明實施例還提供一種可讀存儲介質,該可讀存儲介質上存儲有程式或指令,該程式或指令被處理器執行時實現上述圖像處理方法實施例的各個過程,或者實現上述神經網路的訓練方法實施例的各個過程,且能達到相同的技術效果,為避免重複,這裡不再贅述。The embodiment of the present invention also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned image processing method embodiment are implemented, or the various processes of the above-mentioned neural network training method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
其中,該處理器為上述實施例中所述的電子設備中的處理器。該可讀存儲介質,包括電腦可讀存儲介質,如電腦唯讀記憶體(ROM)、隨機存取記憶體(RAM)、磁碟或者光碟等。The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
本發明實施例另提供了一種晶片,該晶片包括處理器和通信介面,該通信介面和該處理器耦合,該處理器用於運行程式或指令,實現上述圖像處理方法實施例的各個過程,或者實現上述神經網路的訓練方法實施例的各個過程,且能達到相同的技術效果,為避免重複,這裡不再贅述。The embodiment of the present invention further provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, or to implement the various processes of the above-mentioned neural network training method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
應理解,本發明實施例提到的晶片還可以稱為系統級晶片、系統晶片、晶片系統或片上系統晶片等。It should be understood that the chip mentioned in the embodiments of the present invention can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
本發明實施例提供一種電腦程式產品,該程式產品被存儲在存儲介質中,該程式產品被至少一個處理器執行以實現上述圖像處理方法實施例的各個過程,或者實現上述神經網路的訓練方法實施例的各個過程,且能達到相同的技術效果,為避免重複,這裡不再贅述。An embodiment of the present invention provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment, or to implement the various processes of the above-mentioned neural network training method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
需要說明的是,在本文中,術語「包括」、「包含」或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、物品或者裝置不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、物品或者裝置所固有的要素。在沒有更多限制的情況下,由語句「包括一個……」限定的要素,並不排除在包括該要素的過程、方法、物品或者裝置中還存在另外的相同要素。此外,需要指出的是,本發明實施方式中的方法和裝置的範圍不限按示出或討論的順序來執行功能,還可包括根據所屬的功能按基本同時的方式或按相反的順序來執行功能,例如,可以按不同於所描述的次序來執行所描述的方法,並且還可以添加、省去、或組合各種步驟。另外,參照某些示例所描述的特徵可在其他示例中被組合。It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present invention is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions to which they belong. For example, the described method may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通過以上的實施方式的描述,本領域的技術人員可以清楚地瞭解到上述實施例方法可借助軟體加必需的通用硬體平臺的方式來實現,當然也可以通過硬體,但很多情況下前者是更佳的實施方式。基於這樣的理解,本發明的技術方案本質上或者說對現有技術做出貢獻的部分可以以電腦軟體產品的形式體現出來,該電腦軟體產品存儲在一個存儲介質(如ROM/RAM、磁碟、光碟)中,包括若干指令用以使得一台終端(可以是手機,電腦,伺服器,或者網路設備等)執行本發明各個實施例所述的方法。Through the description of the above implementation, the technical personnel in this field can clearly understand that the above implementation method can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, disk, optical disk), including a number of instructions to enable a terminal (which can be a mobile phone, computer, server, or network equipment, etc.) to execute the methods described in each embodiment of the present invention.
上面結合附圖對本發明的實施例進行了描述,但是本發明並不局限於上述的具體實施方式,上述的具體實施方式僅僅是示意性的,而不是限制性的,本領域的普通技術人員在本發明的啟示下,在不脫離本發明宗旨和申請專利範圍所保護的範圍情況下,還可做出很多形式,均屬於本發明的保護之內。The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are only illustrative and not restrictive. Under the inspiration of the present invention, ordinary technical personnel in this field can make many forms without departing from the scope protected by the purpose of the present invention and the scope of the patent application, all of which are within the protection of the present invention.
S101~S103、201~203、S401~S405、501~504:步驟 600:圖像處理裝置 601:劃分模組 602:第一處理模組 603:第二處理模組 700:神經網路的訓練裝置 701:獲取模組 702:第一訓練模組 703:第二訓練模組 704:第三訓練模組 705:第四訓練模組 800:電子設備 801:處理器 802:記憶體 900:電子設備 901:射頻單元 902:網路模組 903:音訊輸出單元 904:輸入單元 9041:圖形處理器 9042:麥克風 905:感測器 906:顯示單元 9061:顯示面板 907:使用者輸入單元 9071:觸控面板 9072:輸入裝置 908:介面單元 909:記憶體 910:處理器 S101~S103, 201~203, S401~S405, 501~504: Steps 600: Image processing device 601: Segmentation module 602: First processing module 603: Second processing module 700: Neural network training device 701: Acquisition module 702: First training module 703: Second training module 704: Third training module 705: Fourth training module 800: Electronic equipment 801: Processor 802: Memory 900: Electronic equipment 901: RF unit 902: Network module 903: Audio output unit 904: Input unit 9041: Graphics processor 9042: Microphone 905: Sensor 906: Display unit 9061: Display panel 907: User input unit 9071: Touch panel 9072: Input device 908: Interface unit 909: Memory 910: Processor
圖1是本發明實施例提供的圖像處理方法的流程圖; 圖2是本發明實施例提供的圖像處理方法的應用流程圖之一; 圖3是本發明實施例提供的圖像處理方法的應用流程圖之二; 圖4是本發明實施例提供的神經網路的訓練方法的流程圖; 圖5是本發明實施例提供的神經網路的訓練方法的應用流程圖; 圖6是本發明實施例提供的圖像處理裝置的結構圖; 圖7是本發明實施例提供的神經網路的訓練裝置的結構圖; 圖8是本發明實施例提供的電子設備的結構圖; 圖9是本發明實施例提供的電子設備的硬體結構圖。 FIG. 1 is a flow chart of an image processing method provided by an embodiment of the present invention; FIG. 2 is one of the application flow charts of the image processing method provided by an embodiment of the present invention; FIG. 3 is one of the application flow charts of the image processing method provided by an embodiment of the present invention; FIG. 4 is a flow chart of a neural network training method provided by an embodiment of the present invention; FIG. 5 is an application flow chart of a neural network training method provided by an embodiment of the present invention; FIG. 6 is a structural diagram of an image processing device provided by an embodiment of the present invention; FIG. 7 is a structural diagram of a neural network training device provided by an embodiment of the present invention; FIG. 8 is a structural diagram of an electronic device provided by an embodiment of the present invention; FIG. 9 is a hardware structural diagram of an electronic device provided by an embodiment of the present invention.
S101~S103:步驟 S101~S103: Steps
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112106458A TWI876278B (en) | 2023-02-22 | 2023-02-22 | Image processing method, neural network training method, device and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112106458A TWI876278B (en) | 2023-02-22 | 2023-02-22 | Image processing method, neural network training method, device and medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202435162A TW202435162A (en) | 2024-09-01 |
| TWI876278B true TWI876278B (en) | 2025-03-11 |
Family
ID=93609636
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW112106458A TWI876278B (en) | 2023-02-22 | 2023-02-22 | Image processing method, neural network training method, device and medium |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI876278B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW201837854A (en) * | 2017-04-10 | 2018-10-16 | 南韓商三星電子股份有限公司 | System and method for deep learning image super-resolution |
| TW202207093A (en) * | 2020-06-25 | 2022-02-16 | 英商普立N科技有限公司 | Analog hardware realization of neural networks |
| TW202228081A (en) * | 2020-12-17 | 2022-07-16 | 大陸商華為技術有限公司 | Method and apparatus for reconstruct image from bitstreams and encoding image into bitstreams, and computer program product |
| US20220321879A1 (en) * | 2021-03-30 | 2022-10-06 | Isize Limited | Processing image data |
-
2023
- 2023-02-22 TW TW112106458A patent/TWI876278B/en active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW201837854A (en) * | 2017-04-10 | 2018-10-16 | 南韓商三星電子股份有限公司 | System and method for deep learning image super-resolution |
| TW202207093A (en) * | 2020-06-25 | 2022-02-16 | 英商普立N科技有限公司 | Analog hardware realization of neural networks |
| TW202228081A (en) * | 2020-12-17 | 2022-07-16 | 大陸商華為技術有限公司 | Method and apparatus for reconstruct image from bitstreams and encoding image into bitstreams, and computer program product |
| US20220321879A1 (en) * | 2021-03-30 | 2022-10-06 | Isize Limited | Processing image data |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202435162A (en) | 2024-09-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12223624B2 (en) | Image display method and apparatus, and device and medium | |
| CN104394422B (en) | A kind of Video segmentation point acquisition methods and device | |
| WO2021008166A1 (en) | Method and apparatus for virtual fitting | |
| CN110909790A (en) | Image style transfer method, device, terminal and storage medium | |
| CN112532882B (en) | Image display method and device | |
| CN115514860B (en) | Dynamic frame rate compensation method, image processing circuit and electronic equipment | |
| CN103959220A (en) | Method for achieving augmented reality, and user equipment | |
| WO2024213025A1 (en) | Hand modeling method, hand model processing method, device, and medium | |
| CN114143568B (en) | Method and device for determining augmented reality live image | |
| CN116193049A (en) | Video processing method, device, computer equipment and storage medium | |
| WO2021169501A1 (en) | Living body video picture processing method and apparatus, computer device, and storage medium | |
| CN110956106B (en) | Live broadcast on-demand processing method, device, storage medium and equipment | |
| CN114170472A (en) | Image processing method, readable storage medium and computer terminal | |
| TWI876278B (en) | Image processing method, neural network training method, device and medium | |
| CN112202958A (en) | Screenshot method and device and electronic equipment | |
| CN115471778A (en) | Transition video generation method and device, electronic equipment and storage medium | |
| WO2025067090A1 (en) | Image processing method and apparatus, and electronic device and medium | |
| WO2024251063A1 (en) | Gain map encoding method and apparatus, gain map decoding method and apparatus, device, and medium | |
| CN115242981B (en) | Video playback method, video playback device and electronic device | |
| US11457247B1 (en) | Edge computing method and apparatus, edge device and storage medium | |
| WO2024174971A1 (en) | Video processing method and apparatus, and device and storage medium | |
| CN113793410B (en) | Video processing method, device, electronic device and storage medium | |
| WO2024088132A1 (en) | Target-image display method and display apparatus, and electronic device and storage medium | |
| CN114286002B (en) | Image processing circuit, method, device, electronic device and chip | |
| CN115272127B (en) | Model training method and device, electronic equipment and readable storage medium |