Image generation method and image processing system
By establishing multiple image processing models and training them with corresponding training datasets, and dynamically selecting the target model to process the input image, the problem of decreased image processing performance of artificial intelligence models after image size changes is solved, and the stability and improvement of 3D image quality are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ACER INC
- Filing Date
- 2024-10-30
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, the image processing efficiency of artificial intelligence models decreases after the image size changes, resulting in poor 3D image quality.
Multiple image processing models are established, each corresponding to a different candidate image size. These models are trained using the corresponding training datasets. The target model is dynamically selected for processing by detecting the size of the input image, generating depth information to form a 3D image.
Even with changes in image size, the image quality of 3D images can still be effectively maintained or improved by dynamically selecting models, thus solving the problem of decreased image processing performance in traditional technologies.
Smart Images

Figure CN121962408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an image processing technology, and more particularly to an image generation method and an image processing system. Background Technology
[0002] With the advancement of technology, image processing techniques have become increasingly diverse to meet user needs. In related technical fields, image processing and rendering techniques that use artificial intelligence models to convert 2D images into 3D images are receiving increasing attention. However, limited by the availability of training data and the inherent limitations of artificial intelligence models, even if an AI model is trained with as much data as possible during the training phase, its image processing performance may fall short of expectations once the size (e.g., resolution) of the image to be processed changes after deployment. This can lead to a decrease in the image quality of the subsequently generated 3D image. Summary of the Invention
[0003] The present invention provides an image generation method and an image processing system that can improve the above-mentioned problems.
[0004] An embodiment of the present invention provides an image generation method, comprising: establishing a plurality of image processing models, wherein the plurality of image processing models respectively correspond to a plurality of candidate image sizes; obtaining a plurality of training datasets, wherein the plurality of training datasets respectively correspond to the plurality of candidate image sizes; training the plurality of image processing models respectively using the plurality of training datasets; detecting a first image size of an input image, wherein the input image is a two-dimensional image; determining a target image processing model from the plurality of image processing models according to the first image size; processing the input image through the target image processing model to generate depth information corresponding to the input image; and generating a first output image and a second output image according to the depth information, wherein the first output image and the second output image are used to form a three-dimensional image corresponding to the input image.
[0005] An embodiment of the present invention further provides an image processing system, comprising a storage device and a processor. The storage device is used to store a plurality of image processing models and a plurality of training datasets. The processor is connected to the storage device. The processor is configured to: establish the plurality of image processing models, wherein the plurality of image processing models respectively correspond to a plurality of candidate image sizes; obtain the plurality of training datasets, wherein the plurality of training datasets respectively correspond to the plurality of candidate image sizes; train the plurality of image processing models using the plurality of training datasets respectively; detect a first image size of an input image, wherein the input image is a two-dimensional image; determine a target image processing model from the plurality of image processing models based on the first image size; process the input image using the target image processing model to generate depth information corresponding to the input image; and generate a first output image and a second output image based on the depth information, wherein the first output image and the second output image are used to form a three-dimensional image corresponding to the input image.
[0006] Based on the above, the image generation method and image processing system provided by this invention can train multiple image processing models for different image sizes during the model training phase. Then, by dynamically detecting the image size of the input image, the target image processing model can determine from the multiple image processing models and use it to generate depth information corresponding to the input image. This depth information can then be used to generate a first output image and a second output image. In particular, the first and second output images can be used to form a three-dimensional image corresponding to the input image. Therefore, even if the size (e.g., resolution) of the image to be processed changes, the image quality of the three-dimensional image generated by the artificial intelligence model can still be effectively maintained or even improved, thereby overcoming the shortcomings of traditional image processing techniques. Attached Figure Description
[0007] Figure 1 This is a schematic diagram of an image processing system according to an embodiment of the present invention;
[0008] Figure 2 This is a schematic diagram illustrating the use of different training datasets to train an image processing model according to an embodiment of the present invention;
[0009] Figure 3 This is a schematic diagram illustrating the resizing operation of a benchmark training image according to an embodiment of the present invention;
[0010] Figure 4 This is a schematic diagram illustrating the adjustment of the logic layer in the image processing model according to different candidate image sizes, as shown in an embodiment of the present invention.
[0011] Figure 5This is a schematic diagram illustrating the generation of a first output image and a second output image based on an input image, according to an embodiment of the present invention.
[0012] Figure 6 This is a flowchart illustrating an image generation method according to an embodiment of the present invention. Detailed Implementation
[0013] Reference will now be made in detail to exemplary embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same element references are used in the drawings and description to denote the same or similar parts.
[0014] Figure 1 This is a schematic diagram of an image processing system according to an embodiment of the present invention. Please refer to... Figure 1 The image processing system 10 can be applied to or installed in one or more electronic devices that support image processing functions, such as smartphones, tablet computers, laptop computers, desktop computers, servers, game consoles or in-vehicle computers, and the types of electronic devices are not limited thereto.
[0015] The image processing system 10 includes a processor 11, a storage device 12, and a display 13. The processor 11 is responsible for the overall or partial operation of the image processing system 10. For example, the processor 11 may include a central processing unit (CPU), a graphics processing unit (GPU), or other programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers, application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or other similar devices or combinations thereof.
[0016] In one embodiment, the processor 11 may further include processors dedicated to assisting in performing neural network operations and / or image processing, such as a vision processing unit (VPU), a neural network processing unit (NPU), and / or a tensor processing unit (TPU). Furthermore, the present invention does not limit the number or type of processor 11.
[0017] Storage device 12 is connected to processor 11 and used to store data. For example, storage device 12 may include volatile storage circuitry and non-volatile storage circuitry. Volatile storage circuitry is used to volatilely store data. For example, volatile storage circuitry may include random access memory (RAM) or similar volatile storage media. Non-volatile storage circuitry is used to non-volatilely store data. For example, non-volatile storage circuitry may include read-only memory (ROM), solid-state disk (SSD), hard disk drive (HDD), or similar non-volatile storage media. Furthermore, the present invention does not limit the number or type of storage device 12.
[0018] Display 13 is connected to processor 11 and used to display images. For example, display 13 may include a plasma display, liquid crystal display (LCD), thin film transistor liquid crystal display (TFT-LCD), organic light-emitting diode (OLED), and light-emitting diode display (LED), and the type of display 13 is not limited to these. For example, display 13 may be a head-mounted display or other types of display.
[0019] In one embodiment, the processor 11 may establish image processing models 101(1) to 101(n). For example, the total number of image processing models 101(1) to 101(n) may be any number greater than one, and the present invention does not limit this. The processor 11 may store the image processing models 101(1) to 101(n) in the storage device 12.
[0020] In one embodiment, any one of the image processing models 101(1) to 101(n) can be used alone to perform depth estimation on an image (also known as an input image) to generate depth information corresponding to the input image. For example, the depth information may reflect the depth values corresponding to at least some pixel locations in the input image.
[0021] In one embodiment, any one of the image processing models 101(1) to 101(n) is implemented using a Multiple Depth Estimation Accuracy with Single Network (MiDaS) model, and the present invention is not limited thereto. In one embodiment, any one of the image processing models 101(1) to 101(n) may also be implemented using neural network architectures such as Deep Neural Networks (DNN), Recurrent Neural Networks (RNN) and / or Convolutional Neural Networks (CNN), or various computational architectures such as Artificial Neural Networks (ANN), and the present invention is not limited thereto.
[0022] In one embodiment, image processing models 101(1) to 101(n) correspond to multiple image sizes (also called candidate image sizes). In particular, the multiple candidate image sizes are different from each other.
[0023] In one embodiment, the image size of an image can be represented by its resolution or aspect ratio. For example, in terms of resolution, the image size can be represented as 512×288, 512×320, or 512×384, etc. Alternatively, in terms of aspect ratio, the image size can be represented as 16:9, 16:10, or 4:3, etc. Furthermore, any of the plurality of candidate image sizes can be set or adjusted according to practical needs, and this invention does not impose any limitations.
[0024] In one embodiment, the processor 11 may obtain multiple training datasets 102(1) to 102(n). For example, the total number of training datasets 102(1) to 102(n) may be equal to the total number of image processing models 101(1) to 101(n). Furthermore, the processor 11 may store the training datasets 102(1) to 102(n) in the storage circuit 12.
[0025] In one embodiment, training datasets 102(1) to 102(n) correspond to the plurality of candidate image sizes, respectively. In particular, similar to image processing models 101(1) to 101(n), training datasets 102(1) to 102(n) may correspond to different candidate image sizes, respectively.
[0026] In one embodiment, each of the training datasets 102(1) to 102(n) may include multiple images (also referred to as training images). In one embodiment, during the model training phase, the processor 11 may use the training datasets 102(1) to 102(n) to train the image processing models 101(1) to 101(n) respectively.
[0027] Figure 2 This is a schematic diagram illustrating the training of an image processing model using different training datasets according to an embodiment of the present invention. Please refer to... Figure 2 Assume that the training datasets 102(1) to 102(n) include training datasets 102(i) (also known as the first training dataset) and 102(j) (also known as the second training dataset), and the image processing models 101(1) to 101(n) include image processing models 101(i) (also known as the first image processing model) and 101(j) (also known as the second image processing model). i and j are integers between 1 and n, and i is different from j. Furthermore, assume that the training dataset 102(i) includes images 21(1) to 21(m). The training dataset 102(j) includes images 22(1) to 22(k). For example, images 21(1) to 21(m) and 22(1) to 22(k) are all training images. Furthermore, m and k can both be any integer greater than 1.
[0028] In one embodiment, images 21(1) to 21(m) all have the same image size (also referred to as the first candidate image size). For example, the first candidate image size may be 512×288 (or 16:9), and the present invention is not limited thereto. In one embodiment, both the training dataset 102(i) and the image processing model 101(i) correspond to the first candidate image size. In one embodiment, the processor 11 may (only) use images 21(1) to 21(m) in the training dataset 102(i) to train the image processing model 101(i) to improve the image processing model 101(i)'s ability to predict depth information of images with the first candidate image size.
[0029] In one embodiment, images 22(1) to 22(k) all have the same image size (also referred to as the second candidate image size). It should be noted that the second candidate image size is different from the first candidate image size. For example, the second candidate image size may be 512×384 (or 4:3), and the present invention is not limited thereto. In one embodiment, both the training dataset 102(j) and the image processing model 101(j) correspond to the second candidate image size. In one embodiment, the processor 11 may (only) use images 22(1) to 22(k) in the training dataset 102(j) to train the image processing model 101(j) to improve the image processing model 101(j)'s ability to predict the depth information of images with the second candidate image size.
[0030] In one embodiment, the processor 11 does not use the training dataset 102(j) (e.g., images 22(1) to 22(k)) to train the image processing model 101(i) to avoid affecting the image processing model 101(i)'s ability to predict depth information of images with a first candidate image size. In another embodiment, the processor 11 does not use the training dataset 102(i) (e.g., images 21(1) to 21(m)) to train the image processing model 101(j) to avoid affecting the image processing model 101(j)'s ability to predict depth information of images with a second candidate image size.
[0031] In one embodiment, during the model usage phase, a trained image processing model 101(i) (i.e., the first image processing model) is dedicated to processing an image (also referred to as the first image) having a first candidate image size, in order to accurately generate depth information (also referred to as first depth information) corresponding to the first image. For example, the first image may include any one of images 21(1) to 21(m). The first depth information can be used to describe the depth values corresponding to at least a portion of the pixel locations in the first image.
[0032] In one embodiment, during the model usage phase, a trained image processing model 101(j) (i.e., the second image processing model) is dedicated to processing an image (also referred to as the second image) having a second candidate image size to accurately generate depth information (also referred to as second depth information) corresponding to the second image. For example, the second image may include any of images 22(1) to 22(k). The second depth information can be used to describe the depth corresponding to at least a portion of the pixel locations in the second image.
[0033] In one embodiment, the depth prediction accuracy of the trained image processing model 101(i) for an image with a first candidate image size (i.e., the first image) may be higher than the depth prediction accuracy of the trained image processing model 101(j) for the first image. In another embodiment, the depth prediction accuracy of the trained image processing model 101(j) for an image with a second candidate image size (i.e., the second image) may be higher than the depth prediction accuracy of the trained image processing model 101(i) for the second image.
[0034] In one embodiment, the trained image processing model 101(i) may achieve a higher accuracy in depth prediction for the first image than the trained image processing model 101(i) may achieve a higher accuracy in depth prediction for the second image than the trained image processing model 101(j) may achieve a higher accuracy in depth prediction for the first image than the trained image processing model 101(j) may achieve a higher accuracy in depth prediction for the second image than the trained image processing model 101(j) may achieve a higher accuracy in depth prediction for the first image.
[0035] In one embodiment, processor 11 may acquire at least one image (also referred to as a baseline training image). The baseline training image may have at least one image size (also referred to as a baseline image size). Processor 11 may perform a resizing operation on the baseline training image to generate a training image having at least one image size (also referred to as a target candidate image size). For example, the target candidate image size may be different from the baseline image size. For example, the resizing operation may include image processing operations such as scaling, cropping, rotating, and / or color adjustment performed on the baseline training image to change the size, orientation, and / or color of the baseline training image, etc. Then, processor 11 may add the resulting training image to the training datasets 102(1) to 102(n) corresponding to the training datasets of the target candidate image size.
[0036] In one embodiment, it is assumed that the target candidate image size is the first candidate image size. The processor 11 may perform a resizing operation (also referred to as a first resizing operation) on the benchmark training image to generate a training image (also referred to as a first training image) with the first candidate image size. Then, the processor 11 may add the first training image to the training dataset 102(i) (i.e., the first training dataset) to expand the total number of images 21(1) to 21(m) (i.e., training images) in the training dataset 102(i).
[0037] In one embodiment, it is assumed that the target candidate image size is the second candidate image size. The processor 11 may perform a resizing operation (also referred to as a second resizing operation) on the baseline training image to generate a training image (also referred to as a second training image) with the second candidate image size. The first resizing operation may be different from the second resizing operation. Then, the processor 11 may add the second training image to the training dataset 102(j) (i.e., the second training dataset) to expand the total number of images 22(1) to 22(k) (i.e., training images) in the training dataset 102(j).
[0038] Figure 3 This is a schematic diagram illustrating the resizing operation of a benchmark training image according to an embodiment of the present invention. Please refer to... Figure 3 Assume that image 31 is the baseline training image. For example, the image size of image 31 (i.e., the baseline image size) can be 436×436, and the present invention is not limited thereto.
[0039] In one embodiment, the processor 11 may perform multiple resizing operations on the image 31 to generate images (i.e., training images) 32-34 with different image sizes. For example, the image sizes of images 32-34 may be 1024×576, 576×1024, and 1024×1024, respectively, and the present invention is not limited thereto. Then, the processor 11 may add images 32-34 to at least one of the training datasets 102(1)-102(n) according to their respective image sizes.
[0040] In one embodiment, the processor 11 may adjust at least one logic layer in the image processing model 101(i) according to the image size (i.e., the first candidate image size) corresponding to the image processing model 101(i) (i.e., the first image processing model), so that the adjusted logic layer is suitable for processing an image (i.e., the first image) having the first candidate image size. For example, in one embodiment, it is assumed that the image processing model 101(i) was originally unsuitable for processing the first image (e.g., unsuitable for performing depth prediction on the first image) or did not have the ability to process the first image (e.g., did not have the ability to perform depth prediction on the first image). After adjusting at least one logic layer in the image processing model 101(i) according to the first candidate image size, the adjusted logic layer in the image processing model 101(i) may be suitable for processing the first image (e.g., suitable for performing depth prediction on the first image) or have the ability to process the first image (e.g., have the ability to perform depth prediction on the first image).
[0041] On the other hand, the processor 11 can adjust at least one logic layer in the image processing model 101(j) according to the image size (i.e., the second candidate image size) corresponding to the image processing model 101(j) (i.e., the second image processing model), so that the adjusted logic layer is suitable for processing an image (i.e., the second image) with the second candidate image size. For example, in one embodiment, it is assumed that the image processing model 101(j) was originally unsuitable for processing the second image (e.g., unsuitable for performing depth prediction on the second image) or did not have the ability to process the second image (e.g., did not have the ability to perform depth prediction on the second image). After adjusting at least one logic layer in the image processing model 101(j) according to the second candidate image size, the adjusted logic layer in the image processing model 101(j) may be suitable for processing the second image (e.g., suitable for performing depth prediction on the second image) or have the ability to process the second image (e.g., have the ability to perform depth prediction on the second image).
[0042] Figure 4 This is a schematic diagram illustrating the adjustment of the logic layer in the image processing model according to different candidate image sizes, as shown in an embodiment of the present invention. Please refer to... Figure 4Assume that the image processing model 101(i) includes logic layers 401(1)~401(s) (labeled as L(1)~L(s)), and the image processing model 101(j) includes logic layers 411(1)~411(s) (labeled as L(1)~L(s)).
[0043] In one embodiment, the processor 11 may adjust at least one of the logic layers 401(1) to 401(s) according to the size of the first candidate image, such that the adjusted logic layer (i.e., at least one of the logic layers 401(1) to 401(s)) is suitable for processing an image (i.e., the first image) having the size of the first candidate image. For example, the processor 11 may adjust the matrix operation size (also referred to as the first matrix operation size) supported by at least one of the logic layers 401(1) to 401(s) according to the size of the first candidate image, such that the adjusted first matrix operation size is the same as the size of the first candidate image.
[0044] In one embodiment, the processor 11 may adjust at least one of the logic layers 411(1) to 411(s) according to the second candidate image size, such that the adjusted logic layer (i.e., at least one of the logic layers 411(1) to 411(s)) is suitable for processing an image (i.e., the second image) having the second candidate image size. For example, the processor 11 may adjust the matrix operation size (also referred to as the second matrix operation size) supported by at least one of the logic layers 411(1) to 411(s) according to the second candidate image size, such that the adjusted second matrix operation size is the same as the second candidate image size.
[0045] In one embodiment, after training the image processing models 101(1) to 101(n), the processor 11 can acquire at least one image (i.e., the input image) and detect the image size of the input image (also referred to as the first image size). In particular, this input image is a two-dimensional (2D) image.
[0046] In one embodiment, the processor 11 may determine an image processing model (also referred to as a target image processing model) from image processing models 101(1) to 101(n) based on a first image size. In one embodiment, the image size (also referred to as the target image size) corresponding to the target image processing model is closer to the first image size than the other image processing models in image processing models 101(1) to 101(n). It should be noted that the target image size may be the same as or different from the first image size, and this invention does not impose any limitations.
[0047] In one embodiment, the processor 11 may compare a first image size with at least one of the plurality of candidate image sizes to obtain a comparison result. For example, this comparison result may reflect that the first image size is closest to (or the same as) one of the plurality of candidate image sizes (i.e., the target image size). Then, the processor 11 may determine a target image processing model from image processing models 101(1) to 101(n) based on this comparison result. For example, the processor 11 may determine the image processing model corresponding to the target image size from image processing models 101(1) to 101(n) as the target image processing model based on this comparison result.
[0048] In one embodiment, the processor 11 can process the input image using a target image processing model to generate depth information corresponding to the input image. For example, this depth information may reflect the depth values corresponding to at least a portion of the pixel locations in the input image. In one embodiment, this depth information may include a depth map corresponding to the input image.
[0049] In one embodiment, after obtaining depth information corresponding to the input image, the processor 11 can generate a first output image and a second output image based on this depth information. Specifically, the first output image and the second output image can be used to form a three-dimensional (3D) image corresponding to the input image. In one embodiment, the first output image and the second output image can be the left-eye image and the right-eye image corresponding to the input image, respectively.
[0050] In one embodiment, after acquiring the first output image and the second output image, the processor 11 may further instruct the display 13 to synchronously or interleave the first output image and the second output image to form a three-dimensional image corresponding to the input image. The synchronous or interleave of the first output image and the second output image by the display 13 depends on the type of display 13 and is not limited thereto. Subsequently, when a user views the synchronously or interleaved first output image and the second output image by the display 13 with their eyes, the first output image and the second output image can form (or project) a three-dimensional image (i.e., a stereoscopic image) corresponding to the input image on the retina of the user's eyes.
[0051] Figure 5 This is a schematic diagram illustrating the generation of a first output image and a second output image based on an input image, according to an embodiment of the present invention. Please refer to... Figure 5Assume that image 51 is the input image. Furthermore, assume that for image processing models 101(1) to 101(n), the image size of image 51 (i.e., the first image size) is closest to (or the same as) the candidate image size corresponding to image processing model 101(i). For example, assuming the first image size is 512×288 (or 16:9), then the candidate image size corresponding to image processing model 101(i) is also 512×288 (or 16:9).
[0052] In one embodiment, after detecting the image size of image 51 (i.e., the first image size), processor 11 can select image processing model 101(i) from image processing models 101(1) to 101(n) as the target image processing model based on the first image size. After determining the target image processing model (i.e., image processing model 101(i)), processor 11 can input image 51 into image processing model 101(i) for processing, so as to perform depth prediction on image 51 through image processing model 101(i). Based on the processing result of image processing model 101(i) on image 51 (i.e., the depth prediction result), processor 11 can obtain depth information 52 corresponding to image 51. Processor 11 can generate a left-eye image (i.e., the first output image) 531 and a right-eye image (i.e., the second output image) 532 based on the depth information 52. The left-eye image 531 and the right-eye image 532 can be used to form a three-dimensional image (i.e., a stereoscopic image) corresponding to image 51. It should be noted that the operation of generating the left eye image (i.e., the first output image) and the right eye image (i.e., the second output image) based on depth information is existing technology and will not be elaborated here.
[0053] In one embodiment, the processor 11 may also obtain another image size (also referred to as a second image size). The second image size is different from the first image size. Then, the processor 11 may adjust the image sizes of the first output image and the second output image from the first image size to the second image size according to the second image size. Figure 5 For example, suppose that both the left-eye image 531 and the right-eye image 532 have a first image size. After obtaining the second image size, the processor 11 can perform a size adjustment operation on the left-eye image 531 and the right-eye image 532 so that the adjusted left-eye image 531 and the right-eye image 532 both have the second image size.
[0054] In one embodiment, the processor 11 can detect the resolution of the display 13. Then, the processor 11 can determine the second image size based on the resolution of the display 13. For example, the processor 11 can set the second image size to be consistent with (e.g., the same as or close to) the resolution of the display 13. For example, assuming the first image size is 512×288 (or 16:9) and the resolution of the display 13 is 1440×1440, the processor 11 can set the second image size to 1440×1440 (or 1:1) based on the resolution of the display 13. Then, the processor 11 can synchronize or sequentially adjust the image sizes of the left-eye image 531 and the right-eye image 532 to 1440×1440 (or 1:1) (i.e., the second image size). Thus, during the period when the display 13 presents the left-eye image 531 and the right-eye image 532, the image presentation quality of the left-eye image 531 and the right-eye image 532 can be improved.
[0055] Figure 6 This is a flowchart illustrating an image generation method according to an embodiment of the present invention. Please refer to... Figure 6 In step S601, multiple image processing models are established, each corresponding to a multiple candidate image size. In step S602, multiple training datasets are obtained, each corresponding to a multiple candidate image size. In step S603, the multiple image processing models are trained using the multiple training datasets. In step S604, a first image size of the input image is detected, where the input image is a two-dimensional image. In step S605, a target image processing model is determined from the multiple image processing models based on the first image size. In step S606, the input image is processed by the target image processing model to generate depth information corresponding to the input image. In step S607, a first output image and a second output image are generated based on the depth information, where the first output image and the second output image are used to form a three-dimensional image corresponding to the input image.
[0056] However, Figure 6 Each step has been explained in detail above and will not be repeated here. It is worth noting that... Figure 6 Each step can be implemented as multiple program codes or circuits, and this invention is not limited thereto. Furthermore, Figure 6 The method can be used in conjunction with the above examples and embodiments, or it can be used alone. This invention does not impose any limitations.
[0057] In summary, the image generation method and image processing system proposed in the embodiments of the present invention can train multiple image processing models using training datasets corresponding to different image sizes during the model training phase. Subsequently, during the model usage phase, the image size of the input image can be detected to dynamically select a suitable image processing model for processing the input image. This effectively improves the prediction accuracy of the image processing model for the depth information of the input image, thereby improving the image quality of the subsequently generated (or presented) 3D image and effectively addressing the shortcomings of traditional image processing techniques.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image generation method, characterized in that, include: Multiple image processing models are established, wherein each of the multiple image processing models corresponds to a multiple candidate image size; Obtain multiple training datasets, wherein the multiple training datasets correspond to the multiple candidate image sizes respectively; The multiple image processing models are trained using the multiple training datasets respectively; Detect the first image size of the input image, wherein the input image is a two-dimensional image; Based on the first image size, a target image processing model is determined from the plurality of image processing models; The input image is processed by the target image processing model to generate depth information corresponding to the input image; as well as Based on the depth information, a first output image and a second output image are generated, wherein the first output image and the second output image are used to form a three-dimensional image corresponding to the input image.
2. The image generation method according to claim 1, wherein the plurality of image processing models includes a first image processing model and a second image processing model, the first image processing model corresponds to a first candidate image size among the plurality of candidate image sizes, the second image processing model corresponds to a second candidate image size among the plurality of candidate image sizes, and the step of training the plurality of image processing models respectively using the plurality of training datasets includes: The first image processing model is trained using the first training dataset, which corresponds to the size of the first candidate image, from among the plurality of training datasets. as well as The second image processing model is trained using a second training dataset that corresponds to the second candidate image size from among the plurality of training datasets.
3. The image generation method according to claim 2, wherein the trained first image processing model is specifically designed to process a first image having the first candidate image size to generate first depth information corresponding to the first image, and The trained first image processing model is dedicated to processing a second image having the second candidate image size to generate second depth information corresponding to the second image.
4. The image generation method according to claim 1, wherein the step of obtaining the plurality of training datasets includes: Obtain a benchmark training image, wherein the benchmark training image has a benchmark image size; The reference training image is resized to generate a training image with a target candidate image size among the plurality of candidate image sizes; as well as The training images are added to the training dataset corresponding to the target candidate image size in the plurality of training datasets.
5. The image generation method according to claim 1, wherein the step of establishing the plurality of image processing models includes: Based on the size of the first candidate image corresponding to the first image processing model among the plurality of image processing models, at least one logic layer in the first image processing model is adjusted so that the at least one logic layer is suitable for processing the first image having the size of the first candidate image.
6. The image generation method according to claim 1, wherein the target image size corresponding to the target image processing model is closer to the first image size than other image processing models among the plurality of image processing models.
7. The image generation method according to claim 1, wherein the step of determining the target image processing model from the plurality of image processing models based on the first image size includes: The first image size is compared with at least one of the plurality of candidate image sizes to obtain a comparison result; as well as Based on the comparison results, the target image processing model is determined from the plurality of image processing models.
8. The image generation method according to claim 1, wherein the step of generating the first output image and the second output image based on the depth information includes: Obtain a second image size, wherein the second image size is different from the first image size; as well as Based on the second image size, the image sizes of the first output image and the second output image are adjusted from the first image size to the second image size.
9. The image generation method according to claim 8, wherein the step of obtaining the second image size includes: The resolution of the display is detected, wherein the display is preset to display the first output image and the second output image; as well as The second image size is determined based on the resolution of the display.
10. An image processing system, characterized in that, include: Storage device for storing multiple image processing models and multiple training datasets; as well as The processor is connected to the storage device. The processor is used to: Establish the plurality of image processing models, wherein the plurality of image processing models correspond to the plurality of candidate image sizes respectively; Obtain the plurality of training datasets, wherein the plurality of training datasets respectively correspond to the plurality of candidate image sizes; The multiple image processing models are trained using the multiple training datasets respectively; Detect the first image size of the input image, wherein the input image is a two-dimensional image; Based on the first image size, a target image processing model is determined from the plurality of image processing models; The input image is processed by the target image processing model to generate depth information corresponding to the input image; as well as Based on the depth information, a first output image and a second output image are generated, wherein the first output image and the second output image are used to form a three-dimensional image corresponding to the input image.
11. The image processing system of claim 10, wherein the plurality of image processing models includes a first image processing model and a second image processing model, the first image processing model corresponding to a first candidate image size among the plurality of candidate image sizes, the second image processing model corresponding to a second candidate image size among the plurality of candidate image sizes, and the operation of the processor training the plurality of image processing models using the plurality of training datasets respectively includes: The first image processing model is trained using the first training dataset, which corresponds to the size of the first candidate image, from among the plurality of training datasets. as well as The second image processing model is trained using a second training dataset that corresponds to the second candidate image size from among the plurality of training datasets.
12. The image processing system of claim 11, wherein the trained first image processing model is dedicated to processing a first image having the first candidate image size to generate first depth information corresponding to the first image, and The trained first image processing model is dedicated to processing a second image having the second candidate image size to generate second depth information corresponding to the second image.
13. The image processing system of claim 10, wherein the operation of the processor acquiring the plurality of training datasets includes: Obtain a benchmark training image, wherein the benchmark training image has a benchmark image size; The reference training image is resized to generate a training image with a target candidate image size among the plurality of candidate image sizes; as well as The training images are added to the training dataset corresponding to the target candidate image size in the plurality of training datasets.
14. The image processing system according to claim 10, wherein the operation of the processor establishing the plurality of image processing models includes: Based on the size of the first candidate image corresponding to the first image processing model among the plurality of image processing models, at least one logic layer in the first image processing model is adjusted so that the at least one logic layer is suitable for processing the first image having the size of the first candidate image.
15. The image processing system of claim 10, wherein the target image size corresponding to the target image processing model is closer to the first image size than the other image processing models among the plurality of image processing models.
16. The image processing system of claim 10, wherein the operation of the processor determining the target image processing model from the plurality of image processing models based on the first image size includes: The first image size is compared with at least one of the plurality of candidate image sizes to obtain a comparison result; as well as Based on the comparison results, the target image processing model is determined from the plurality of image processing models.
17. The image processing system of claim 10, wherein the operation of the processor generating the first output image and the second output image based on the depth information includes: Obtain a second image size, wherein the second image size is different from the first image size; as well as Based on the second image size, the image sizes of the first output image and the second output image are adjusted from the first image size to the second image size.
18. The image processing system of claim 17, wherein the image processing system further comprises: The display is connected to the processor. The operation by which the processor obtains the second image size includes: Detecting the resolution of the display, wherein the display is preset to display the first output image and the second output image; and The second image size is determined based on the resolution of the display.