Image processing method and related device
By using the loss term in image processing model training to optimize the similarity of perspective features, the problem of insufficient utilization of perspective information in three-dimensional scenes is solved, and the geometric perception and prediction accuracy of the model are improved.
Patent Information
- Application Number
- PCT/CN2024/078728
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-27
- Filing Date
- 2024-02-27
- Publication Date
- 2024-09-06
AI Technical Summary
When processing images in three-dimensional scenes, the existing technology fails to effectively utilize the connection between images from different perspectives, resulting in insufficient feature extraction information and affecting the model's geometric perception ability and the accuracy of prediction results.
When training the model, the loss term is used to improve the similarity of feature information between images at the same point at different viewing angles, and to reduce the similarity of feature information at different points to enhance the model's understanding of perspective information and geometric perception capabilities.
It improves the image processing model's understanding of the connection between images from different perspectives, enhances geometric perception, and improves the richness of feature extraction and the accuracy of prediction results.
Smart Images

Figure CN2024078728_06092024_PF_FP
Abstract
Description
Image processing method and related device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 27, 2023, with application number 202310216763.9 and invention name “An image processing method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence, and in particular to an image processing method and related equipment. Background Art
[0003] Artificial Intelligence (AI) is the theory, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that seeks to understand the essence of intelligence and develop new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0004] In recent years, using artificial intelligence technology to perform various image processing tasks in three-dimensional (3D) scenes has become a common application of artificial intelligence, such as 3D scene reconstruction, 3D image classification, object detection in 3D images, semantic segmentation of 3D images, or other image processing tasks.
[0005] Specifically, multiple images of the same scene from multiple perspectives can be obtained, where each image is an image of the scene from one perspective. The aforementioned multiple images are input into the model, and the model is used to extract features from the images from each perspective to obtain feature information of each image; and then, a prediction result corresponding to the image processing task is generated based on the feature information of each image.
[0006] However, since the model extracts features from images at each perspective separately, it does not learn the connections between images from different perspectives. Therefore, a feature extraction solution that can obtain more information is urgently needed.
[0007] Summary of the Invention
[0008] An embodiment of the present application provides an image processing method and related equipment. The training objectives include improving the similarity between feature information in images of the same point in a first scene at different perspectives. Through the aforementioned scheme, when the trained first model is used to extract features from images of the same scene at different perspectives, the feature information in images of the same point in the scene at different perspectives will be more similar. The feature information obtained by the aforementioned first model can reflect the connection between images from different perspectives, which is conducive to obtaining richer information in the feature extraction stage. In addition, the model's ability to integrate information from multiple perspectives is also conducive to enhancing the model's geometric perception ability.
[0009] To solve the above technical problems, the embodiments of the present application provide the following technical solutions:
[0010] In a first aspect, an embodiment of the present application provides a model training method that can be used in three-dimensional scenes in the field of artificial intelligence, and the method includes: a training device obtains training samples, and the multiple images in the training samples include images of a first scene from multiple perspectives; illustratively, the first scene can be an environment, a person, an animal, an object, or other types of first scenes, etc. For example, the "environment" can be a traffic road environment, an indoor environment, a park environment, or other types of environments, etc.; "people" can be virtual characters or real characters; "animals" can be virtual animals or real animals, etc., which are not limited here.
[0011] The training device inputs the training samples into the first model, performs feature extraction through the first model, and obtains feature information of each image in the training samples; and trains the first model based on the feature information of each image in the training samples and the first loss term. The multiple images include a first image and a second image, and the goal of training using the first loss term includes improving the similarity between the first feature information and the second feature information. The first feature information includes feature information of a first point in the first image, and the second feature information includes feature information of a second point in the second image. The first point in the first image and the second point in the second image correspond to the same point in the first scene. In other words, projecting the same point in the three-dimensional first scene onto images from different perspectives can respectively obtain the first point in the first image and the second point in the second image. In other words, the purpose of training using the first loss term includes improving the similarity between feature information of points with the same semantics in images from different perspectives.
[0012] In this implementation, since the first loss term is used in the training process, the goal of training the first model using the first loss term includes improving the similarity between the first feature information and the second feature information. The first feature information includes the feature information of the first point in the first image, and the second feature information includes the feature information of the second point in the second image. The first point in the first image and the second point in the second image correspond to the same point in the first scene, that is, the training goal includes improving the similarity between the feature information of the same point in the first scene in images at different perspectives. Through the above-mentioned scheme, when the trained first model is used to extract features from images of the same scene at different perspectives, the feature information of the same point in the scene in images at different perspectives will be more similar. The feature information obtained by the above-mentioned first model can reflect the connection between images from different perspectives, which is conducive to obtaining richer information in the feature extraction stage; in addition, the model can integrate information from multiple perspectives, which is also conducive to enhancing the model's geometric perception ability.
[0013] In one possible implementation, the training device trains the first model based on the feature information of each image in the training sample and the first loss term, including: the training device trains the first model based on the feature information of each image in the training sample, the first loss term, and the second loss term, wherein a goal of training with the second loss term includes reducing the similarity between the first feature information and third feature information, the third feature information includes feature information of a third point in the second image, and the third point is different from the second point.
[0014] In this implementation, since the first point in the first image and the second point in the second image correspond to the same point in the first scene, and the third point is different from the second point, that is, the third point and the first point correspond to different points in the first scene, the purpose of using the second loss term for training includes reducing the similarity between the first feature information of the first point and the third feature information of the third point, that is, not only the feature information of the same point in the first scene in images at different perspectives will be more similar, but also the feature information of different points in the first scene in images at different perspectives will be less similar. The feature information obtained by the aforementioned first model can reflect more connections between images from different perspectives, which is conducive to further enhancing the geometric perception ability of the model, thereby improving the accuracy of the prediction results output by the first model.
[0015] In one possible implementation, the second point and the third point are both located on the first line, the second line is projected onto the second image to obtain the first line, the second line passes through the first point, and the second line also passes through the focus of the camera that captured the first image and / or the origin of the camera coordinate system corresponding to the first image. In an embodiment of the present application, after determining the first point, the second line can be obtained, and the first line in the second image can be determined by projecting the second line onto an image from another perspective (i.e., the second image). Points with the same semantics as the first point are generally located on the first line. Sampling the third point from the first line is beneficial to assisting the first model in learning which points in images from other perspectives are consistent with the points in the first scene corresponding to the first point, and which points in images from other perspectives are inconsistent with the points in the first scene corresponding to the first point, which is beneficial to further improve the accuracy of the prediction results output by the first model.
[0016] In one possible implementation, the feature information of each image in the training sample includes updated feature information of multiple first pixel points of each image in the training sample. The training device performs feature extraction through the first model to obtain feature information of each image in the training sample, including: the training device obtains the initial feature information of the second pixel point, the first pixel point and the second pixel point are points in different images of the multiple images, and the first pixel point and the second pixel point have the same semantics; the training device fuses the initial feature information of the first pixel point with the initial feature information of the second pixel point to obtain the updated feature information of the first pixel point. Optionally, the feature information of each image in the training sample can also include the initial feature information of the fourth pixel point in each image, and the fourth pixel point and the first pixel point are different pixel points in the same image.
[0017] In this implementation, in the feature extraction stage of the first model, after obtaining the initial feature information of the first pixel in the image of the first scene at a certain perspective, the feature information of the second pixel can be obtained from the image of the first scene at other perspectives. The first pixel and the second pixel have the same semantics. The initial feature information of the second pixel is fused with the initial feature information of the first pixel to obtain the updated feature information of the first pixel, that is, the updated feature information of the first pixel included in the feature information of each image in the training sample is obtained; through the aforementioned method, the updated feature information of the first pixel includes the feature information of a certain point in space at multiple perspectives, and the feature information of each image can reflect the geometric constraints between images at different perspectives, which is conducive to obtaining richer information to improve the accuracy of the prediction results output by the first model.
[0018] In one possible implementation, a first pixel is included in a third image of a training sample, and a training device obtains initial feature information of a second pixel, including: the training device obtains at least one third point on a third line, where the third line passes through the first pixel and also passes through the focus of a camera capturing the third image and / or the origin of an image coordinate system corresponding to the third image; the training device obtains a feature information set, where the feature information set includes initial feature information of each of a plurality of projection points, where the projection points are points where the third point is projected onto a fourth image, where the fourth image is an image other than the third image in the training sample, and the plurality of projection points include the second pixel, i.e., the feature information set includes initial feature information of the second pixel. The training device fuses the initial feature information of the first pixel with the initial feature information of the second pixel, including: the training device fuses the initial feature information of the first pixel with the feature information set. This implementation provides a simple solution for obtaining initial feature information of the second pixel, which reduces the implementation difficulty of this solution while ensuring accurate acquisition of the initial feature information of the second pixel.
[0019] In one possible implementation, the training sample also includes a new perspective. After the training device performs feature extraction through the first model to obtain feature information for each image in the training sample, the method further includes: the training device performs feature processing through the first model based on the feature information of each image in the training sample to obtain a predicted image of the first scene at the new perspective. The training device trains the first model based on the feature information of each image in the training sample and the first loss term, including: the training device trains the first model based on the feature information of each image in the training sample, the predicted image, the first loss term, and the third loss term, wherein the third loss term indicates the similarity between the predicted image and the expected image of the first scene at the new perspective. In this implementation, a specific application scenario of the present solution is provided, which improves the degree of integration of the present solution with actual application scenarios and reduces the difficulty of implementation of the present solution.
[0020] In one possible implementation, a predicted image includes first color values of multiple pixels, and a training device performs feature processing using a first model to obtain a predicted image of the first scene at a new perspective, including: the training device performs feature processing using the first model to obtain information corresponding to a third pixel generated by the first model, where the third pixel is any one of the multiple pixels, and the information corresponding to the third pixel includes multiple second color values and a voxel density corresponding to each second color value; exemplarily, the information corresponding to the third pixel includes the second color values and voxel densities of multiple sampling points, and the multiple sampling points corresponding to the third pixel are all located on a fourth line, which starts at the origin of a camera coordinate system corresponding to the predicted image and passes through the third pixel. The training device normalizes the voxel density corresponding to each second color value to obtain a weight for each second color value, and performs a weighted sum of the multiple second color values based on the weight for each second color value to obtain the first color value for the third pixel; exemplarily, the training device normalizes the voxel density corresponding to each sampling point to obtain the weight for the second color value of the sampling point.
[0021] In this implementation, the voxel density corresponding to each second color value is normalized to obtain the weight of each second color value, and then the multiple second color values are weighted and summed according to the weight of each second color value to obtain the first color value of the third pixel point; through the above scheme, a scheme for obtaining the color value of the pixel point in the predicted image is provided, and the above scheme is simple and convenient.
[0022] In a second aspect, an embodiment of the present application provides a model training method that can be used in three-dimensional scenes in the field of artificial intelligence. The method includes: executing a device to obtain data to be processed, and the multiple images in the data to be processed include images of the scene under multiple perspectives; inputting the data to be processed into a first model, performing feature extraction through the first model, and obtaining feature information of each image in the data to be processed; based on the feature information of each image in the data to be processed, performing feature processing through the first model to obtain a prediction result output by the first model.
[0023] In which, the first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of the first scene under multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between the first feature information and the second feature information, the first feature information includes feature information of the first point in the first image, the second feature information includes feature information of the second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
[0024] In one possible implementation, the first model is trained based on training samples, a first loss term, and a second loss term. The goal of training with the second loss term includes reducing the similarity between the first feature information and the third feature information. The third feature information includes feature information of a first pixel in the second image, and the first pixel is different from the second pixel.
[0025] In one possible implementation, the feature information of each image in the data to be processed includes feature information of multiple first pixel points of each image in the data to be processed, and the execution device performs feature extraction through the first model to obtain the feature information of each image in the data to be processed, including: the execution device obtains the initial feature information of the second pixel point, the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics; the initial feature information of the first pixel point is fused with the initial feature information of the second pixel point to obtain the feature information of the first pixel point.
[0026] In the second aspect of this application, the execution device can also be used to execute the steps performed by the training device in the first aspect and various possible implementation methods of the first aspect. The specific implementation methods, meanings of terms and beneficial effects brought about by the steps in each possible implementation method of the second aspect can all be referred to the first aspect and will not be repeated here.
[0027] In a third aspect, an embodiment of the present application provides a model training method that can be used in three-dimensional scenes in the field of artificial intelligence. The method includes: executing a device to obtain data to be processed, where multiple images in the data to be processed include images of the scene at multiple perspectives; inputting the data to be processed into a first model, performing feature extraction through the first model to obtain feature information of each image in the data to be processed; performing feature processing through the first model based on the feature information of each image in the data to be processed, and obtaining a prediction result output by the first model;
[0028] Among them, the feature information of each image in the data to be processed includes the feature information of multiple first pixel points of each image in the data to be processed, and feature extraction is performed through the first model to obtain the feature information of each image in the data to be processed, including: obtaining the initial feature information of the second pixel point, the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics; the initial feature information of the first pixel point is fused with the initial feature information of the second pixel point to obtain the feature information of the first pixel point.
[0029] In one possible implementation, the first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of the first scene from multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between the first feature information and the second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
[0030] In one possible implementation, the first model is trained based on training samples, a first loss term, and a second loss term. The goal of training with the second loss term includes reducing the similarity between the first feature information and the third feature information. The third feature information includes feature information of a first pixel in the second image, and the first pixel is different from the second pixel.
[0031] In one possible implementation, the second point and the third point are both located on the first line, the second line is projected into the second image to obtain the first line, the second line passes through the first point, and the second line also passes through the focus of the camera that captures the first image and / or the origin of the camera coordinate system corresponding to the first image.
[0032] In one possible implementation, a first pixel is included in a third image of the data to be processed, and an execution device obtains initial feature information of a second pixel, including: the execution device obtains at least one third point on a third line, where the third line passes through the first pixel, and the third line also passes through the focus of a camera that captures the third image and / or the origin of an image coordinate system corresponding to the third image; the execution device obtains a feature information set, where the feature information set includes initial feature information of each of a plurality of projection points, where the projection point is a point where the third point is projected onto a fourth image, where the fourth image is an image outside the third image in the data to be processed, and where the plurality of projection points include the second pixel. The execution device fuses the initial feature information of the first pixel with the initial feature information of the second pixel, including: fusing the initial feature information of the first pixel with the feature information set.
[0033] In one possible implementation, the data to be processed also includes a new perspective. After the execution device performs feature extraction through the first model to obtain feature information of each image in the data to be processed, the method also includes: the execution device performs feature processing through the first model based on the feature information of each image in the data to be processed to obtain a predicted image of the first scene under the new perspective.
[0034] In one possible implementation, the predicted image includes first color values of multiple pixels, and the execution device performs feature processing through the first model to obtain a predicted image of the first scene at a new perspective, including: the execution device performs feature processing through the first model to obtain information corresponding to a third pixel generated by the first model, the third pixel is any one of the multiple pixels, and the information corresponding to the third pixel includes multiple second color values and a voxel density corresponding to each second color value; the execution device normalizes the voxel density corresponding to each second color value to obtain the weight of each second color value; and according to the weight of each second color value, performs weighted summation on the multiple second color values to obtain the first color value of the third pixel.
[0035] The specific implementation methods, meanings of terms and beneficial effects of the steps in each possible implementation method of the third aspect can be found in the first aspect and will not be repeated here.
[0036] In a fourth aspect, an embodiment of the present application provides a model training device that can be used in three-dimensional scenes in the field of artificial intelligence. The model training device includes: an acquisition module for acquiring training samples, where the multiple images in the training samples include images of the first scene under multiple perspectives; a processing module for inputting the training samples into the first model, performing feature extraction through the first model, and obtaining feature information of each image in the training sample; a training module for training the first model based on the feature information of each image in the training sample and a first loss term.
[0037] The multiple images include a first image and a second image, and the goal of training using the first loss term includes improving the similarity between the first feature information and the second feature information, the first feature information includes feature information of the first point in the first image, the second feature information includes feature information of the second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
[0038] In the fourth aspect of this application, the training device of the model can also be used to execute the steps performed by the training device in the first aspect and various possible implementation methods of the first aspect. The specific implementation methods, meanings of terms and beneficial effects brought about by the steps in various possible implementation methods of the fourth aspect can all be referred to the first aspect and will not be repeated here.
[0039] In a fifth aspect, an embodiment of the present application provides an image processing device that can be used in three-dimensional scenes in the field of artificial intelligence. The image processing device includes: an acquisition module for acquiring data to be processed, wherein the multiple images in the data to be processed include images of the scene under multiple perspectives; a processing module for inputting the data to be processed into a first model, performing feature extraction through the first model, and obtaining feature information of each image in the data to be processed; the processing module is also used to perform feature processing through the first model based on the feature information of each image in the data to be processed, and obtain a prediction result output by the first model.
[0040] In which, the first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of the first scene under multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between the first feature information and the second feature information, the first feature information includes feature information of the first point in the first image, the second feature information includes feature information of the second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
[0041] In the fifth aspect of this application, the image processing device can also be used to execute the steps performed by the execution device in the second aspect and various possible implementation methods of the second aspect. The specific implementation methods, meanings of terms and beneficial effects brought about by the steps in each possible implementation method of the fifth aspect can all be referred to the second aspect and will not be repeated here.
[0042] In a sixth aspect, an embodiment of the present application provides an image processing device that can be used in a three-dimensional scene in the field of artificial intelligence. The image processing device includes: an acquisition module for acquiring data to be processed, wherein the multiple images in the data to be processed include images of the scene at multiple perspectives; a processing module for inputting the data to be processed into a first model, performing feature extraction through the first model, and obtaining feature information of each image in the data to be processed; the processing module is further used to perform feature processing through the first model based on the feature information of each image in the data to be processed, and obtain a prediction result output by the first model;
[0043] In which, the feature information of each image in the data to be processed includes the feature information of multiple first pixel points of each image in the data to be processed; the processing module is specifically used to obtain the initial feature information of the second pixel point, and fuse the initial feature information of the first pixel point with the initial feature information of the second pixel point to obtain the feature information of the first pixel point, wherein the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics.
[0044] In the sixth aspect of this application, the image processing device can also be used to execute the steps performed by the execution device in the third aspect and various possible implementation methods of the third aspect. The specific implementation methods, meanings of terms and beneficial effects brought about by the steps in various possible implementation methods of the sixth aspect can all be referred to the third aspect and will not be repeated here.
[0045] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes a program. When the program runs on a computer, it enables the computer to execute the method described in the first aspect, the second aspect or the third aspect above.
[0046] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method described in the first, second or third aspect above.
[0047] In the ninth aspect, an embodiment of the present application provides an execution device, including a processor and a memory, where the processor is coupled to the memory, the memory is used to store programs, and the processor is used to execute the programs in the memory, so that the execution device executes the image processing method of the second or third aspect above.
[0048] In the tenth aspect, an embodiment of the present application provides a training device, including a processor and a memory, where the processor is coupled to the memory, the memory is used to store programs; and the processor is used to execute the programs in the memory, so that the training device executes the training method of the model of the first aspect mentioned above.
[0049] In an eleventh aspect, the present application provides a chip system, which includes a processor for supporting a terminal device or a communication device to implement the functions involved in the above aspects, for example, sending or processing the data and / or information involved in the above methods. In one possible design, the chip system also includes a memory, which is used to store program instructions and data necessary for the terminal device or communication device. The chip system can be composed of a chip or can include a chip and other discrete devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] FIG1a is a schematic diagram of the structure of an artificial intelligence main framework provided in an embodiment of the present application;
[0051] FIG1b is a schematic diagram of a scene requiring three-dimensional reconstruction according to an embodiment of the present application;
[0052] FIG2 is a system architecture diagram of an image processing system provided in an embodiment of the present application;
[0053] FIG3 is a flow chart of a method for training a model according to an embodiment of the present application;
[0054] FIG4 is a schematic diagram of the first and second points provided in an embodiment of the present application;
[0055] FIG5 is another flow chart of a method for training a model according to an embodiment of the present application;
[0056] FIG6 is a schematic diagram of multiple projection points provided by the present application;
[0057] FIG7 is another schematic diagram of multiple projection points provided by the present application;
[0058] FIG8 is a schematic diagram of a fourth line provided in an embodiment of the present application;
[0059] FIG9 is a schematic diagram of the first, second and third points provided in an embodiment of the present application;
[0060] FIG10 is a schematic diagram of a calculation process of a loss function provided in an embodiment of the present application;
[0061] FIG11 is a schematic diagram of a flow chart of an image processing method provided in an embodiment of the present application;
[0062] FIG12 is a schematic diagram of a structure of a training device for a model provided in an embodiment of the present application;
[0063] FIG13 is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0064] FIG14 is a schematic structural diagram of an image processing device provided in an embodiment of the present application;
[0065] FIG15 is a schematic diagram of a structure of an execution device provided in an embodiment of the present application;
[0066] FIG16 is a schematic diagram of a structure of a training device provided in an embodiment of the present application;
[0067] FIG17 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0069] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0070] First, let's describe the overall workflow of an AI system. See Figure 1a, which shows a schematic diagram of the AI framework. This AI framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.
[0071] (1) Infrastructure
[0072] The infrastructure provides computing power for AI systems, enabling communication with the outside world and providing support through a basic platform. Communication with the outside world is achieved through sensors; computing power is provided by smart chips, which can specifically adopt hardware acceleration chips such as central processing units (CPUs), embedded neural network processing units (NPUs), graphics processing units (GPUs), application-specific integrated circuits (ASICs), or field programmable gate arrays (FPGAs); the basic platform includes related platform guarantees and support such as distributed computing frameworks and networks, and can include cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to obtain data, which is then provided to the smart chips in the distributed computing system provided by the basic platform for calculation.
[0073] (2) Data
[0074] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0075] (3) Data processing
[0076] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
[0077] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0078] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0079] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
[0080] (4) General ability
[0081] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0082] (5) Smart products and industry applications
[0083] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart manufacturing, smart transportation, smart homes, smart medical care, smart security, autonomous driving, smart cities, etc.
[0084] This application can be applied to various application fields of artificial intelligence technology, and is specifically used to process images in 3D scenes in various application fields. The following provides examples of multiple application scenarios of this application.
[0085] Application Scenario 1: Generating Images from a New Perspective
[0086] The electronic device can obtain a set of images corresponding to the same scene, and the multiple images in the image set include images of the aforementioned scene at multiple known perspectives; the electronic device synthesizes images at a new perspective based on the images of the aforementioned scene at multiple known perspectives to achieve three-dimensional reconstruction of the scene.
[0087] For example, in the field of smart terminals, there is a need to perform three-dimensional reconstruction of a 3D virtual digital human (that is, an example of the "above-mentioned scenario"). In order to improve the quality of the reconstructed 3D virtual digital human, images of the 3D virtual digital human at multiple new perspectives can be generated based on the images of the 3D virtual digital human at multiple known perspectives, and then the 3D virtual digital human can be reconstructed in three dimensions.
[0088] For example, in the field of autonomous driving, there is a need to perform three-dimensional reconstruction of the vehicle's surrounding environment. Based on the images of the vehicle's surrounding environment at multiple known perspectives, images of the vehicle's surrounding environment at multiple new perspectives can be generated to further reconstruct the vehicle's surrounding environment in three dimensions.
[0089] In order to understand this solution more intuitively, please refer to Figure 1b. Figure 1b is a schematic diagram of a scene that needs to be three-dimensionally reconstructed provided in an embodiment of the present application. Figure 1b shows the vehicle surrounding environment that needs to be three-dimensionally reconstructed. It should be understood that the example in Figure 1b is only for the convenience of understanding this solution and is not used to limit this solution.
[0090] Application Scenario 2: Image Classification
[0091] For example, after acquiring a 3D image of a scene, the electronic device may acquire images of the scene from multiple perspectives from the 3D image of the scene, and classify objects in the scene based on the images of the scene from multiple perspectives.
[0092] Application Scenario 3: Object Detection
[0093] For example, in the field of autonomous driving, an autonomous driving vehicle can use sensors to collect images of the vehicle's surrounding environment (that is, an example of the "same scene") from multiple perspectives, and perform target detection based on the collected images from the aforementioned multiple perspectives to obtain prediction results corresponding to the images from the aforementioned multiple perspectives. The prediction results are used to indicate the position of at least objects in the vehicle's surrounding environment. The autonomous driving vehicle can plan its driving path based on the aforementioned prediction results.
[0094] It should be noted that the above-mentioned vehicles can be cars, trucks, motorcycles, buses, ships, airplanes, helicopters, lawn mowers, recreational vehicles, amusement park vehicles, construction equipment, trams, golf carts or trains, etc., and the embodiments of the present application do not make special limitations.
[0095] For example, in the field of intelligent monitoring, many cameras are installed in public places and traffic roads. After a few intelligent cameras collect images of the surrounding environment from multiple perspectives, they can perform target detection tasks based on the images from the aforementioned multiple perspectives.
[0096] For another example, in the field of smart homes, mobile robots (such as sweeping robots, tutoring robots, or other movable robots, etc.) can collect images of the robot's surrounding environment from multiple perspectives, and perform target detection based on the collected images from the aforementioned multiple perspectives to obtain prediction results corresponding to the images from the aforementioned multiple perspectives. The prediction results are used to indicate the position of at least one obstacle around the mobile robot.
[0097] Application Scenario 4: Semantic Segmentation of 3D Images
[0098] Exemplarily, after acquiring a 3D image of a scene, the electronic device can obtain images of the scene from multiple perspectives, and generate prediction results based on the images of the scene from multiple perspectives. The prediction results are used to indicate the categories of all pixels in the image of the scene from each perspective.
[0099] It should be noted that the above examples of various application scenarios are only for the convenience of understanding this solution. This application can also be used in other application scenarios, which are not exhaustively listed here. In all of the above application scenarios, after obtaining images of the same scene from multiple perspectives, the images of the scene from multiple perspectives can be input into the machine learning model, and the solution provided by this application can be used to extract features from the images from the aforementioned multiple perspectives to obtain feature information of each image; and then a prediction result can be generated based on the feature information of each image, which is conducive to obtaining richer information in the feature extraction stage and is also conducive to improving the accuracy of the prediction result of the final output.
[0100] Before giving a detailed introduction to the method provided in the embodiment of the present application, please refer to Figure 2, which is a system architecture diagram of the image processing system provided in the embodiment of the present application. In Figure 2, the image processing system 200 includes a training device 210, a database 220, an execution device 230, a data storage system 240 and a client device 250, and the execution device 230 includes a computing module 231.
[0101] Among them, the database 220 stores a training data set, which includes multiple training samples, and the multiple images in each training sample include images of a first scene under multiple perspectives. During the training stage of the first machine learning model / rule 201, the training device 210 generates the first machine learning model / rule 201, and iteratively trains the first machine learning model / rule 201 using the training data set to obtain the trained first machine learning model / rule 201. The first machine learning model / rule 201 can be specifically expressed as a neural network, or as a non-neural network machine learning model; for example, the first machine learning model / rule 201 can be a convolutional neural network, a residual neural network, a transform model, or other types of models, etc., which are not exhaustive here.
[0102] During a training process performed by training device 210 on first machine learning model / rule 201, as specifically shown in FIG3 , FIG3 is a flowchart illustrating a method for training a model according to an embodiment of the present application. 301. Training device 210 obtains a training sample, wherein the plurality of images in the training sample include images of a first scene from multiple perspectives.
[0103] 302. The training device 210 inputs the training sample into the first model, performs feature extraction through the first model, and obtains feature information of each image in the training sample.
[0104] 303. The training device 210 trains the first model based on the feature information of each image in the training sample and the first loss term; wherein the multiple images include a first image and a second image, and the goal of training using the first loss term includes improving the similarity between the first feature information and the second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene (hereinafter referred to as a "target point" for convenience of description).
[0105] Exemplarily, “the first point in the first image and the second point in the second image correspond to the same target point in the first scene” can be understood as the first point is the point obtained when observing the target point from the first perspective, and the second point is the point obtained when observing the target point from the second perspective, that is, the first point in the first image and the second point in the second image have the same semantics.
[0106] For a more intuitive understanding of this solution, please refer to Figure 4, which is a schematic diagram of the first point and the second point provided in an embodiment of the present application. Figure 4 includes two left and right sub-schematic diagrams. The left sub-schematic diagram and the right sub-schematic diagram of Figure 4 respectively show images of the first scene (i.e., the three-dimensional indoor environment shown in Figure 4) under two different perspectives. In Figure 4, the target point is a point on the back of the chair in the first scene. The left sub-schematic diagram of Figure 4 shows the first point corresponding to the target point in the first image, and the right sub-schematic diagram of Figure 4 shows the second point corresponding to the target point in the second image. It should be understood that the example in Figure 4 is only for the convenience of understanding this solution and is not used to limit this solution.
[0107] It should be noted that since there may be deviations when obtaining the first characteristic information and the second characteristic information, the point in the three-dimensional space corresponding to the first point and the point in the three-dimensional space corresponding to the second point may completely overlap, or may not completely overlap, for example, there is a short distance between the two points.
[0108] In an embodiment of the present application, the training objectives include improving the similarity between feature information in images of the same point in the first scene at different perspectives. Through the aforementioned scheme, when the trained first model is used to extract features from images of the same scene at different perspectives, the feature information in images of the same point in the scene at different perspectives will be more similar. The feature information obtained by the aforementioned first model can reflect the connection between images from different perspectives, which is conducive to obtaining richer information in the feature extraction stage; in addition, the model's ability to integrate information from multiple perspectives is also conducive to enhancing the model's geometric perception ability.
[0109] The trained first machine learning model / rule 201 obtained by the training device 210 can be applied and deployed in the computing module 231 of the execution device 230. For example, the execution device 230 can be a mobile phone, a tablet, a laptop computer, a virtual reality (VR) device, a monitoring system, a radar data processing system or other types of devices, etc.
[0110] During the inference phase of the first machine learning model / rule 201, the execution device 230 may input the data to be processed into the first machine learning model / rule 201 of the calculation module 231, so as to process the data to be processed through the first machine learning model / rule 201 and obtain the prediction result output by the first machine learning model / rule 201. The execution device 230 may call data, code, etc. in the data storage system 240, or may store data, instructions, etc. in the data storage system 240. The data storage system 240 may be placed in the execution device 230, or the data storage system 240 may be an external memory relative to the execution device 230.
[0111] In some embodiments of the present application, please refer to Figure 2, the execution device 230 and the client device 250 can be independent devices. The execution device 230 is configured with an input / output (I / O) interface to interact with the client device 250 for data. The "user" can input the data to be processed through the client device 250, and the client device 250 sends the data to be processed to the execution device 230 through the I / O interface. After the execution device 230 generates prediction decision information corresponding to the data to be processed through the first machine learning model / rule 201 in the computing module 231, the aforementioned prediction decision information can be returned to the client device 250 through the I / O interface and provided to the user.
[0112] It is worth noting that FIG2 is only an architectural diagram of the image processing system provided by an embodiment of the present invention, and the positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in other embodiments of the present application, the execution device 230 can be configured in the client device 250. As an example, when the client device is a mobile phone or a tablet, the execution device 230 can be a module in the host processor (Host CPU) of the mobile phone or tablet for performing array image processing. The execution device 230 can also be a graphics processing unit (GPU) or a neural network processor (NPU) in the mobile phone or tablet. The GPU or NPU is mounted on the host processor as a coprocessor, and the host processor assigns tasks.
[0113] In combination with the above description, the following describes the specific implementation process of the training phase and application phase of the image processing method provided in the embodiment of the present application.
[0114] 1. Training Phase
[0115] In the embodiment of the present application, the training phase describes the process of how the training device 210 trains the first machine learning model / rule 201 using the training data set maintained in the database 220. Specifically, please refer to FIG5 , which is another flow chart of the model training method provided in the embodiment of the present application. The model training method provided in the embodiment of the present application may include:
[0116] 501. Obtain a training sample, where the multiple images in the training sample include images of a first scene at multiple viewing angles.
[0117] In an embodiment of the present application, a training device can obtain a training data set, which includes multiple training samples and the expected results corresponding to each training sample, wherein a training sample includes multiple images, and the aforementioned multiple images include images of a first scene from multiple perspectives. Exemplarily, the first scene can be an environment, a person, an animal, an object, or another type of first scene. For example, the "environment" can be a traffic road environment, an indoor environment, a park environment, or another type of environment; the "person" can be a virtual character or a physical character; the "animal" can be a virtual animal or a physical animal, etc. The specific form of the first scene can be flexibly determined based on actual circumstances and is not limited in the embodiments of the present application.
[0118] Exemplarily, the task performed by the first model may be any of the following: generating an image from a new perspective, image classification, target detection, semantic segmentation of an image, or other tasks in a three-dimensional scene, etc., which are not listed here one by one.
[0119] The specific form of the expected result corresponding to each training sample is determined by the type of task performed by the first model. For example, if the task of the first model is to generate an image of the first scene from a new perspective based on images of the first scene from multiple known perspectives, then the "training sample" may also include the new perspective, and the "expected result corresponding to the training sample" may be the correct image of the first scene from the aforementioned new perspective, or it may be the expected image of the first scene from the aforementioned new perspective.
[0120] For another example, if the first model's task is to classify the first scene based on images of the first scene from multiple perspectives, the "expected result corresponding to the training sample" can be expressed as the correct category of the first scene. For another example, if the first model's task is to detect objects in the first scene based on images of the first scene from multiple perspectives, the "expected result corresponding to the training sample" can be expressed as the correct location information of at least one object in the first scene.
[0121] For another example, if the task of the first machine learning model is to perform semantic segmentation on images of the first scene from multiple perspectives, then the "expected result corresponding to the training sample" can be expressed as the correct category of each pixel in each of the aforementioned multiple images, etc. It should be understood that the examples given here are only for the convenience of understanding this solution and are not used to limit this solution.
[0122] 502. Input the training sample into the first model, perform feature extraction through the first model, and obtain feature information of each image in the training sample.
[0123] In an embodiment of the present application, the training device can execute step 502 in a variety of ways. In one implementation, step 502 may include: the training device can use the first model to extract features from each image in the training sample respectively to obtain the initial feature information of each image, that is, to obtain the initial feature information of each pixel in each image.
[0124] The training device can update the initial feature information of multiple first pixel points in each image through the first model based on the initial feature information of each image in the training sample to obtain updated feature information of each first pixel point; wherein the feature information of each image in the training sample may include the updated feature information of each first pixel point in each image, and may also include the initial feature information of the fourth pixel point in each image, and the fourth pixel point and the first pixel point are different pixel points in the same image.
[0125] In an embodiment of the present application, in the feature extraction stage of the first model, after obtaining the initial feature information of the first pixel point in the image of the first scene at a certain perspective, the feature information of the second pixel point can be obtained from the image of the first scene at other perspectives. The first pixel point and the second pixel point have the same semantics. The initial feature information of the second pixel point is fused with the initial feature information of the first pixel point to obtain the updated feature information of the first pixel point, that is, the updated feature information of the first pixel point included in the feature information of each image in the training sample is obtained; through the aforementioned method, the updated feature information of the first pixel point includes the feature information of a certain point in space at multiple perspectives, and the feature information of each image can reflect the geometric constraints between images at different perspectives, which is conducive to obtaining richer information to improve the accuracy of the prediction results output by the first model.
[0126] Exemplarily, the training device may randomly sample from multiple pixel points included in each image to obtain multiple first pixel points in each image; alternatively, the training device may randomly sample multiple first pixel points from an area of each image that carries rich information; alternatively, the training device may also use other methods to obtain multiple first pixel points from each image. The examples given here are only to demonstrate the feasibility of this solution and are not used to limit this solution.
[0127] In the process of updating the initial feature information of any first pixel point, optionally, the training device can obtain the initial feature information of at least one second pixel point, where the first pixel point and the second pixel point are points in different images included in the training sample, and the first pixel point and the second pixel point have the same semantics; the training device fuses the initial feature information of the first pixel point with the initial feature information of all second pixel points to obtain the feature information of the first pixel point.
[0128] For example, the first pixel point is a point in the third image included in the training sample, and the second pixel point is a point in the fourth image included in the training sample. The third image and the fourth image are different images in the training sample. It should be noted that the third image and the first image can be the same image or different images; the third image and the second image can be the same image or different images. The fourth image and the first image can be the same image or different images; the fourth image and the second image can be the same image or different images. As long as the third image and the fourth image are different images in the training sample, the relationship between the first image and the second image and the third image, or the relationship between the first image and the second image and the fourth image is not limited in this application.
[0129] Regarding the specific implementation of "obtaining initial feature information of the second pixel point," for example, the training device may obtain at least one third point on a third line, where the third line passes through the first pixel point and also passes through the focus of a camera capturing the third image and / or the origin of an image coordinate system corresponding to the third image.
[0130] Exemplarily, the training device may randomly sample multiple third points from the third line; or, it may uniformly sample multiple third points from the third line, with the distances between different third points being the same, etc., and it may also obtain at least one third point from the third line according to other methods, which are not exhaustively listed here.
[0131] After determining at least one third point, the training device projects each third point onto all fourth images to obtain multiple projection points corresponding to the at least one third point, where the fourth image is an image other than the third image in the training sample, a projection point is a point projected onto one of the fourth images at the location of the third point, and the multiple projection points include the second pixel point. The training device obtains a feature information set, where the feature information set includes initial feature information for each of the multiple projection points.
[0132] To further understand this solution, an example of the formula used in the above steps is disclosed below:
[0133] in, Represents the third line, u i =[u,v] T represents the coordinate information of the first pixel in the i-th image (i.e., an example of the third image) in the training sample. The aforementioned coordinate information is two-dimensional coordinate information. K i represents the intrinsic parameters of the camera that takes the i-th image, [R i ,t i ] represents the extrinsic parameters of the camera that takes the i-th image.
[0134] Training equipment along the ray Sampling N s The third point That is, s=1,2,…,N s ; s The formula used to project all the third points in to the j-th image (that is, any fourth image) is as follows:
[0135] in, Representative will p s The coordinate information of the projection point projected onto the j-th image is a two-dimensional coordinate. represent The depth information of The distance from the camera that took the jth image, K j represents the intrinsic parameters of the camera that takes the jth image, [R j ,t j ] represents the external parameters of the camera that takes the jth image, then the camera Projecting all the third points upsampled onto the j-th image can obtain multiple projection points, that is, It should be understood that the examples in formula (1) and formula (2) are only for facilitating the understanding of this solution and are not intended to limit this solution.
[0136] For a more intuitive understanding of this solution, please refer to Figure 6, which is a schematic diagram of multiple projection points provided by this application. Figure 6 includes three sub-schematic diagrams (a), (b) and (c). The three sub-schematic diagrams of Figure 6 (a), (b) and (c) are images of the same first scene at three different perspectives, respectively. The sub-schematic diagram of Figure 6 (a) represents the third image, and the sub-schematic diagrams of Figure 6 (b) and (c) are two different fourth images. The sub-schematic diagram of Figure 6 (a) shows the third point, and four points are sampled from the third line passing through the third point. The sub-schematic diagram of Figure 6 (b) shows the four projection points obtained when the sampled four points are projected into the sub-schematic diagram of Figure 6 (b), and the sub-schematic diagram of Figure 6 (c) shows the four projection points obtained when the sampled four points are projected into the sub-schematic diagram of Figure 6 (c). It should be understood that the example in Figure 6 is only for the convenience of understanding this solution and is not used to limit this solution.
[0137] Regarding the specific implementation method of "fusing the initial feature information of the first pixel point with the initial feature information of all second pixel points", in one implementation method, after obtaining the feature information set, the training device can first aggregate the initial feature information of all projection points in each fourth image in the feature information set to obtain the first aggregated feature information; the training device fuses the first aggregated feature information of all fourth images with the initial feature information of the first pixel point to obtain the updated feature information of the first pixel point.
[0138] To further understand this solution, the following uses the attention mechanism to update the initial feature information of the first pixel as an example, and discloses an example of the formula used in the above steps:
[0139] Among them, g j represents the feature information after aggregating the initial feature information of multiple projection points in the jth image (i.e., the feature information after the first aggregation), f i represents u in the i-th image (i.e., an example of the third image). i (i.e., an example of the first pixel), represents the initial feature information of the s-th projection point in the j-th image, The feature information representing the position of the third point corresponding to the s-th projection point (position embedding), where the position of the third point can be the three-dimensional coordinates of the third point; i As the query matrix in the multi-head attention mechanism (MHA), As the key matrix and value matrix in MHA.
[0140] Among them, f i ′ represents the updated feature information of the first pixel, f i The meaning of can refer to the above description, N near Represents a total of N training samples near images, Represents the first aggregated feature information of all fourth images in the training sample, f i As the query matrix in MHA, As the key matrix and value matrix in MHA; it should be understood that the examples in formula (3) and formula (4) are only to prove the feasibility of this solution. Other methods can also be used to achieve the fusion of "initial feature information of all projection points" and "initial feature information of the first pixel point". The specific fusion method is not limited in the embodiments of this application.
[0141] For a more intuitive understanding of this solution, please refer to Figure 7, which is another schematic diagram of multiple projection points provided by this application. In Figure 7, the training sample includes three images as an example. When the initial feature information of a first pixel in the third image is updated, the initial feature information of multiple projection points can be obtained from each image other than the third image in the training sample (that is, each fourth image), and the initial feature information of the first pixel is used as the query matrix, and the initial feature information of all projection points in the fourth image is used as the key matrix. The feature processing model based on the attention mechanism is used to process the intermediate result. The initial feature information of the first pixel is then used as the query matrix, and the intermediate result corresponding to the fourth image is used as the key matrix. The feature processing model based on the attention mechanism is used to process the updated feature information of the first pixel. It should be understood that the example in Figure 7 is only for the convenience of understanding this solution and is not used to limit this solution.
[0142] In another implementation, after obtaining the feature information set, the training device may also fuse the initial feature information of each projection point in the feature information set with the initial feature information of the first pixel point one by one to obtain the updated feature information of the first pixel point.
[0143] The training device can use the above method to update the initial feature information of each first pixel point in the training sample to obtain the updated feature information of each first pixel point, and then obtain the feature information of each image in the training sample. The feature information of each image in the training sample can include the updated feature information of each first pixel point in each image, and can also include the initial feature information of the fourth pixel point in each image. The fourth pixel point and the first pixel point are different pixel points in the same image.
[0144] In an embodiment of the present application, a simple solution for obtaining the initial feature information of the second pixel point is provided, which reduces the difficulty of implementing the solution while ensuring that the initial feature information of the second pixel point can be accurately obtained.
[0145] In another implementation, step 502 may include: the training device may perform feature extraction on each image in the training sample through the first model to obtain initial feature information of each image; the feature information of each image in the training sample includes the initial feature information of each image in the training sample.
[0146] 503. Perform feature processing using the first model based on feature information of each image in the training sample to obtain a prediction result output by the first model.
[0147] In the embodiments of the present application, the specific form of the "prediction result output by the first model" is similar to the "expected result corresponding to each training sample" described above, and is also determined in conjunction with the type of task performed by the first model. For example, if the task of the first model is to generate an image of the first scene at a new perspective based on images of the first scene at multiple known perspectives, then the "training sample" may also include the new perspective, and the "prediction result output by the first model" may be the predicted image of the first scene at the aforementioned new perspective.
[0148] If the task of the first model is to generate an image of the first scene from a new perspective, the training device can execute step 503 in a variety of ways. In one implementation, the predicted image corresponding to the training sample includes the first color values of multiple pixel points. Step 503 may include: the training device performs feature processing through the first model based on the feature information of each image in the training sample to obtain information corresponding to each third pixel point generated by the first model, where the third pixel point is any one of the multiple pixel points, and the information corresponding to each third pixel point includes multiple second color values and a voxel density corresponding to each second color value.
[0149] Exemplarily, the predicted image may include multiple pixel points. For each third pixel point in the predicted image, before executing step 501, the training device may obtain a fourth line corresponding to each third pixel point, where the fourth line starts from the origin of the camera coordinate system corresponding to the predicted image and passes through the third pixel point; the training device samples on the fourth line to obtain multiple sampling points corresponding to the third pixel point; the training device repeats the aforementioned steps to obtain a set of sampling points corresponding to all pixel points in the predicted image, where the sampling point set includes multiple sampling points corresponding to each pixel point in the predicted image; the training sample may also include the aforementioned sampling point set.
[0150] For a more intuitive understanding of this solution, please refer to FIG8 , which is a schematic diagram of a fourth line provided in an embodiment of the present application. As shown in FIG8 , the origin of the camera coordinate system corresponding to the predicted image is 01, the X-axis of the camera coordinate system is camera Xc in FIG4 , the Y-axis of the camera coordinate system is camera Yc in FIG4 , and the Z-axis of the camera coordinate system is camera Zc in FIG4 . Taking obtaining the first color value of pixel b on the predicted image as an example, the origin of the camera coordinate system, 01, can be used as the starting point, and a ray can be emitted toward pixel b, and the ray passes through pixel b to obtain a fourth line corresponding to pixel b; sampling can be performed on the fourth line corresponding to pixel b to obtain multiple sampling points corresponding to pixel b. It should be understood that the example in FIG8 is only for facilitating understanding of this solution and is not intended to limit this solution.
[0151] The training device inputs the training samples into the first model and can obtain the information corresponding to each third pixel point generated by the first model. The information corresponding to each third pixel point includes the second color value and voxel density of multiple sampling points corresponding to each third pixel point (for the convenience of description, hereinafter referred to as "target sampling points").
[0152] The training device normalizes the voxel density corresponding to each second color value to obtain a weight for each second color value; that is, it normalizes the voxel density corresponding to each target sampling point to obtain the weight of the second color value for that target sampling point. The training device then performs a weighted summation of the second color values of the plurality of target sampling points corresponding to the third pixel based on the weights of the second color values of the plurality of target sampling points corresponding to the third pixel to obtain the first color value of the third pixel. The training device repeats the aforementioned steps multiple times to obtain the first color value corresponding to each pixel in the predicted image, thereby determining the predicted image.
[0153] To further understand this solution, an example of a formula used to calculate the first color value of a third pixel is disclosed below:
[0154] in, Represents the first color value of a third pixel in the predicted image. Here, it is assumed that the origin of the camera coordinate system corresponding to the predicted image is the starting point, and the fourth line passing through the third pixel is ray r, c i Represents the second color value of the i-th sampling point on ray r (that is, the i-th sampling point corresponding to the third pixel, σ i Represents the voxel density of the i-th sampling point on ray r, exp(σ i ) represents the i The weight of the i-th sampling point on the ray r obtained after normalization processing should be understood that the example here is only for the convenience of understanding this solution and is not used to limit this solution.
[0155] In an embodiment of the present application, the above-mentioned solution provides a solution for obtaining the color value of a pixel in a predicted image, and the above-mentioned solution is simple and convenient.
[0156] In one implementation, step 503 may include: the training sample only includes images of the first scene at multiple known perspectives and a new perspective, and the training device performs feature processing through the first model based on the feature information of each image in the training sample to obtain a prediction result output by the first model, where the prediction result is an image of the first scene at the new perspective.
[0157] For another example, if the task of the first model is to classify the first scene based on images of the first scene from multiple perspectives, the "prediction result corresponding to the training sample" can be expressed as the predicted category of the first scene. For another example, if the task of the first model is to detect objects in the first scene based on images of the first scene from multiple perspectives, the "prediction result corresponding to the training sample" can be expressed as the detected location information of at least one object in the first scene.
[0158] For another example, if the task of the first machine learning model is to perform semantic segmentation on images of the first scene from multiple perspectives, then the "detection results corresponding to the training samples" can be expressed as the detection category of each pixel in each of the aforementioned multiple images, etc. It should be understood that the examples given here are only for the convenience of understanding this solution and are not used to limit this solution.
[0159] 504. Train the first model based on feature information of each image in the training sample and a first loss term, wherein a goal of training using the first loss term includes improving a similarity between the first feature information and the second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to a same point in the first scene.
[0160] In an embodiment of the present application, the training device can generate the value of a loss function based on the feature information of each image in the training sample, and the loss function includes a first loss term; the training device updates the weight parameters of the first model by back propagation based on the value of the loss function to complete one training of the first model.
[0161] The first loss term indicates the similarity between the first feature information and the second feature information. The purpose of training with the first loss term includes improving the similarity between the first feature information and the second feature information. The first feature information includes feature information of the first point in the first image, and the second feature information includes feature information of the second point in the second image. The first point in the first image and the second point in the second image correspond to the same point in the first scene. In other words, projecting the same point in the three-dimensional first scene into images of different perspectives can respectively obtain the first point in the first image and the second point in the second image. That is, the purpose of training with the first loss term includes improving the similarity between feature information of points with the same semantics in images of different perspectives.
[0162] To further understand the present solution, illustratively, the training device randomly samples N images from the i-th image included in the training sample. c The first points are represented by N c is an integer greater than or equal to 1, p=(p,q) is For any first point in the i-th image, for each first point p in the i-th image, we specify q in the j-th image of the training sample + is the second point (i.e., a point with semantic similarity to the first point). In order to obtain multiple second points q corresponding to each first point p in the i-th image + , the training device can first obtain the coordinates of p3 in the three-dimensional space based on the coordinates of the first point p, where p is the point obtained by projecting p3 onto the i-th image. The formula for calculating the three-dimensional coordinate information of p3 can be as follows:
[0163] in, are the homogeneous coordinates of p, δ p represents the distance between p3 and the camera that took the i-th image, K i represents the intrinsic parameters of the camera that takes the i-th image, [R i ,t i ] represents the external parameters of the camera that captures the i-th image. It should be understood that the example in formula (6) is only for the convenience of understanding this solution and is not used to limit this solution.
[0164] The training device projects p3 in the three-dimensional space to the j-th image in the training sample and obtains the projection point q of p3 in the j-th image. + , that is, we get a second point q corresponding to the first point p in the jth image + The training device repeats the above operations to obtain the projection point q of p3 in each image other than the i-th image in the training sample. +, thus obtaining multiple second points q corresponding to the first point p + .
[0165] The training device determines multiple second points q corresponding to the first point p in the i-th image + Afterwards, the feature information of the first point p and each second point q can be obtained from the feature information of each image included in the training sample. + The feature information of the first point p is calculated and the feature information of each second point q + The training device repeatedly performs the aforementioned operation to obtain the similarity between the feature information of each first point in the i-th image and the feature information of the second point in other images in the training sample, and then obtains the similarity between the feature information of each first point in each image in the training sample and the feature information of the second point in other images in the training sample, thereby calculating the value of the first loss term.
[0166] It should be noted that the above examples are only used to prove the feasibility of this solution. The training device can also use other methods to calculate the value of the first loss term, and this embodiment of the application does not limit this.
[0167] Optionally, during the process of training the first model using the loss function, step 504 may include: the training device training the first model based on the feature information of each image in the training sample and the loss function. The loss function includes a first loss term and a second loss term, the second loss term indicates the similarity between the first feature information and third feature information, and a goal of training using the second loss term includes reducing the similarity between the first feature information and the third feature information, where the third feature information includes feature information of a third point in the second image, where the third point is different from the second point.
[0168] For example, the training device may determine all third points corresponding to a first point in the i-th image included in the training sample, and calculate the similarity between the feature information of the first point in the i-th image and the feature information of all third points. The training device may repeatedly perform the aforementioned operation to obtain the similarity between the feature information of each first point in the i-th image in the training sample and the feature information of all third points. The training device may repeatedly perform the aforementioned operation to obtain the similarity between the feature information of each first point in each image in the training sample and the feature information of all third points, thereby obtaining the value of the second loss term.
[0169] In one case, the third point in the second image can be all points in the second image except the second point. In another case, the second point and the third point in the second image are both located on a first line, the first line is obtained by projecting the second line into the second image, the second line passes through the first point, and the second line also passes through the focus of the camera that captured the first image and / or the origin of the camera coordinate system corresponding to the first image; it should be noted that the concept of "second line" is similar to that of "third line", which can be understood by referring to the description and will not be repeated here. Alternatively, the training device can also use other methods to determine the third point, which will not be exhaustively listed here.
[0170] Optionally, if the second point and the third point in the second image are both located on the first line, the training device determines the specific implementation process of all third points corresponding to a first point. For example, in one implementation, the training device may project the second line onto the j-th image (i.e., an example of any second image) to obtain the first line, and after determining a second point q corresponding to the first point p in the j-th image, + Then, from the first line and located at the second point q + In addition to sampling multiple third points, we can get the jth image Among them, the first line and the second point q + Any point other than can be the third point. Represents the set of multiple third points in the j-th image, N neg The training device repeatedly performs the above steps to determine multiple third points in each second image in the training sample, thereby obtaining all third points corresponding to the first point p.
[0171] In another implementation, after determining the second line, the training device can determine multiple sampling points from the second line, and project the multiple sampling points onto the j-th image to obtain multiple projection points. + , then the second point q among the aforementioned multiple projection points + All projection points other than q are determined as all third points included in the j-th image; if the multiple projection points do not include the second point q + , all of the aforementioned multiple projection points are determined as all third points included in the j-th image. The training device repeats the aforementioned steps to determine multiple third points in each second image in the training sample, thereby obtaining all third points corresponding to the first point p.
[0172] The training device can also obtain all third points corresponding to each first point in other ways. The examples here are only for the convenience of understanding this solution and are not used to limit this solution.
[0173] For a more intuitive understanding of this solution, please refer to Figure 9, which is a schematic diagram of the first point, second point and third point provided in an embodiment of the present application. As shown in Figure 9, a second point corresponding to the first point in the second image and multiple third points are located on the same line. It should be understood that the example in Figure 9 is only for the convenience of understanding this solution and is not used to limit this solution.
[0174] In an embodiment of the present application, after determining the first point, the second line can be obtained. Projecting the second line onto an image from another perspective (i.e., the second image) can determine the first line in the second image. Points with the same semantics as the first point are generally located on the first line. Sampling the third point from the first line can help the first model learn which points in images from other perspectives are consistent with the points in the first scene corresponding to the first point, and which points in images from other perspectives are inconsistent with the points in the first scene corresponding to the first point, which can further improve the accuracy of the prediction results output by the first model.
[0175] To further understand this solution, an example of a loss function including a first loss term and a second loss term is disclosed here:
[0176] Among them, p′ represents the feature information of the first point p in the feature information of the i-th image included in the training sample, q′ + Represents the second point q in the feature information of the j-th image included in the training sample + The characteristic information of q′ - Represents the third point q in the feature information of the j-th image included in the training sample - The feature information of , τ represents the learnable scalar parameter, Represents the assignment to each q - The weight of exp(p′·q′ + / τ) represents the feature information of the first point p and the feature information of the second point q + The similarity between the feature information, Represents the feature information of the first point p and multiple third points q - The similarity between the feature information, Represents a first value of the loss function corresponding to a first point p in the i-th image included in the training sample and the j-th image (that is, any image other than the i-th image in the training sample); the training device calculates a first value between a first point p in the i-th image and each other image in the training sample (that is, each j-th image), and averages multiple first values to obtain a second value of the loss function corresponding to a first point p in the i-th image included in the training sample and all other images.
[0177] The training device calculates the N included in the i-th image c The second value corresponding to each first point p in the first points p is calculated c The average of the second values is L contrast , L contrast Represents the third value of the loss function corresponding to the i-th image. The training device calculates the third value corresponding to each image in the training sample, averages all the third values, and obtains the value of the loss function. It should be understood that the examples in equations (7) and (8) are only for the convenience of understanding this solution and are not used to limit this solution.
[0178] Since a first point p and multiple third points q in the jth image - Correspondingly, different third points q - The same weight can be used Different weights can also be used Optionally, the second point q + and every third point q - The distance between each third point q is calculated - Weight Every third point q - With the second point q + The farther the distance is, the greater the third point q - Weight The larger the value, the greater the weight. An example of a formula:
[0179] Wherein, τ′ is a scalar parameter. The meanings of other letters in formula (9) can be found in the above descriptions of formula (7) and formula (8), which will not be elaborated here. It should be understood that the example in formula (9) is only for the convenience of understanding this solution and is not used to limit this solution.
[0180] For a more intuitive understanding of the present solution, please refer to Figure 10, which is a schematic diagram of the calculation process of the loss function provided in an embodiment of the present application. In Figure 10, the calculation of a first value of the loss function corresponding to a first point in a first image and a second image is taken as an example. After obtaining the feature information of the first point in the first image, the feature information of the second point in the second image, and the feature information of the third point, the first similarity between the feature information of the first point and the feature information of the second point can be calculated, the second similarity between the feature information of the first point and the feature information of multiple third points can be calculated, and the distance between the feature information of the second point and the feature information of multiple third points can also be calculated. Then, based on the aforementioned first similarity, second similarity and distance, a first value of the loss function corresponding to a first point in a first image and a second image is generated. For an understanding of the meaning of the "first value", please refer to the above description. It should be understood that the example in Figure 10 is only for the convenience of understanding the present solution and is not used to limit the present solution.
[0181] In an embodiment of the present application, since the first point in the first image and the second point in the second image correspond to the same point in the first scene, and the third point is different from the second point, that is, the third point and the first point correspond to different points in the first scene, the purpose of using the second loss term for training includes reducing the similarity between the first feature information of the first point and the third feature information of the third point, that is, not only the feature information of the same point in the first scene in images at different perspectives will be more similar, but also the feature information of different points in the first scene in images at different perspectives will be less similar. The feature information obtained by the aforementioned first model can reflect more connections between images from different perspectives, which is conducive to further enhancing the geometric perception ability of the model, thereby improving the accuracy of the prediction results output by the first model.
[0182] Optionally, the loss function in step 504 may also include a third loss term, which indicates the similarity between the expected result corresponding to the training sample and the predicted result output by the first model. The purpose of training using the third loss term includes improving the similarity between the expected result corresponding to the training sample and the predicted result output by the first model.
[0183] For example, if the task of the first model is to generate an image of the first scene at a new perspective, the third loss term indicates the similarity between the predicted image and the expected image of the first scene at the new perspective. Step 504 may include: the training device training the first model based on feature information of each image in the training sample, the predicted image, and a loss function, wherein the loss function includes the first loss term and the third loss term.
[0184] Among them, in the process of training the first model, because we hope that the output of the first model is as close as possible to the desired value, we can compare the predicted value output by the first model with the desired expected value, and then update the weight vector of each layer of the neural network according to the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the first model). For example, if the model's predicted value is high, adjust the weight vector to make it predict lower, and continue to adjust until the first model can predict the desired target value or a value very close to the desired target value. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value", which is the third loss term. They are important equations used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the deep neural network becomes a process of minimizing this loss as much as possible.
[0185] In the embodiment of the present application, a specific application scenario of the present solution is provided, which improves the degree of integration of the present solution with the actual application scenario and reduces the difficulty of implementing the present solution.
[0186] Optionally, step 504 may include: the training device trains the first model based on feature information of each image in the training sample, the predicted image and a loss function, wherein the loss function includes a first loss term, a second loss term and a third loss term.
[0187] The training device repeatedly executes steps 501 to 504 to implement iterative training of the first model until the convergence condition of the loss function is met, thereby obtaining the trained first model.
[0188] 2. Reasoning Stage
[0189] In the embodiment of the present application, the inference stage describes the process of how the execution device 230 uses the first machine learning model / rule 201 to output a prediction result corresponding to the data to be processed. Specifically, please refer to Figure 11, which is a flowchart of the image processing method provided in the embodiment of the present application. The image processing method provided in the embodiment of the present application may include:
[0190] 1101. Obtain data to be processed, where multiple images in the data to be processed include images of a scene at multiple viewing angles.
[0191] 1102. Input the data to be processed into the first model, perform feature extraction through the first model, and obtain feature information of each image in the data to be processed.
[0192] In an embodiment of the present application, optionally, the feature information of each image in the data to be processed includes feature information of multiple points of each image in the data to be processed, and the multiple points include a first pixel point. Step 1102 may include: executing the device to obtain initial feature information of the second pixel point, the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics; fusing the initial feature information of the first pixel point with the initial feature information of the second pixel point to obtain the feature information of the first pixel point.
[0193] 1103. Perform feature processing using the first model based on feature information of each image in the data to be processed to obtain a prediction result output by the first model.
[0194] In an embodiment of the present application, optionally, the first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of the first scene from multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between the first feature information and the second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
[0195] Optionally, the first model is trained based on the training sample, the first loss term and the second loss term, and the goal of training with the second loss term includes reducing the similarity between the first feature information and the third feature information
[0196] In an embodiment of the present application, the first model in steps 1101 to 1103 is obtained by the training method of the model described in the embodiment corresponding to Figure 5 above. The specific implementation method of the execution device performing steps 1101 to 1103 and the meaning of the nouns in steps 1101 to 1103 can all be referred to the description in the embodiment corresponding to Figure 5 above. The difference is that the "training sample" in the embodiment corresponding to Figure 5 is replaced by the "data to be processed" in the embodiment corresponding to Figure 11, and they will not be repeated here one by one.
[0197] In order to more intuitively understand the beneficial effects of this solution, the following also describes the beneficial effects brought about by the embodiment of the present application in combination with experimental data. In the experiment, the task of the first model is to generate an image of the first scene under a new perspective as an example, and 3D-FRONT and ScanNet are selected as the training data set and the data set used for testing. The peak signal-to-noise ratio (PSNR), structural similarity index (SSIM) and learned perceptual image patch similarity (LPIPS) are used to evaluate the model. Among them, the higher the PSNR and SSIM, the better the prediction result output by the model, and the lower the LPIPS, the better the prediction result output by the model. The experimental results are shown in Table 1 below.
[0198] Table 1
[0199] Among them, PixelNeRF, MVSNeRF, and Neuray are three existing models. The experimental data in Table 1 were obtained by training the above three models using existing methods. The data outside the brackets in Table 1 are obtained by training the models using simulation data and testing the models using real data; the data inside the brackets are obtained by training the models using real data and testing the models using real data. Referring to the data in Table 1, it can be seen that the prediction results output by the model obtained based on the solution provided by this application are the best.
[0200] On the basis of the embodiments corresponding to Figures 1 to 11, in order to better implement the above-mentioned scheme of the embodiment of the present application, the following also provides related equipment for implementing the above-mentioned scheme. Please refer to Figure 12 in detail. Figure 12 is a structural diagram of the training device of the model provided in the embodiment of the present application. The model training device 1200 includes: an acquisition module 1201 for acquiring training samples, wherein the multiple images in the training samples include images of the first scene under multiple perspectives; a processing module 1202 for inputting the training samples into the first model, performing feature extraction through the first model, and obtaining feature information of each image in the training sample; a training module 1203 for training the first model based on the feature information of each image in the training sample and the first loss term;
[0201] The multiple images include a first image and a second image, and the goal of training using the first loss term includes improving the similarity between the first feature information and the second feature information, the first feature information includes feature information of the first point in the first image, the second feature information includes feature information of the second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
[0202] In one possible design, the training module 1203 is specifically used to train the first model based on the feature information of each image in the training sample, the first loss term, and the second loss term, wherein the goal of training using the second loss term includes reducing the similarity between the first feature information and the third feature information, and the third feature information includes feature information of a third point in the second image, and the third point is different from the second point.
[0203] In one possible design, the second point and the third point are both located on the first line, the second line is projected into the second image to obtain the first line, the second line passes through the first point, and the second line also passes through the focus of the camera that captures the first image and / or the origin of the camera coordinate system corresponding to the first image.
[0204] In one possible design, the feature information of each image in the training sample includes updated feature information of multiple first pixel points of each image in the training sample; the processing module 1202 is specifically used to obtain the initial feature information of the second pixel point, and fuse the initial feature information of the first pixel point with the initial feature information of the second pixel point to obtain the updated feature information of the first pixel point, wherein the first pixel point and the second pixel point are points in different images of the multiple images, and the first pixel point and the second pixel point have the same semantics.
[0205] In one possible design, the first pixel point is included in the third image of the training sample, and the processing module 1202 includes: an acquisition submodule, used to acquire at least one third point on a third line, where the third line passes through the first pixel point, and the third line also passes through the focus of the camera that takes the third image and / or the origin of the image coordinate system corresponding to the third image; the acquisition submodule, further used to acquire a feature information set, where the feature information set includes initial feature information of each of a plurality of projection points, where the projection point is a point where the third point is projected onto a fourth image, where the fourth image is an image other than the third image in the training sample, and where the plurality of projection points include the second pixel point; and a fusion submodule, used to fuse the initial feature information of the first pixel point with the feature information set.
[0206] In one possible design, the training sample also includes a new perspective, and the processing module 1202 is further used to perform feature processing through the first model based on the feature information of each image in the training sample to obtain a predicted image of the first scene at the new perspective; the training module 1203 is specifically used to train the first model based on the feature information of each image in the training sample, the predicted image, the first loss term and the third loss term, and the third loss term indicates the similarity between the predicted image and the expected image of the first scene at the new perspective.
[0207] In one possible design, the predicted image includes first color values of multiple pixel points, and the processing module 1202 includes: a processing submodule, which is used to perform feature processing through the first model to obtain information corresponding to a third pixel point generated by the first model, where the third pixel point is any one of the multiple pixel points, and the information corresponding to the third pixel point includes multiple second color values and a voxel density corresponding to each second color value; a normalization submodule, which is used to normalize the voxel density corresponding to each second color value to obtain the weight of each second color value; and a weighted summation submodule, which is used to perform weighted summation on the multiple second color values according to the weight of each second color value to obtain the first color value of the third pixel point.
[0208] It should be noted that the information interaction, execution process, etc. between the modules / units in the model training device 1200 are based on the same concept as the various method embodiments corresponding to Figures 3 to 11 in this application. For specific contents, please refer to the description in the method embodiments shown above in this application, and will not be repeated here.
[0209] Please refer to Figure 13, which is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application. The image processing device 1300 includes: an acquisition module 1301, which is used to acquire data to be processed, where the multiple images in the data to be processed include images of a scene from multiple perspectives; a processing module 1302, which is used to input the data to be processed into a first model, perform feature extraction using the first model, and obtain feature information of each image in the data to be processed; the processing module 1302 is further used to perform feature processing using the first model based on the feature information of each image in the data to be processed, and obtain a prediction result output by the first model;
[0210] In which, the first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of the first scene under multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between the first feature information and the second feature information, the first feature information includes feature information of the first point in the first image, the second feature information includes feature information of the second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
[0211] In one possible design, the first model is trained based on training samples, a first loss term, and a second loss term. The goal of training with the second loss term includes reducing the similarity between the first feature information and the third feature information. The third feature information includes feature information of a first pixel in the second image, and the first pixel is different from the second pixel.
[0212] In one possible design, the feature information of each image in the data to be processed includes feature information of multiple first pixel points of each image in the data to be processed; the processing module 1302 is specifically used to obtain the initial feature information of the second pixel point, and fuse the initial feature information of the first pixel point with the initial feature information of the second pixel point to obtain the feature information of the first pixel point, wherein the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics.
[0213] It should be noted that the information interaction, execution process, etc. between the modules / units in the image processing device 1300 are based on the same concept as the various method embodiments corresponding to Figures 3 to 11 in this application. For specific contents, please refer to the description in the method embodiments shown above in this application, and will not be repeated here.
[0214] Please refer to FIG14 , which is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application. The image processing device 1400 includes: an acquisition module 1401, configured to acquire data to be processed, wherein the multiple images in the data to be processed include images of a scene from multiple perspectives; a processing module 1402, configured to input the data to be processed into a first model, perform feature extraction using the first model, and obtain feature information of each image in the data to be processed; the processing module is further configured to perform feature processing using the first model based on the feature information of each image in the data to be processed, and obtain a prediction result output by the first model;
[0215] Among them, the feature information of each image in the data to be processed includes the feature information of multiple first pixel points of each image in the data to be processed; the processing module 1402 is specifically used to obtain the initial feature information of the second pixel point, and fuse the initial feature information of the first pixel point with the initial feature information of the second pixel point to obtain the feature information of the first pixel point, wherein the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the semantics of the first pixel point and the second pixel point are the same.
[0216] In one possible design, the first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of the first scene from multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between the first feature information and the second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
[0217] It should be noted that the information interaction, execution process, etc. between the modules / units in the image processing device 1400 are based on the same concept as the various method embodiments corresponding to Figures 3 to 11 in this application. For specific contents, please refer to the description in the method embodiments shown above in this application, and will not be repeated here.
[0218] Next, an execution device provided in an embodiment of the present application will be described. Please refer to FIG15 , which is a schematic structural diagram of an execution device provided in an embodiment of the present application. Specifically, the execution device 1500 includes: a receiver 1501, a transmitter 1502, a processor 1503, and a memory 1504 (wherein the number of processors 1503 in the execution device 1500 may be one or more, and FIG15 uses one processor as an example). The processor 1503 may include an application processor 15031 and a communication processor 15032. In some embodiments of the present application, the receiver 1501, the transmitter 1502, the processor 1503, and the memory 1504 may be connected via a bus or other means.
[0219] Memory 1504 may include read-only memory and random access memory, and provides instructions and data to processor 1503. A portion of memory 1504 may also include non-volatile random access memory (NVRAM). Memory 1504 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.
[0220] Processor 1503 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.
[0221] The methods disclosed in the above embodiments of the present application can be applied to or implemented by processor 1503. Processor 1503 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in processor 1503. The above processor 1503 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and can further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 1503 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 1504, and processor 1503 reads the information in memory 1504 and, in conjunction with its hardware, completes the steps of the above method.
[0222] Receiver 1501 can be used to receive input digital or character information and generate signal input related to executing device-related settings and function control. Transmitter 1502 can be used to output digital or character information through the first interface. Transmitter 1502 can also be used to send instructions to the disk pack through the first interface to modify data in the disk pack. Transmitter 1502 can also include a display device such as a display screen.
[0223] In the embodiment of the present application, the application processor 15031 in the processor 1503 is configured to execute the image processing method executed by the execution device in the embodiments corresponding to Figures 3 to 11. It should be noted that the specific manner in which the application processor 15031 executes the above-mentioned steps is based on the same concept as the various method embodiments corresponding to Figures 3 to 11 in the present application, and the technical effects brought about are the same as the various method embodiments corresponding to Figures 3 to 11 in the present application. For specific details, please refer to the description of the method embodiments shown above in the present application, and will not be repeated here.
[0224] The present application also provides a training device. Please refer to FIG. 16 , which is a schematic diagram of the structure of a training device provided by an embodiment of the present application. Specifically, the training device 1600 is implemented by one or more servers. The training device 1600 may vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1622 (e.g., one or more processors) and a memory 1632, and one or more storage media 1630 (e.g., one or more mass storage devices) storing application programs 1642 or data 1644. The memory 1632 and storage medium 1630 may be either ephemeral or persistent storage. The program stored in the storage medium 1630 may include one or more modules (not shown), each of which may include a series of instruction operations on the training device. Furthermore, the CPU 1622 may be configured to communicate with the storage medium 1630 to execute the series of instruction operations in the storage medium 1630 on the training device 1600.
[0225] The training device 1600 may also include one or more power supplies 1626, one or more wired or wireless network interfaces 1650, one or more input and output interfaces 1658, and / or one or more operating systems 1641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0226] In the embodiment of the present application, the central processing unit 1622 is used to execute the training method of the model executed by the training device in the embodiments corresponding to Figures 3 to 11. It should be noted that the specific manner in which the central processing unit 1622 executes the above-mentioned steps is based on the same concept as the various method embodiments corresponding to Figure 12 of the present application, and the technical effects brought about are the same as the various method embodiments corresponding to Figure 12 of the present application. For specific details, please refer to the description of the method embodiments shown above in the present application, and will not be repeated here.
[0227] Also provided in an embodiment of the present application is a computer program product, which, when run on a computer, enables the computer to execute the steps performed by the execution device in the method described in the embodiments shown in Figures 3 to 11 above, or enables the computer to execute the steps performed by the training device in the method described in the embodiments shown in Figures 3 to 11 above.
[0228] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a program for signal processing. When the computer-readable storage medium is run on a computer, the computer executes the steps executed by the execution device in the method described in the embodiments shown in Figures 3 to 11 above, or the computer executes the steps executed by the training device in the method described in the embodiments shown in Figures 3 to 11 above.
[0229] The execution device, training device, model training device or image processing device provided in the embodiments of the present application can specifically be a chip, and the chip includes: a processing unit and a communication unit, the processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute the computer execution instructions stored in the storage unit to enable the chip to execute the image processing method described in the embodiments shown in Figures 3 to 11 above, or to enable the chip to execute the model training method described in the embodiments shown in Figures 3 to 11 above. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0230] Specifically, see Figure 17 , which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be implemented as a neural network processor (NPU) 170. NPU 170 is mounted on a host CPU (host CPU) as a coprocessor, with tasks assigned by the host CPU. The core of the NPU is arithmetic circuit 170 , which controls arithmetic circuit 1703 via controller 1704 to extract matrix data from memory and perform multiplication operations.
[0231] In some implementations, arithmetic circuit 1703 includes multiple processing units (PEs). In some implementations, arithmetic circuit 1703 is a two-dimensional systolic array. Arithmetic circuit 1703 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, arithmetic circuit 1703 is a general-purpose matrix processor.
[0232] For example, assume there are input matrix A, weight matrix B, and output matrix C. The computation circuit retrieves the corresponding data of matrix B from weight memory 1702 and caches it on each PE in the computation circuit. The computation circuit then retrieves the data of matrix A from input memory 1701 and performs a matrix operation on it with matrix B. The partial or final matrix result is stored in accumulator 1708.
[0233] Unified memory 1706 is used to store input and output data. Weight data is directly transferred to weight memory 1702 through the Direct Memory Access Controller (DMAC) 1705. Input data is also transferred to unified memory 1706 through the DMAC.
[0234] BIU stands for Bus Interface Unit 1710 , which is used for interaction between the AXI bus, DMAC, and Instruction Fetch Buffer (IFB) 1709 .
[0235] The bus interface unit 1710 (BIU) is used for the instruction fetch memory 1709 to obtain instructions from the external memory, and is also used for the storage unit access controller 1705 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0236] DMAC is mainly used to move input data in the external memory DDR to the unified memory 1706 or move weight data to the weight memory 1702 or move input data to the input memory 1701.
[0237] The vector calculation unit 1707 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.
[0238] In some implementations, the vector calculation unit 1707 can store the processed output vector to the unified memory 1706. For example, the vector calculation unit 1707 can apply a linear function and / or a nonlinear function to the output of the operation circuit 1703, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values to generate an activation value. In some implementations, the vector calculation unit 1707 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1703, for example, for use in a subsequent layer in a neural network.
[0239] An instruction fetch buffer 1709 connected to the controller 1704 is used to store instructions used by the controller 1704;
[0240] Unified memory 1706, input memory 1701, weight memory 1702, and instruction fetch memory 1709 are all on-chip memories. External memories are private to the NPU hardware architecture.
[0241] Among them, the operations of each layer in the first model can be performed by the operation circuit 1703 or the vector calculation unit 1707.
[0242] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above-mentioned first aspect method.
[0243] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0244] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0245] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0246] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A data processing method, characterized in that: The method comprises: Acquire a training sample, wherein the plurality of images in the training sample include images of the first scene at a plurality of viewing angles; Inputting the training sample into a first model, performing feature extraction through the first model, and obtaining feature information of each image in the training sample; Training the first model according to feature information of each image in the training sample and a first loss term; The multiple images include a first image and a second image, and the goal of training using the first loss item includes improving the similarity between first feature information and second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
2. The method according to claim 1, characterized in that The step of training the first model according to the feature information of each image in the training sample and the first loss term includes: The first model is trained based on feature information of each image in the training sample, a first loss term, and a second loss term, wherein a goal of training with the second loss term includes reducing a similarity between the first feature information and third feature information, wherein the third feature information includes feature information of a third point in the second image, and the third point is different from the second point.
3. The method according to claim 2, characterized in that The second point and the third point are both located on the first line. The first line is obtained by projecting the second line into the second image. The second line passes through the first point. The second line also passes through the focus of the camera that takes the first image and / or the origin of the camera coordinate system corresponding to the first image.
4. The method according to any one of claims 1 to 3, characterized in that: The feature information of each image in the training sample includes updated feature information of a plurality of first pixels of each image in the training sample, and the feature information of each image in the training sample is obtained by extracting features through the first model, including: Acquire initial feature information of a second pixel point, where the first pixel point and the second pixel point are points in different images of the multiple images, and the first pixel point and the second pixel point have the same semantics; The initial feature information of the first pixel point is fused with the initial feature information of the second pixel point to obtain updated feature information of the first pixel point.
5. The method according to claim 4, characterized in that The first pixel point is included in the third image of the training sample, and the obtaining of initial feature information of the second pixel point includes: Acquire at least one third point on a third line, where the third line passes through the first pixel point, and the third line also passes through a focus of a camera that captures the third image and / or an origin of an image coordinate system corresponding to the third image; Acquire a feature information set, the feature information set including initial feature information of each projection point in a plurality of projection points, the projection point being a point where the third point is projected onto a fourth image, the fourth image being an image other than the third image in the training sample, and the plurality of projection points including the second pixel point; The fusing the initial feature information of the first pixel point with the initial feature information of the second pixel point includes: The initial feature information of the first pixel is merged with the feature information set.
6. The method according to any one of claims 1 to 3, characterized in that: The training sample also includes a new perspective. After extracting features through the first model to obtain feature information of each image in the training sample, the method further includes: According to the feature information of each image in the training sample, feature processing is performed by the first model to obtain a predicted image of the first scene at the new perspective; The step of training the first model according to the feature information of each image in the training sample and the first loss term includes: The first model is trained based on feature information of each image in the training sample, the predicted image, the first loss term and a third loss term, wherein the third loss term indicates a similarity between the predicted image and an expected image of the first scene at the new perspective.
7. The method according to claim 5, characterized in that The predicted image includes first color values of a plurality of pixels, and the feature processing by the first model to obtain a predicted image of the first scene at the new viewing angle includes: By performing feature processing on the first model, information corresponding to a third pixel point generated by the first model is obtained, and the third pixel point The pixel point is any pixel point among the plurality of pixel points, and the information corresponding to the third pixel point includes a plurality of second color values and a voxel density corresponding to each of the second color values; Normalizing the voxel density corresponding to each of the second color values to obtain a weight of each of the second color values; The first color value of the third pixel is obtained by performing weighted summation on the multiple second color values according to the weight of each second color value.
8. A method for processing an image, characterized in that: The method comprises: Acquire data to be processed, wherein the plurality of images in the data to be processed include images of a scene at a plurality of viewing angles; Inputting the data to be processed into a first model, performing feature extraction through the first model, and obtaining feature information of each image in the data to be processed; According to the feature information of each image in the data to be processed, feature processing is performed by the first model to obtain a prediction result output by the first model; The first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of a first scene at multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between first feature information and second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
9. The method according to claim 8, characterized in that The first model is trained based on the training samples, the first loss term and the second loss term. The goal of training with the second loss term includes reducing the similarity between the first feature information and the third feature information. The third feature information includes feature information of a first pixel in the second image, and the first pixel is different from the second pixel.
10. The method according to claim 8 or 9, characterized in that: The feature information of each image in the data to be processed includes feature information of a plurality of first pixel points of each image in the data to be processed, and the feature information of each image in the data to be processed is obtained by extracting features through the first model, including: Acquire initial feature information of a second pixel point, where the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics; The initial feature information of the first pixel point is fused with the initial feature information of the second pixel point to obtain the feature information of the first pixel point.
11. A method for processing an image, characterized in that: The method comprises: Acquire data to be processed, wherein the plurality of images in the data to be processed include images of a scene at a plurality of viewing angles; Inputting the data to be processed into a first model, performing feature extraction through the first model, and obtaining feature information of each image in the data to be processed; According to the feature information of each image in the data to be processed, feature processing is performed by the first model to obtain a prediction result output by the first model; The feature information of each image in the data to be processed includes feature information of a plurality of first pixel points of each image in the data to be processed, and the feature extraction by the first model to obtain the feature information of each image in the data to be processed includes: Acquire initial feature information of a second pixel point, where the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics; The initial feature information of the first pixel point is fused with the initial feature information of the second pixel point to obtain the feature information of the first pixel point.
12. The method according to claim 11, characterized in that The first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of a first scene at multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between first feature information and second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
13. A model training device, characterized in that: The training device of the model includes: An acquisition module, configured to acquire a training sample, wherein the plurality of images in the training sample include images of the first scene at a plurality of viewing angles; A processing module, used for inputting the training sample into a first model, performing feature extraction through the first model, and obtaining feature information of each image in the training sample; A training module, used for training the first model according to the feature information of each image in the training sample and the first loss term; The multiple images include a first image and a second image, and the goal of training using the first loss item includes improving the similarity between first feature information and second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
14. The device according to claim 13, characterized in that The training module is specifically used to train the first model based on the feature information of each image in the training sample, the first loss term and the second loss term, wherein the goal of training using the second loss term includes reducing the similarity between the first feature information and third feature information, and the third feature information includes feature information of a third point in the second image, and the third point is different from the second point.
15. The device according to claim 14, characterized in that The second point and the third point are both located on the first line. The first line is obtained by projecting the second line into the second image. The second line passes through the first point. The second line also passes through the focus of the camera that takes the first image and / or the origin of the camera coordinate system corresponding to the first image.
16. The device according to any one of claims 13 to 15, characterized in that The feature information of each image in the training sample includes updated feature information of a plurality of first pixels of each image in the training sample; The processing module is specifically used to obtain initial feature information of a second pixel point, fuse the initial feature information of the first pixel point with the initial feature information of the second pixel point, and obtain updated feature information of the first pixel point, wherein the first pixel point and the second pixel point are points in different images of the multiple images, and the first pixel point and the second pixel point have the same semantics.
17. The device according to claim 16, characterized in that The first pixel point is included in the third image of the training sample, and the processing module includes: an acquisition submodule, configured to acquire at least one third point on a third line, wherein the third line passes through the first pixel point, and the third line also passes through a focus of a camera used to capture the third image and / or an origin of an image coordinate system corresponding to the third image; The acquisition submodule is further used to acquire a feature information set, wherein the feature information set includes initial feature information of each projection point in a plurality of projection points, wherein the projection point is a point where the third point is projected onto a fourth image, wherein the fourth image is an image other than the third image in the training sample, and wherein the plurality of projection points include the second pixel point; The fusion submodule is used to fuse the initial feature information of the first pixel with the feature information set.
18. The device according to any one of claims 13 to 15, characterized in that The training sample also includes a new perspective, and the processing module is further used to perform feature processing through the first model according to feature information of each image in the training sample to obtain a predicted image of the first scene at the new perspective; The training module is specifically used to train the first model based on the feature information of each image in the training sample, the predicted image, the first loss term and the third loss term, wherein the third loss term indicates the similarity between the predicted image and the expected image of the first scene at the new perspective.
19. The device according to claim 18, characterized in that The predicted image includes first color values of a plurality of pixels, and the processing module includes: a processing submodule, configured to perform feature processing through the first model to obtain information corresponding to a third pixel point generated by the first model, wherein the third pixel point is any one of the plurality of pixel points, and the information corresponding to the third pixel point includes a plurality of second color values and a voxel density corresponding to each of the second color values; a normalization submodule, configured to perform normalization processing on the voxel density corresponding to each second color value to obtain a weight of each second color value; A weighted summation submodule is used to perform weighted summation on the multiple second color values according to the weight of each second color value to obtain the first color value of the third pixel.
20. An image processing device, characterized in that: The image processing device comprises: An acquisition module, used to acquire data to be processed, wherein the multiple images in the data to be processed include images of the scene at multiple viewing angles; The processing module is used to input the data to be processed into the first model, extract features through the first model, and obtain the data to be processed. Process the feature information of each image in the data; The processing module is further used to perform feature processing through the first model according to feature information of each image in the data to be processed, so as to obtain a prediction result output by the first model; The first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of a first scene at multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between first feature information and second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
21. The device according to claim 20, characterized in that The first model is trained based on the training samples, the first loss term and the second loss term. The goal of training with the second loss term includes reducing the similarity between the first feature information and the third feature information. The third feature information includes feature information of a first pixel in the second image, and the first pixel is different from the second pixel.
22. The device according to claim 20 or 21, characterized in that The feature information of each image in the data to be processed includes feature information of a plurality of first pixels of each image in the data to be processed; The processing module is specifically used to obtain initial feature information of a second pixel point, and fuse the initial feature information of the first pixel point with the initial feature information of the second pixel point to obtain feature information of the first pixel point, wherein the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics.
23. An image processing device, characterized in that: The device comprises: An acquisition module, used to acquire data to be processed, wherein the multiple images in the data to be processed include images of the scene at multiple viewing angles; A processing module, used for inputting the data to be processed into a first model, performing feature extraction through the first model, and obtaining feature information of each image in the data to be processed; The processing module is further used to perform feature processing through the first model according to feature information of each image in the data to be processed, so as to obtain a prediction result output by the first model; The feature information of each image in the data to be processed includes feature information of a plurality of first pixel points of each image in the data to be processed; The processing module is specifically used to obtain initial feature information of a second pixel point, and fuse the initial feature information of the first pixel point with the initial feature information of the second pixel point to obtain feature information of the first pixel point, wherein the first pixel point and the second pixel point are points in different images in the data packet to be processed, and the first pixel point and the second pixel point have the same semantics.
24. The device according to claim 23, characterized in that The first model is trained based on training samples and a first loss term, the multiple images in the training samples include images of a first scene at multiple perspectives, the multiple images in the training samples include a first image and a second image, the first loss term indicates the similarity between first feature information and second feature information, the first feature information includes feature information of a first point in the first image, the second feature information includes feature information of a second point in the second image, and the first point in the first image and the second point in the second image correspond to the same point in the first scene.
25. A computer program product, characterized in that The computer program product comprises a program, and when the program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 12 .
26. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 12.
27. An execution device, characterized in that: comprising a processor and a memory, the processor being coupled to the memory, The memory is used to store programs; The processor is configured to execute the program in the memory so that the execution device executes the method according to any one of claims 8 to 12.
28. A training device, characterized in that comprising a processor and a memory, the processor being coupled to the memory, The memory is used to store programs; The processor is used to execute the program in the memory so that the training device performs the method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method and related equipment
CN116824284A
Three-dimensional object model retrieval method for natural scene
CN111179440A
Image rendering method and device of three-dimensional object and electronic equipment
CN114863007A
Model training method and device and moving object re-identification method
CN115147452A
Model training method and device and moving object re-identification method
CN115147453A
