WO2023124461A1 - 面向机器视觉任务的视频编解码方法、装置、设备及介质 - Google Patents
面向机器视觉任务的视频编解码方法、装置、设备及介质 Download PDFInfo
- Publication number
- WO2023124461A1 WO2023124461A1 PCT/CN2022/127208 CN2022127208W WO2023124461A1 WO 2023124461 A1 WO2023124461 A1 WO 2023124461A1 CN 2022127208 W CN2022127208 W CN 2022127208W WO 2023124461 A1 WO2023124461 A1 WO 2023124461A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- video image
- video
- preprocessing
- task
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 89
- 238000007781 pre-processing Methods 0.000 claims abstract description 190
- 230000000007 visual effect Effects 0.000 claims abstract description 132
- 230000008569 process Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 description 29
- 238000010586 diagram Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012805 post-processing Methods 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/189—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
- H04N19/192—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
Definitions
- the present disclosure relates to the technical field of machine vision, and in particular to a video encoding and decoding method, device, equipment and medium for machine vision tasks.
- Image preprocessing generally includes: image digitization, geometric transformation, normalization, smoothing, restoration, enhancement, etc.
- Image enhancement is one of the most basic contents in digital image processing technology, and it is also one of the preprocessing methods.
- Image enhancement is divided into image enhancement based on space domain and image enhancement based on frequency domain.
- the spatial domain refers to the image plane itself, and these methods are based on direct processing of the pixels of the image.
- the frequency domain is based on modifying the Fourier transform of the image.
- the spatial domain processing method is to directly process the gray value of each pixel in the two-dimensional space composed of image pixels. It can be the calculation and processing between pixels in an image, or it can be between several images.
- the calculation processing between the pixels, the frequency domain processing method is to indirectly process the image in the transform domain of the image.
- Representative image enhancement processing methods in the spatial domain include mean filtering and median filtering, both of which can remove or reduce noise.
- Image enhancement technology based on the frequency domain, generally speaking, the edge and noise of the image correspond to the high-frequency part in the Fourier transform, so the low-pass filter can smooth the image, remove the noise, and the part where the gray level of the image fuses with the high-frequency component of the spectrum
- the high-pass filter is used to attenuate or suppress low-frequency components, and the image can be sharpened.
- a video encoding method oriented to machine vision tasks comprising: acquiring visual task information corresponding to a video image to be encoded; judging the visual task information corresponding to the video image to be encoded Describe whether the video image to be encoded meets the image preprocessing condition before encoding; if the video image to be encoded meets the image preprocessing condition before encoding, perform a preprocessing operation on the video image to be encoded, and perform a preprocessing operation on the video image after performing the preprocessing operation Encoding: If the video image to be encoded does not meet the image preprocessing conditions before encoding, directly encode the video image to be encoded.
- the acquiring the visual task information corresponding to the video image to be encoded includes at least one of the following: before acquiring the video image, requesting the visual task information corresponding to the video image to be encoded from the image decoding end; During the image processing process, the visual task information corresponding to the video image to be encoded is requested from the image decoding end.
- the method further includes: generating a preprocessing flag of the video image to be encoded, wherein the preprocessing flag is used to identify whether a preprocessing operation has been performed on the video image to be encoded.
- the method further includes: generating a binary code stream according to the coding result of the video image to be coded, the preprocessing identifier, and the visual task information, and sending it to the image decoding end, wherein the image decoding end is used for The received binary code stream is decoded, and the corresponding visual task is performed on the decoded video image according to the preprocessing identification and visual task information in the decoding result.
- the image preprocessing operation includes: adjusting the size information of the video image, so that the adjusted video image meets the size information required by the machine vision task model.
- a video decoding method oriented to machine vision tasks, the method comprising: receiving a binary code stream from an image coding end, wherein the binary code stream is the video image to be coded by the image coding end
- the encoding result, the preprocessing identification and the visual task information are generated, and the preprocessing identification is used to identify whether the preprocessing operation has been performed on the video image to be encoded
- the binary code stream from the image encoding end is decoded to obtain the decoded Video images, preprocessing identifiers and visual task information; according to the decoded preprocessing identifiers and visual task information, perform corresponding visual tasks on the decoded video images.
- performing the corresponding visual task on the decoded video image according to the preprocessing identifier and visual task information obtained by decoding includes: judging whether the visual task to be performed is human vision based on the visual task information obtained by decoding task; if the vision task to be performed is a human vision task, the decoded video image is directly input into the human vision task model; if the vision task to be performed is a machine vision task, then the decoding is judged according to the preprocessing identifier obtained by decoding whether the preprocessing operation has been performed on the video image after decoding; if the preprocessing operation has been performed on the video image after decoding, then input the video image after decoding into the corresponding machine vision task model directly according to the visual task information obtained through decoding; if The decoded video image is not pre-processed, and the decoded video image is pre-processed according to the decoded visual task information, and the pre-processed video image is input into the corresponding machine vision task model .
- a video encoding device oriented to machine vision tasks, including: a task information acquisition module, configured to acquire visual task information corresponding to a video image to be encoded; an image preprocessing module, configured to The visual task information corresponding to the video image to be encoded is used to judge whether the video image to be encoded satisfies the image preprocessing conditions before encoding; the first image encoding module is used to determine whether the video image to be encoded meets the image preprocessing conditions before encoding , then perform a preprocessing operation on the video image to be encoded, and encode the video image after the preprocessing operation; the second image encoding module is used to directly Encode the video image to be encoded.
- a video decoding device oriented to machine vision tasks
- a data receiving module configured to receive a binary code stream from an image coding end, wherein the binary code stream is an image coding end Generated according to the encoding result of the video image to be encoded, the preprocessing identifier and the visual task information, the preprocessing identifier is used to identify whether the preprocessing operation has been performed on the video image to be encoded; the image decoding module is used to process the received The binary code stream is decoded to obtain the decoded video image, preprocessing identifier and visual task information; the task execution module is used to perform corresponding visual tasks on the decoded video image according to the decoded preprocessing identifier and visual task information .
- an electronic device which includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the The above-mentioned executable instructions are used to execute any one of the above-mentioned machine vision task-oriented video coding methods.
- a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the video coding oriented to the machine vision task described in any one of the above is implemented. method.
- FIG. 1 shows a schematic diagram of a traditional video codec system architecture in the related art
- FIG. 2 shows a schematic diagram of a machine vision task-oriented video encoding and decoding system architecture in an embodiment of the present disclosure
- Fig. 3 shows a flowchart of a video coding method oriented to machine vision tasks in an embodiment of the present disclosure
- Fig. 4 shows a flow chart of a video decoding method oriented to machine vision tasks in an embodiment of the present disclosure
- FIG. 5 shows a specific implementation flowchart of a video encoding method oriented to machine vision tasks in an embodiment of the present disclosure
- FIG. 6 shows a schematic diagram of a machine vision task-oriented video encoding device in an embodiment of the present disclosure
- FIG. 7 shows a schematic diagram of a machine vision task-oriented video decoding device in an embodiment of the present disclosure
- Fig. 8 shows a structural block diagram of an electronic device in an embodiment of the present disclosure.
- Example embodiments will now be described more fully with reference to the accompanying drawings.
- Example embodiments may, however, be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concept of example embodiments to those skilled in the art.
- the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
- Machine Vision It is a branch of artificial intelligence that is developing rapidly. Simply put, machine vision is the use of machines instead of human eyes for measurement and judgment.
- the machine vision system converts the ingested target into an image signal through a machine vision product (ie, an image capture device, which is divided into two types: CMOS (Complementary Metal Oxide Semiconductor) and CCD (charge coupled device) , sent to a dedicated image processing system to obtain the shape information of the photographed target, and convert it into a digital signal according to the pixel distribution, brightness, color and other information; the image system performs various operations on these signals to extract the characteristics of the target, and then according to the discrimination The result to control the equipment action on site.
- CMOS Complementary Metal Oxide Semiconductor
- CCD charge coupled device
- Different vision tasks have different requirements for video images. For example, human vision tasks can recognize video images of any size; but machine vision tasks often require input of fixed-size video images. Therefore, the collected video images are input into Before entering the machine vision task model, it is often necessary to perform image preprocessing operations on video images, including but not limited to modifying the size information of video images.
- Fig. 1 shows a schematic diagram of a traditional video encoding and decoding system architecture in the related art.
- image preprocessing operations on images in traditional video encoding schemes are performed at the decoding end. Since video image encoding is to reduce the amount of data during video image transmission, the video is compressed at the encoding end and decompressed at the decoding end to restore the video image with original size information.
- it involves reducing the video image through image preprocessing operations to obtain the fixed-size video images required by the machine vision task model. If the image preprocessing operation is performed on the decoding end, There may be redundancy issues.
- the present disclosure provides a machine vision task-oriented video encoding and decoding method, device, equipment, and medium, which overcomes the technical problem of large data transmission volume in traditional video encoding solutions at least to a certain extent.
- Fig. 2 shows a schematic diagram of a machine vision task-oriented video encoding and decoding system architecture in the embodiment of the present disclosure.
- the visual task information to be performed on the video image to be encoded can be obtained, and it can be determined whether it is necessary to perform image preprocessing operations on the image to be encoded according to the visual task information to be performed on the video image to be encoded.
- the image preprocessing is performed first and then encoded and compressed, so that the video image decoded by the decoder is the video image after the image preprocessing operation, and the corresponding visual task can be performed.
- the video encoding and decoding scheme adopted is consistent with the traditional video encoding scheme; for machine vision requirements and meet the pre-encoding image preprocessing conditions
- the video image is pre-encoded before image preprocessing, and then enters the video image encoder to form a binary code stream; the decoding end decodes the binary code stream and directly sends it to the machine vision task model.
- the decoded video images can be directly used, or further image post-processing/image enhancement operations can be performed to enter the human vision task model.
- an embodiment of the present disclosure provides a video coding method for machine vision tasks, which can be composed of Executed by any electronic device capable of computing. Including but not limited to smartphones, tablets, laptops, desktops, wearables, augmented reality, virtual reality, etc.
- the clients of the application programs installed in these electronic devices are the same, or the clients of the same type of application programs based on different operating systems. Based on different terminal platforms, the specific form of the client of the application program may also be different, for example, the client of the application program may be a mobile phone client, a PC client, and the like.
- the video encoding and decoding method, device, device and medium for machine vision tasks obtained by the embodiments of the present disclosure obtain the visual task information of the video image before encoding the video image at the encoding end, so as to obtain the visual task information according to the visual task of the video image Information to judge whether the video image needs image preprocessing.
- preprocessing the video image at the encoding end can make the video image decoded at the decoding end undergo image preprocessing, and can directly perform corresponding processing.
- Visual task processing thereby reducing the redundancy caused by the difference in image size between the source and the downstream visual task network input layer, and while reducing redundancy, retain the accuracy of subsequent machine vision tasks.
- Figure 3 shows a flow chart of a machine vision task-oriented video encoding method in an embodiment of the present disclosure.
- the machine vision task-oriented video encoding method provided in the embodiment of the present disclosure includes the following steps:
- the visual task information acquired in S302 above includes, but is not limited to: the task type of the visual task to be performed on the video image to be encoded, and the image preprocessing operations required to perform the visual task of the corresponding task type.
- the task type of the visual task can be determined by the user mode User of the camera.
- the user mode User is M, it indicates that the current visual task to be performed is a machine vision task;
- the user mode User is P, it indicates that the visual task currently to be performed is a human visual task.
- user mode judgment can be performed before encoding:
- the image preprocessing operation is performed first to form a video image V1 and then enters the video encoder to form a binary code stream, and the decoding end adopts the corresponding video decoder for decoding A decoded video image V1' is generated.
- the video image V1' directly performs machine vision tasks.
- the video image V1' can be directly used, or it can be entered into human vision after image post-processing/image enhancement operations.
- the visual task information corresponding to the video image to be encoded in the above S302 when obtaining the visual task information corresponding to the video image to be encoded in the above S302, before acquiring the video image, request the visual task information corresponding to the video image to be encoded from the image decoding end. In this way, the purpose of one acquisition and multiple use can be achieved, which is more suitable for scenarios where machine vision tasks and human vision tasks are executed according to certain rules.
- the above S302 when the above S302 acquires the visual task information corresponding to the video image to be encoded, it may also request the visual task information corresponding to the video image to be encoded from the image decoding end during the process of acquiring the video image. In this way, real-time task processing can be satisfied, and it is especially suitable for scenarios where machine vision tasks and human vision tasks are interleaved.
- the visual task information of the video image to be encoded is obtained, it can be judged whether the video image to be encoded needs to perform image preprocessing operations according to the visual task information corresponding to the video image to be encoded, that is, whether it satisfies the requirements of the pre-encoded image. preconditioning conditions.
- image preprocessing including but not limited to: adjustment of image height and/or width
- image encoding process It also often involves the adjustment of the image size. Therefore, when judging whether the video image to be encoded meets the pre-encoding image processing conditions according to the machine vision task information, it can be based on the video image size information required by the machine vision task and the pre-encoding video image.
- the size information of the video image to be encoded determines whether the video image to be encoded meets the image preprocessing conditions before encoding.
- the original size information of a certain video image is the first size information
- the image size information required by the corresponding visual task is the second size information (the second size information is smaller than the first size information)
- the video image of the first size information is compressed and encoded by the encoding end, and after being decoded by the decoding end, the obtained video image is still the video image of the first size information, and image preprocessing needs to be performed on the decoding end (the first The size is reduced to the second size) and sent to the machine vision task model.
- the size information required by the machine vision task is known at the encoding end as the second size information, and image preprocessing is directly performed on the video image at the encoding end (the first size is reduced to the second size information). two size), then only the video image of the second size information needs to be encoded and decoded.
- the image preprocessing operation required by the machine vision task is to enlarge the image size (the third size is enlarged to the fourth size), at this time, according to the video encoding and decoding scheme provided in the embodiments of the present disclosure, it is considered that the video image to be encoded is not If the image preprocessing conditions before encoding are met, that is, there is no need to perform image preprocessing on the video image at the encoding end.
- the image preprocessing operation in the embodiments of the present disclosure includes but is not limited to: adjusting the size information of the video image, so that the adjusted video image meets the size information required by the machine vision task model.
- the machine vision task-oriented video encoding method further includes the following steps: generating a preprocessing identifier of the video image to be encoded, Wherein, the preprocessing flag is used to identify whether a preprocessing operation has been performed on the video image to be encoded.
- the machine vision task-oriented video encoding method further includes the following steps: according to the encoding result of the video image to be encoded, The preprocessing identifier and visual task information generate a binary code stream, which is sent to the image decoding end, wherein the image decoding end is used to decode the received binary code stream, and according to the preprocessing identifier and visual task information in the decoding result, the The decoded video images perform corresponding visual tasks.
- the visual task information and the encoded video image are sent to the image decoding end together, so that the image decoding end can determine the machine vision task to be performed on the decoded video image according to the visual task information in the decoding result, and then Call the corresponding visual task model to process the decoded video image.
- the preprocessing identifier and the coded video image are sent to the image decoding end together, so that the image decoding end can judge whether the decoded video image has been subjected to an image preprocessing operation according to the preprocessing identifier in the decoding result, so that Send video images that have undergone image preprocessing operations directly into the machine vision model for processing.
- the machine vision task-oriented video encoding method moves the image preprocessing operation to the encoding end, which can reduce the difference between the source and the input layer of the downstream vision task network due to the size of the image.
- embodiments of the present disclosure also provide a video decoding method oriented to machine vision tasks, and the method can be executed by any electronic device with computing and processing capabilities.
- Fig. 4 shows a flowchart of a video decoding method oriented to machine vision tasks in an embodiment of the present disclosure.
- the video decoding method oriented to machine vision tasks provided in an embodiment of the present disclosure includes the following steps:
- S402. Receive the binary code stream from the image encoding end, wherein the binary code stream is generated by the image encoding end according to the encoding result of the video image to be encoded, the preprocessing identifier and the visual task information, and the preprocessing identifier is used to identify whether the video image to be encoded is A preprocessing operation has been performed;
- the image encoding end and the image decoding end in the embodiments of the present disclosure may be deployed on the same device, or may be deployed on different devices.
- the image encoding end obtains the visual task information of the video image from the image decoding end, and determines whether to perform image preprocessing operations on the video images according to the visual task information of the video images, and for the encoded video images that need to perform image preprocessing operations, the video The image is encoded after the preprocessing operation is performed; for the encoded video image that does not need to perform the image preprocessing operation, the video image is directly encoded; finally, the encoded video image, the preprocessing identifier and the visual task information are combined in the form of a binary code stream It is transmitted to the image decoding end, so that the image decoding end decodes the received binary code stream, and obtains the decoded video image, preprocessing identification and visual task information, and then according to the preprocessing identification and visual task information obtained by decoding, the decoding The subsequent video images perform
- performing a corresponding visual task on the decoded video image according to the preprocessing identifier and visual task information obtained through decoding includes: judging whether the visual task to be performed is a human visual task according to the visual task information obtained through decoding; If the vision task to be executed is a human vision task, the decoded video image is directly input into the human vision task model; Whether the video image has been pre-processed; if the decoded video image has been pre-processed, then directly input the decoded video image into the corresponding machine vision task model based on the decoded visual task information; if the decoded If the preprocessing operation is not performed on the video image, the preprocessing operation is performed on the decoded video image according to the visual task information obtained through decoding, and the video image after the preprocessing operation is input into the corresponding machine vision task model.
- the video decoding method oriented to machine vision tasks moves the image preprocessing operation to the encoding end, which can reduce the difference between the source and the input layer of the downstream vision task network due to the size of the image.
- Fig. 5 shows a specific implementation flow chart of a machine vision task-oriented video coding method in an embodiment of the present disclosure, as shown in Fig. 5 , specifically including the following steps:
- the encoding end Before the official start of image acquisition, the encoding end requests the configuration of user mode User and image preprocessing mode Mode from the decoding end; it can also request the mode User and image preprocessing mode configuration to the decoding end online after image acquisition starts.
- Method 1 Determine whether the image height h is greater than the height H after image preprocessing
- Method 2 Determine whether the image width w is greater than the width W after image preprocessing
- Mode 3 determine whether the product of image height h and image width w (h ⁇ w) is greater than the product of image preprocessed height W and image preprocessed width W (H ⁇ W);
- there may be multiple methods for the image preprocessing operation such as a ResNet inference image preprocessing method, a MobileNet inference image preprocessing method, and the like.
- the decoding end decodes the received binary code stream to form decoded video images x_hat and (User, flag, h, w).
- S510 judging the user mode User: if the user mode is the human vision mode P, directly perform the human vision processing, or enter the human vision model after image post-processing/image enhancement processing; if the user mode is the machine vision model M, then go to S512.
- the target detection network model is Faster R-CNN X101FPN, and the specific implementation is as follows:
- the encoding end Before the official start of image acquisition, the encoding end requests the user mode User and image preprocessing mode configuration from the decoding end, and sets the user mode User as M and the image preprocessing mode as ResNetX101.
- step 2 For the traditional 2k resolution video image x collected, the mode User is judged, and the mode User is the machine vision mode M, and enters step 2);
- the image height h is 1920, the image width is 1080, the image height H is 1333 after the ResNetX101 image preprocessing, the image width W is 750, the product of the image height h and the image width w is greater than the image
- the product of the height W after preprocessing and the width W after image preprocessing, the preprocessing flag flag 1, the image data before entering the encoder is reduced to 48.2% of the original;
- VTM8.2 is used for encoding, or an end-to-end neural network encoding method can be used, and the output of the encoder and (M, 1, 1920, 1080) form binary stream;
- the decoding end decodes the received binary code stream to form a decoded video image x_hat, (M, 1, 1920, 1080);
- the preprocessing flag is 1, and directly enters the machine vision model processing, wherein h and w are used to locate the target position information in the original image.
- embodiments of the present disclosure also provide a video encoding device oriented to machine vision tasks, as described in the following embodiments. Since the problem-solving principle of this device embodiment is similar to that of the above-mentioned method embodiment, the implementation of this device embodiment can refer to the implementation of the above-mentioned method embodiment, and repeated descriptions will not be repeated.
- FIG. 6 shows a schematic diagram of a machine vision task-oriented video encoding device in an embodiment of the present disclosure.
- the device includes: a task information acquisition module 61, an image preprocessing module 62, a first image encoding module 63 and The second image coding module 64 .
- the task information acquisition module 61 is used to obtain the visual task information corresponding to the video image to be encoded; the image preprocessing module 62 is used to judge whether the video image to be encoded meets the requirements of the image before encoding according to the visual task information corresponding to the video image to be encoded.
- Preprocessing conditions the first image encoding module 63 is used to perform a preprocessing operation on the video image to be encoded if the video image to be encoded meets the image preprocessing condition before encoding, and encode the video image after performing the preprocessing operation; the second The two-image encoding module 64 is configured to directly encode the video image to be encoded if the video image to be encoded does not meet the image preprocessing conditions before encoding.
- the above task information acquisition module 61, image preprocessing module 62, first image encoding module 63 and second image encoding module 64 correspond to S302-S308 in the method embodiment, and the above modules and corresponding steps
- the implemented examples and application scenarios are the same, but are not limited to the content disclosed in the foregoing method embodiments. It should be noted that, as a part of the apparatus, the above-mentioned modules can be executed in a computer system such as a set of computer-executable instructions.
- the video encoding device oriented to machine vision tasks moves the image preprocessing operation to the encoding end, which can reduce the difference between the source and the input layer of the downstream vision task network due to the size of the image.
- obtaining the visual task information corresponding to the video image to be encoded includes at least one of the following: before acquiring the video image, requesting the visual task information corresponding to the video image to be encoded from the image decoding end; , and request the visual task information corresponding to the video image to be encoded from the image decoding end.
- the method further includes: generating a preprocessing flag of the video image to be encoded, wherein the preprocessing flag is used to identify whether a preprocessing operation has been performed on the video image to be encoded.
- the method further includes: generating a binary code stream according to the coding result of the video image to be coded, the preprocessing identifier, and the visual task information, and sending it to the image decoding end, wherein the image decoding end is used to process the received binary code
- the stream is decoded, and according to the preprocessing identification and visual task information in the decoding result, the corresponding visual task is performed on the decoded video image.
- the image preprocessing operation includes: adjusting the size information of the video image, so that the adjusted video image meets the size information required by the machine vision task model.
- embodiments of the present disclosure also provide a video decoding device oriented to machine vision tasks, as described in the following embodiments. Since the problem-solving principle of this device embodiment is similar to that of the above-mentioned method embodiment, the implementation of this device embodiment can refer to the implementation of the above-mentioned method embodiment, and repeated descriptions will not be repeated.
- FIG. 7 shows a schematic diagram of a machine vision task-oriented video decoding device in an embodiment of the present disclosure.
- the device includes: a data receiving module 71 , an image decoding module 72 and a task execution module 73 .
- the data receiving module 71 is used to receive the binary code stream from the image encoding end, wherein, the binary code stream is generated by the image encoding end according to the encoding result of the video image to be encoded, the preprocessing identification and the visual task information, and the preprocessing identification is used To identify whether the video image to be encoded has been pre-processed; the image decoding module 72 is used to decode the received binary code stream to obtain the decoded video image, pre-processing identification and visual task information; the task execution module 73, It is used to perform corresponding visual tasks on the decoded video images according to the preprocessing identification and visual task information obtained through decoding.
- the above-mentioned data receiving module 71, image decoding module 72, and task execution module 73 correspond to S402-S406 in the method embodiment, and the examples and application scenarios implemented by the above-mentioned modules and corresponding steps are the same, but not It is limited to the content disclosed in the above method embodiments. It should be noted that, as a part of the apparatus, the above-mentioned modules can be executed in a computer system such as a set of computer-executable instructions.
- the video decoding device oriented to machine vision tasks moves the image preprocessing operation to the encoding end, which can reduce the difference in image size between the source and the input layer of the downstream vision task network.
- performing a corresponding visual task on the decoded video image according to the preprocessing identifier and visual task information obtained through decoding includes: judging whether the visual task to be performed is a human visual task according to the visual task information obtained through decoding; If the vision task to be executed is a human vision task, the decoded video image is directly input into the human vision task model; Whether the video image has been pre-processed; if the decoded video image has been pre-processed, then directly input the decoded video image into the corresponding machine vision task model based on the decoded visual task information; if the decoded If the preprocessing operation is not performed on the video image, the preprocessing operation is performed on the decoded video image according to the visual task information obtained through decoding, and the video image after the preprocessing operation is input into the corresponding machine vision task model.
- FIG. 8 An electronic device 800 according to this embodiment of the present disclosure is described below with reference to FIG. 8 .
- the electronic device 800 shown in FIG. 8 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
- electronic device 800 takes the form of a general-purpose computing device.
- Components of the electronic device 800 may include but not limited to: at least one processing unit 810 , at least one storage unit 820 , and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810 ).
- the storage unit stores program codes, and the program codes can be executed by the processing unit 810, so that the processing unit 810 executes various exemplary methods according to the present disclosure described in the "Exemplary Methods" section of this specification.
- Implementation steps For example, the processing unit 810 may perform the following steps in the above method embodiment: acquire the visual task information corresponding to the video image to be encoded; Processing conditions; if the video image to be encoded meets the image preprocessing conditions before encoding, then the preprocessing operation is performed on the video image to be encoded, and the video image after performing the preprocessing operation is encoded; if the video image to be encoded does not meet the image preprocessing conditions before encoding processing conditions, the video image to be encoded is directly encoded.
- the storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 8201 and/or a cache storage unit 8202 , and may further include a read-only storage unit (ROM) 8203 .
- RAM random access storage unit
- ROM read-only storage unit
- Storage unit 820 may also include programs/utilities 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, Implementations of networked environments may be included in each or some combination of these examples.
- Bus 830 may represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local area using any of a variety of bus structures. bus.
- the electronic device 800 can also communicate with one or more external devices 840 (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable the user to interact with the electronic device 800, and/or communicate with Any device (eg, router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interface 850 .
- the electronic device 800 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and/or a public network such as the Internet) through the network adapter 860 . As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830.
- other hardware and/or software modules may be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
- the example implementations described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of software products, and the software products can be stored in a non-volatile storage medium (which can be CD-ROM, U disk, mobile hard disk, etc.) or on the network , including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
- a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
- a computer-readable storage medium is also provided, and the computer-readable storage medium may be a readable signal medium or a readable storage medium.
- a program product capable of realizing the above-mentioned methods of the present disclosure is stored thereon.
- various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code, and when the program product is run on a terminal device, the program code is used to make the The terminal device executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section above in this specification.
- Computer-readable storage media in this disclosure may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
- RAM random access memory
- ROM read only memory
- EPROM or flash memory Erasable programmable read-only memory
- CD-ROM portable compact disk read-only memory
- magnetic storage device or any suitable combination of the above.
- a computer-readable storage medium may include a data signal carrying readable program code in baseband or as part of a carrier wave traveling as a data signal. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- a readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
- program code embodied on a computer readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, etc., or any suitable combination of the above.
- the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, and the programming language includes an object-oriented programming language—such as Java, C++, etc., or Includes conventional procedural programming languages - such as the "C" language or similar programming languages.
- the program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server to execute.
- the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (for example, using an Internet service provider). business to connect via the Internet).
- LAN local area network
- WAN wide area network
- Internet service provider for example, using an Internet service provider
- steps of the methods of the present disclosure are depicted in the drawings in a particular order, there is no requirement or implication that the steps must be performed in that particular order, or that all illustrated steps must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.
- the example embodiments described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of software products, and the software products can be stored in a non-volatile storage medium (which can be CD-ROM, U disk, mobile hard disk, etc.) or on the network , including several instructions to make a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
- a non-volatile storage medium which can be CD-ROM, U disk, mobile hard disk, etc.
- a computing device which may be a personal computer, a server, a mobile terminal, or a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本公开提供了一种面向机器视觉任务的视频编解码方法、装置、设备及介质,涉及机器视觉技术领域。该方法包括:获取待编码视频图像对应的视觉任务信息;根据待编码视频图像对应的视觉任务信息,判断待编码视频图像是否满足编码前图像预处理条件;若待编码视频图像满足编码前图像预处理条件,则对待编码视频图像执行预处理操作,并对执行预处理操作后的视频图像进行编码;若待编码视频图像不满足编码前图像预处理条件,则直接对待编码视频图像进行编码。本公开降低信源与下游视觉任务网络输入层之间因图像尺寸大小之差带来的冗余,并在降低冗余的同时,保留后续机器视觉任务的精度。
Description
相关申请的交叉引用
本申请是以CN申请号为202111624129.6,申请日为2021年12月28日的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本申请中。
本公开涉及机器视觉技术领域,尤其涉及一种面向机器视觉任务的视频编解码方法、装置、设备及介质。
随着机器学习应用的增长,车联网、视频监控、智慧城市等领域已经采用了许多智能平台,这些平台与大量传感器之间产生了海量的数据通信。数据量的增长直接导致先前面向人类视觉的编码方法效率降低,在延时和规模上也难以满足现实,面向智能机器的特征编码提上议程。
图像预处理一般包括:图像数字化、几何变换、归一化、平滑、复原、增强等。图像增强(Image Enhancement)是数字图像处理技术中最基本的内容之一,也是预处理方法之一。图像增强分为基于空间域的图像增强和基于频率域的图像增强。空间域是指图像平面本身,这类方法是以对图像的像素直接处理为基础的。频率域是以修改图像的傅立叶变换为基础的。空间域处理方法是在图像像素组成的二维空间里直接对每个像素的灰度值进行处理,它可以是在一幅图像内的像素点之间的运算处理,也可以是数幅图像间的像素点之间的运算处理,频率域处理方法是在图像的变换域对图像进行间接处理。具有代表性的空间域图像增强处理方法有均值滤波和中值滤波,二者可以去除或减弱噪声。基于频率域的图像增强技术,一般来说,图像的边缘和噪声对应傅立叶变换中的高频部分,所以低通滤波能够平滑图像,去除噪声,图像灰度发生聚变的部分与频谱的高频分量对应,所以采用高通滤波器衰减或抑制低频分量,能够对图像进行锐化处理。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。
根据本公开的一个方面,提供了一种面向机器视觉任务的视频编码方法,该方法包括:获取待编码视频图像对应的视觉任务信息;根据所述待编码视频图像对应的视觉任务信息,判断所述待编码视频图像是否满足编码前图像预处理条件;若所述待编码视频图像满足编码前图像预处理条件,则对待编码视频图像执行预处理操作,并对执行预处理操作后的视频图像进行编码;若所述待编码视频图像不满足编码前图像预处理条件,则直接对所述待编码视频图像进行编码。
在一些实施例中,所述获取待编码视频图像对应的视觉任务信息包括如下至少之一:在采集视频图像之前,向图像解码端请求所述待编码视频图像对应的视觉任务信息;在采集视频图像的过程中,向图像解码端请求所述待编码视频图像对应的视觉任务信息。
在一些实施例中,所述方法还包括:生成所述待编码视频图像的预处理标识,其中,所述预处理标识用于标识所述待编码视频图像是否已执行预处理操作。
在一些实施例中,所述方法还包括:根据所述待编码视频图像的编码结果、预处理标识和视觉任务信息生成二进制码流,发送到图像解码端,其中,所述图像解码端用于对接收到的二进制码流进行解码,并根据解码结果中的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
在一些实施例中,所述图像预处理操作包括:对视频图像的尺寸信息进行调整,使得调整后的视频图像满足机器视觉任务模型所需的尺寸信息。
根据本公开的一个方面,还提供了一种面向机器视觉任务的视频解码方法,该方法包括:接收来自图像编码端的二进制码流,其中,所述二进制码流为图像编码端根据待编码视频图像的编码结果、预处理标识和视觉任务信息生成的,所述预处理标识用于标识所述待编码视频图像是否已执行预处理操作;对来自图像编码端的二进制码流进行解码,得到解码后的视频图像、预处理标识和视觉任务信息;根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
在一些实施例中,所述根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务包括:根据解码得到的视觉任务信息,判断待执行视觉任务是否为人眼视觉任务;若待执行视觉任务为人眼视觉任务,则将解码后的视频图 像直接输入到人眼视觉任务模型中;若待执行视觉任务为机器视觉任务,则根据解码得到的预处理标识,判断解码后的视频图像是否已执行预处理操作;若解码后的视频图像已执行预处理操作,则直接根据解码得到的视觉任务信息,将解码后的视频图像输入到相应的机器视觉任务模型中;若解码后的视频图像未执行预处理操作,则根据解码得到的视觉任务信息,对解码后的视频图像执行预处理操作,并将执行预处理操作后的视频图像输入到相应的机器视觉任务模型中。
根据本公开的另一个方面,还提供了一种面向机器视觉任务的视频编码装置,包括:任务信息获取模块,用于获取待编码视频图像对应的视觉任务信息;图像预处理模块,用于根据所述待编码视频图像对应的视觉任务信息,判断所述待编码视频图像是否满足编码前图像预处理条件;第一图像编码模块,用于若所述待编码视频图像满足编码前图像预处理条件,则对待编码视频图像执行预处理操作,并对执行预处理操作后的视频图像进行编码;第二图像编码模块,用于若所述待编码视频图像不满足编码前图像预处理条件,则直接对所述待编码视频图像进行编码。
根据本公开的另一个方面,还提供了一种面向机器视觉任务的视频解码装置,包括:数据接收模块,用于接收来自图像编码端的二进制码流,其中,所述二进制码流为图像编码端根据待编码视频图像的编码结果、预处理标识和视觉任务信息生成的,所述预处理标识用于标识所述待编码视频图像是否已执行预处理操作;图像解码模块,用于对接收到的二进制码流进行解码,得到解码后的视频图像、预处理标识和视觉任务信息;任务执行模块,用于根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
根据本公开的另一个方面,还提供了一种电子设备,该电子设备包括:处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令来执行上述任意一项所述面向机器视觉任务的视频编码方法。
根据本公开的另一个方面,还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的面向机器视觉任务的视频编码方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出相关技术中一种传统视频编解码系统架构示意图;
图2示出本公开实施例中一种面向机器视觉任务的视频编解码系统架构示意图;
图3示出本公开实施例中一种面向机器视觉任务的视频编码方法流程图;
图4示出本公开实施例中一种面向机器视觉任务的视频解码方法流程图;
图5示出本公开实施例中一种面向机器视觉任务的视频编码方法的具体实现流程图;
图6示出本公开实施例中一种面向机器视觉任务的视频编码装置示意图;
图7示出本公开实施例中一种面向机器视觉任务的视频解码装置示意图;
图8示出本公开实施例中一种电子设备的结构框图。
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
为便于理解,在介绍本公开实施例之前,首先对本公开实施例中涉及到的几个名词进行解释如下:
机器视觉:是人工智能正在快速发展的一个分支。简单说来,机器视觉就是用机器代替人眼来做测量和判断。机器视觉系统是通过机器视觉产品(即图像摄取装置,分CMOS(Complementary Metal Oxide Semiconductor,互补金属氧化物半导体) 和CCD(charge coupled device,电荷耦合器件)两种)将被摄取目标转换成图像信号,传送给专用的图像处理系统,得到被摄目标的形态信息,根据像素分布和亮度、颜色等信息,转变成数字化信号;图像系统对这些信号进行各种运算来抽取目标的特征,进而根据判别的结果来控制现场的设备动作。
下面结合附图,对本公开实施例进行详细说明。
不同的视觉任务对视频图像的要求不同,例如,人眼视觉任务可对任意尺寸大小的视频图像进行识别;但机器视觉任务往往要求输入固定尺寸大小的视频图像,因而,将采集的视频图像输入到机器视觉任务模型前,往往需要对视频图像执行图像预处理操作,包括但不限于对视频图像的尺寸信息进行修改。
图1示出相关技术中一种传统视频编解码系统架构示意图,如图1所示,为满足机器视觉任务需求,传统视频编码方案对图像的图像预处理操作是在解码端进行的。由于视频图像编码是为了降低视频图像传输时的数据量,在编码端对视频进行压缩;在解码端进行解压缩,以恢复出原始尺寸信息的视频图像。而为满足机器视觉任务需求,有时候也会涉及到通过图像预处理操作对视频图像进行缩小,以得到机器视觉任务模型所需的固定尺寸的视频图像,若在解码端执行图像预处理操作,可能会带来冗余问题。
相关技术在专注于编码器内部算法改进时,忽略了原始信源与下游智能任务网络输入层之间大小之差带来的冗余。网络模型输入层节点个数与原视频单帧像素个数之差就是现有压缩方案所带来的冗余。因而,如何消除冗余的同时,尽可能保留后续智能任务的精度,是目前亟待解决的问题。
基于此,本公开提供一种面向机器视觉任务的视频编解码方法、装置、设备及介质,至少在一定程度上克服传统视频编码方案存在数据传输量较大的技术问题。
图2示出本公开实施例中一种面向机器视觉任务的视频编解码系统架构示意图,如图2所示,本公开实施例中,将图像预处理操作前移到编码端进行,能够在对待编码视频图像进行编码之前,获取待编码视频图像待执行的视觉任务信息,能够根据待编码视频图像待执行的视觉任务信息,确定是否需要对待编码图像执行编码前图像预处理操作,对于需要执行编码前图像预处理操作的视频图像,先执行图像预处理后再进行编码压缩,使得解码端解码得到的视频图像为执行图像预处理操作后的视频图像,进行相应的视觉任务即可。通过这种方式,不仅能够避免冗余处理的问题,而且能够提高压缩比。由图2可以看出,对于人眼视觉需求和不满足编码前图像预处理条件的 视频图像,采用的视频编解码方案与传统视频编码方案一致;对于机器视觉需求且满足编码前图像预处理条件的视频图像,先进行编码前图像预处理操作,再进入视频图像编码器,形成二进制码流;解码端对二进制码流解码后直接送入机器视觉任务模型。对于人眼视觉需求,可直接采用解码后的视频图像,也可进一步进行图像后处理/图像增强操作后进入人眼视觉任务模型。
为消除原始信源与下游智能任务网络输入层之间的冗余,尽可能保留后续机器视觉任务的精度,本公开实施例中提供了一种面向机器视觉任务的视频编码方法,该方法可以由任意具备计算处理能力的电子设备执行。包括但不限于智能手机、平板电脑、膝上型便携计算机、台式计算机、可穿戴设备、增强现实设备、虚拟现实设备等。在一些实施例中,这些电子设备中安装的应用程序的客户端是相同的,或基于不同操作系统的同一类型应用程序的客户端。基于终端平台的不同,该应用程序的客户端的具体形态也可以不同,比如,该应用程序客户端可以是手机客户端、PC客户端等。
本公开的实施例所提供的面向机器视觉任务的视频编解码方法、装置、设备及介质,在编码端对视频图像进行编码之前,先获取视频图像的视觉任务信息,以便根据视频图像的视觉任务信息判断视频图像是否需要进行图像预处理,对于需要进行图像预处理的视频图像,在编码端对视频图像预处理,能够使得解码端解码后的视频图像是经过图像预处理的,可直接进行相应的视觉任务处理,从而降低信源与下游视觉任务网络输入层之间因图像尺寸大小之差带来的冗余,并在降低冗余的同时,保留后续机器视觉任务的精度。
图3示出本公开实施例中一种面向机器视觉任务的视频编码方法流程图,如图3所示,本公开实施例中提供的面向机器视觉任务的视频编码方法包括如下步骤:
S302,获取待编码视频图像对应的视觉任务信息。
需要说明的是,上述S302中获取的视觉任务信息包括但不限于:待编码视频图像待执行的视觉任务的任务类型、执行相应任务类型视觉任务所需执行的图像预处理操作。当本公开实施例中的视频图像是通过摄像机拍摄的情况下,视觉任务的任务类型可由摄像机的用户模式User确定,当用户模式User为M时,表明当前待执行的视觉任务是机器视觉任务;当用户模式User为P时,表明当前待执行的视觉任务是人眼视觉任务。对采集的视频图像,在编码之前可先进行用户模式判断:
1)对于人眼视觉需求,与传统视频编码技术一致。
2)对于机器视觉需求,且满足编码前图像预处理条件的视频图像,先进行图像 预处理操作形成视频图像V1再进入视频编码器,形成二进制码流,解码端采用对应的视频解码器进行解码生成解码视频图像V1’。视频图像V1’直接进行机器视觉任务,对于人眼视觉需求,可直接采用视频图像V1’,也可进行图像后处理/图像增强操作后进入人眼视觉。
3)对于机器视觉需求,且不满足编码前图像预处理条件的视频图像,与传统视频编码技术一致。
在一些实施例中,上述S302在获取待编码视频图像对应的视觉任务信息的时候,可以在采集视频图像之前,向图像解码端请求待编码视频图像对应的视觉任务信息。通过这种方式,能够实现一次获取多次使用的目的,比较适用于机器视觉任务和人眼视觉任务按一定规律执行的场景。
在另外一些实施例中,上述S302在获取待编码视频图像对应的视觉任务信息的时候,还可以在采集视频图像的过程中,向图像解码端请求待编码视频图像对应的视觉任务信息。通过这种方式能够满足实时任务处理,尤其适用于机器视觉任务和人眼视觉任务交叉执行的场景。
S304,根据待编码视频图像对应的视觉任务信息,判断待编码视频图像是否满足编码前图像预处理条件。
需要说明的是,在获取到待编码视频图像的视觉任务信息后,可以根据待编码视频图像对应的视觉任务信息,判断待编码视频图像是否需要执行图像预处理操作,也即是否满足编码前图像预处理条件。
对于人眼视觉任务,大多数情况下不需要执行图像预处理,因而,若待编码视频图像待执行的视觉任务为人眼视觉任务,则表明待编码视频图像无需执行图像预处理操作,因而判断结果为待编码视频图像不满足编码前图像预处理条件。
对于机器视觉任务,往往要求输入固定尺寸信息的图像,在将图像输入到机器视觉任务模型之前,需要进行图像预处理(包括但不限于:图像高度和/或宽度的调整),而图像编码过程往往也会涉及到图像大小的调整,因而,在根据机器视觉任务信息判断待编码视频图像是否满足编码前图像处理条件的时候,可以根据机器视觉任务所需的视频图像尺寸信息以及编码前视频图像的尺寸信息,确定待编码视频图像是否满足编码前图像预处理条件。
在一种场景下,假设某一视频图像的原始尺寸信息为第一尺寸信息,对应视觉任务所要求的图像尺寸信息为第二尺寸信息(第二尺寸信息小于第一尺寸信息),按照 现有的视频编解码方案,由编码端对第一尺寸信息的视频图像进行压缩编码,由解码端解码后,得到的仍然是第一尺寸信息的视频图像,需要在解码端执行图像预处理(第一尺寸缩小到第二尺寸)后送入机器视觉任务模型。而按照本公开实施例中提供的视频编解码方案,在编码端知道机器视觉任务所需的尺寸信息是第二尺寸信息,直接在编码端对视频图像进行图像预处理(第一尺寸缩小到第二尺寸),则只需要对第二尺寸信息的视频图像进行编码和解码即可。
在另一种场景下,假设某一视频图像的原始尺寸信息为第三尺寸信息,对应视觉任务所要求的图像尺寸信息为第四尺寸信息(第四尺寸信息大于第一尺寸信息),可以看出,机器视觉任务要求的图像预处理操作是要放大图像尺寸(第三尺寸放大到第四尺寸),此时,按照本公开实施例中提供的视频编解码方案,认为待编码视频图像是不满足编码前图像预处理条件的,也即无需在编码端对视频图像进行图像预处理。
S306,若待编码视频图像满足编码前图像预处理条件,则对待编码视频图像执行预处理操作,并对执行预处理操作后的视频图像进行编码。
需要说明的是,在上述步骤中,对于满足图像处理条件的待编码视频图像,表明需要执行图像预处理操作,因而,需要先对视频图像执行图像预处理操作后,再送入编码器进行编码。本公开实施例中的图像预处理操作包括但不限于:对视频图像的尺寸信息进行调整,使得调整后的视频图像满足机器视觉任务模型所需的尺寸信息。
在一些实施例中,对于满足编码前图像预处理条件的待编码视频图像,本公开实施例中提供的面向机器视觉任务的视频编码方法还包括如下步骤:生成待编码视频图像的预处理标识,其中,预处理标识用于标识待编码视频图像是否已执行预处理操作。
进一步地,在一些实施例中,在生成待编码视频图像的预处理标识之后,本公开实施例中提供的面向机器视觉任务的视频编码方法还包括如下步骤:根据待编码视频图像的编码结果、预处理标识和视觉任务信息生成二进制码流,发送到图像解码端,其中,图像解码端用于对接收到的二进制码流进行解码,并根据解码结果中的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
该实施例中,将视觉任务信息和编码后的视频图像一起发送给图像解码端,使得图像解码端可以根据解码结果中的视觉任务信息,确定解码后的视频图像待执行的机器视觉任务,进而调用相应的视觉任务模型对解码后的视频图像进行处理。
进一步地,将预处理标识和编码后的视频图像一起发送给图像解码端,使得图像 解码端可以根据解码结果中的预处理标识,判断解码后的视频图像是否已经执行过图像预处理操作,以便将已经执行过图像预处理操作的视频图像直接送入机器视觉模型进行处理。
S308,若待编码视频图像不满足编码前图像预处理条件,则直接对待编码视频图像进行编码。
在上述步骤中,对于不满足图像处理条件的待编码视频图像,表明无需执行图像预处理操作,因而,可直接送入编码器进行编码。
由上可知,本公开的实施例所提供的面向机器视觉任务的视频编码方法,将图像预处理操作前移到编码端,能够降低信源与下游视觉任务网络输入层之间因图像尺寸大小之差带来的冗余,并在降低冗余的同时,保留后续机器视觉任务的精度。
基于同一发明构思,本公开实施例中还提供了一种面向机器视觉任务的视频解码方法,该方法可以由任意具备计算处理能力的电子设备执行。
图4示出本公开实施例中一种面向机器视觉任务的视频解码方法流程图,如图4所示,本公开实施例中提供的面向机器视觉任务的视频解码方法包括如下步骤:
S402,接收来自图像编码端的二进制码流,其中,二进制码流为图像编码端根据待编码视频图像的编码结果、预处理标识和视觉任务信息生成的,预处理标识用于标识待编码视频图像是否已执行预处理操作;
S404,对来自图像编码端的二进制码流进行解码,得到解码后的视频图像、预处理标识和视觉任务信息;
S406,根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
需要说明的是,本公开实施例中的图像编码端和图像解码端可以部署于同一台设备,也可以部署于不同的设备。其中,图像编码端从图像解码端获取视频图像的视觉任务信息,根据视频图像的视觉任务信息,确定是否对视频图像执行图像预处理操作,对于需要执行图像预处理操作的编码视频图像,对视频图像执行预处理操作后进行编码;对于无需执行图像预处理操作的编码视频图像,直接对视频图像进行编码;最后将编码后的视频图像、预处理标识和视觉任务信息一起以二进制码流的形式传输到图像解码端,使得图像解码端对接收到的二进制码流进行解码,得到解码后的视频图像、预处理标识和视觉任务信息,进而根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
在一些实施例中,根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务包括:根据解码得到的视觉任务信息,判断待执行视觉任务是否为人眼视觉任务;若待执行视觉任务为人眼视觉任务,则将解码后的视频图像直接输入到人眼视觉任务模型中;若待执行视觉任务为机器视觉任务,则根据解码得到的预处理标识,判断解码后的视频图像是否已执行预处理操作;若解码后的视频图像已执行预处理操作,则直接根据解码得到的视觉任务信息,将解码后的视频图像输入到相应的机器视觉任务模型中;若解码后的视频图像未执行预处理操作,则根据解码得到的视觉任务信息,对解码后的视频图像执行预处理操作,并将执行预处理操作后的视频图像输入到相应的机器视觉任务模型中。
由上可知,本公开的实施例所提供的面向机器视觉任务的视频解码方法,将图像预处理操作前移到编码端,能够降低信源与下游视觉任务网络输入层之间因图像尺寸大小之差带来的冗余,并在降低冗余的同时,保留后续机器视觉任务的精度。
图5示出本公开实施例中一种面向机器视觉任务的视频编码方法的具体实现流程图,如图5所示,具体包括如下步骤:
编码端在正式开始图像采集前,向解码端请求用户模式User、图像预处理模式Mode配置;也可图像采集开始后,在线向解码端请求模式User、图像预处理模式Mode配置。
S502,对于采集的高度为h宽度为w的视频图像x,进行用户模式User判断:若用户模式为人眼视觉模式P,则设置预处理标志flag=0,进入S506;若用户模式为机器视觉模式M,则进入S504。
S504,对图像进行预处理判断,若满足预处理条件,则设置预处理标志flag=1,执行图像预处理操作,进入S506;若不满足预处理条件,则设置预处理标志flag=0,进入S506。
在一些实施例中,图像预处理判断可有多种方法,可以包括但不限于如下方式:
方式1:判断图像高度h是否大于图像预处理后的高度H;
方式2:判断图像宽度w是否大于图像预处理后的宽度W;
方式3:判断图像高度h与图像宽度w的乘积(h×w),是否大于图像预处理后高度W与图像预处理后宽度W的乘积(H×W);
在一些实施例中,图像预处理操作也可以有多种方法,例如ResNet推理图像预处理方法、MobileNet推理图像预处理方法等。
S506,对进入编码器的图像进行编码,并将编码器输出的编码视频图像和(User,flag,h,w)形成二进制码流。
S508,解码端对接收到的二进制码流进行解码,形成解码视频图像x_hat和(User,flag,h,w)。
S510,对用户模式User进行判断:若用户模式为人眼视觉模式P,则直接进行人眼视觉处理,或经过图像后处理/图像增强等处理后进入人眼视觉模型;若用户模式为机器视觉模型M,则进入S512。
S512,对预处理标志flag进行判断,若预处理标志为1,则直接进入机器视觉模型处理,其中h和w用于获取目标位置信息时在原图中的定位;若预处理标志为0,则对解码视频图像x_hat先进行图像预处理操作,再进入机器视觉模型处理。
接下来,列举一个实际的例子:
以采集的传统2k分辨率视频图像用于目标检测任务为例,目标检测网络模型为Faster R-CNN X101FPN,具体实施如下:
编码端在正式开始图像采集前,向解码端请求用户模式User、图像预处理模式Mode配置,并设置用户模式User为M,图像预处理模式Mode为ResNetX101。
1)对于采集的传统2k分辨率视频图像x,进行模式User判断,模式User为机器视觉模式M,进入步骤2);
2)对视频图像x进行预处理判断:图像高度h为1920,图像宽度为1080,ResNetX101图像预处理后图像高度H为1333,图像宽度W为750,图像高度h与图像宽度w的乘积大于图像预处理后高度W与图像预处理后宽度W的乘积,预处理标志flag=1,进入编码器前的图像数据减少为原来的48.2%;
3)对进入编码器的图像1333x750进行编码,在此采用VTM8.2进行编码,也可以采用端到端神经网络的编码方式,并将编码器输出和(M,1,1920,1080)形成二进制码流;
4)解码端对接收到的二进制码流进行解码,形成解码视频图像x_hat、(M,1,1920,1080);
5)对模式User进行判断,机器视觉模型M下,进入步骤6);
6)预处理标志flag进行判断,预处理标志为1,直接进入机器视觉模型处理,其中h和w用于获取目标位置信息时在原图中的定位。
基于同一发明构思,本公开实施例中还提供了一种面向机器视觉任务的视频编码 装置,如下面的实施例所述。由于该装置实施例解决问题的原理与上述方法实施例相似,因此该装置实施例的实施可以参见上述方法实施例的实施,重复之处不再赘述。
图6示出本公开实施例中一种面向机器视觉任务的视频编码装置示意图,如图6所示,该装置包括:任务信息获取模块61、图像预处理模块62、第一图像编码模块63和第二图像编码模块64。
其中,任务信息获取模块61,用于获取待编码视频图像对应的视觉任务信息;图像预处理模块62,用于根据待编码视频图像对应的视觉任务信息,判断待编码视频图像是否满足编码前图像预处理条件;第一图像编码模块63,用于若待编码视频图像满足编码前图像预处理条件,则对待编码视频图像执行预处理操作,并对执行预处理操作后的视频图像进行编码;第二图像编码模块64,用于若待编码视频图像不满足编码前图像预处理条件,则直接对待编码视频图像进行编码。
此处需要说明的是,上述任务信息获取模块61、图像预处理模块62、第一图像编码模块63和第二图像编码模块64对应于方法实施例中的S302~S308,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述方法实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以在诸如一组计算机可执行指令的计算机系统中执行。
由上可知,本公开的实施例所提供的面向机器视觉任务的视频编码装置,将图像预处理操作前移到编码端,能够降低信源与下游视觉任务网络输入层之间因图像尺寸大小之差带来的冗余,并在降低冗余的同时,保留后续机器视觉任务的精度。
在一些实施例中,获取待编码视频图像对应的视觉任务信息包括如下至少之一:在采集视频图像之前,向图像解码端请求待编码视频图像对应的视觉任务信息;在采集视频图像的过程中,向图像解码端请求待编码视频图像对应的视觉任务信息。
在一些实施例中,方法还包括:生成待编码视频图像的预处理标识,其中,预处理标识用于标识待编码视频图像是否已执行预处理操作。
在一些实施例中,方法还包括:根据待编码视频图像的编码结果、预处理标识和视觉任务信息生成二进制码流,发送到图像解码端,其中,图像解码端用于对接收到的二进制码流进行解码,并根据解码结果中的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
在一些实施例中,图像预处理操作包括:对视频图像的尺寸信息进行调整,使得调整后的视频图像满足机器视觉任务模型所需的尺寸信息。
基于同一发明构思,本公开实施例中还提供了一种面向机器视觉任务的视频解码装置,如下面的实施例所述。由于该装置实施例解决问题的原理与上述方法实施例相似,因此该装置实施例的实施可以参见上述方法实施例的实施,重复之处不再赘述。
图7示出本公开实施例中一种面向机器视觉任务的视频解码装置示意图,如图7所示,该装置包括:数据接收模块71、图像解码模块72和任务执行模块73。
其中,数据接收模块71,用于接收来自图像编码端的二进制码流,其中,二进制码流为图像编码端根据待编码视频图像的编码结果、预处理标识和视觉任务信息生成的,预处理标识用于标识待编码视频图像是否已执行预处理操作;图像解码模块72,用于对接收到的二进制码流进行解码,得到解码后的视频图像、预处理标识和视觉任务信息;任务执行模块73,用于根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
此处需要说明的是,上述数据接收模块71、图像解码模块72和任务执行模块73对应于方法实施例中的S402~S406,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述方法实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以在诸如一组计算机可执行指令的计算机系统中执行。
由上可知,本公开的实施例所提供的面向机器视觉任务的视频解码装置,将图像预处理操作前移到编码端,能够降低信源与下游视觉任务网络输入层之间因图像尺寸大小之差带来的冗余,并在降低冗余的同时,保留后续机器视觉任务的精度。
在一些实施例中,根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务包括:根据解码得到的视觉任务信息,判断待执行视觉任务是否为人眼视觉任务;若待执行视觉任务为人眼视觉任务,则将解码后的视频图像直接输入到人眼视觉任务模型中;若待执行视觉任务为机器视觉任务,则根据解码得到的预处理标识,判断解码后的视频图像是否已执行预处理操作;若解码后的视频图像已执行预处理操作,则直接根据解码得到的视觉任务信息,将解码后的视频图像输入到相应的机器视觉任务模型中;若解码后的视频图像未执行预处理操作,则根据解码得到的视觉任务信息,对解码后的视频图像执行预处理操作,并将执行预处理操作后的视频图像输入到相应的机器视觉任务模型中。
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的 实施方式,这里可以统称为“电路”、“模块”或“系统”。
下面参照图8来描述根据本公开的这种实施方式的电子设备800。图8显示的电子设备800仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图8所示,电子设备800以通用计算设备的形式表现。电子设备800的组件可以包括但不限于:上述至少一个处理单元810、上述至少一个存储单元820、连接不同系统组件(包括存储单元820和处理单元810)的总线830。
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元810执行,使得所述处理单元810执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。例如,所述处理单元810可以执行上述方法实施例的如下步骤:获取待编码视频图像对应的视觉任务信息;根据待编码视频图像对应的视觉任务信息,判断待编码视频图像是否满足编码前图像预处理条件;若待编码视频图像满足编码前图像预处理条件,则对待编码视频图像执行预处理操作,并对执行预处理操作后的视频图像进行编码;若待编码视频图像不满足编码前图像预处理条件,则直接对待编码视频图像进行编码。
存储单元820可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)8201和/或高速缓存存储单元8202,还可以进一步包括只读存储单元(ROM)8203。
存储单元820还可以包括具有一组(至少一个)程序模块8205的程序/实用工具8204,这样的程序模块8205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线830可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备800也可以与一个或多个外部设备840(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备800交互的设备通信,和/或与使得该电子设备800能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口850进行。并且,电子设备800还可以通过网络适配器860与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网 络适配器860通过总线830与电子设备800的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备800使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质可以是可读信号介质或者可读存储介质。其上存储有能够实现本公开上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。
本公开中的计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
在本公开中,计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
在一些实施例中,计算机可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
在具体实施时,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、 C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
此外,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。
通过以上实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本公开实施方式的方法。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由所附的权利要求指出。
Claims (16)
- 一种面向机器视觉任务的视频编码方法,包括:获取待编码视频图像对应的视觉任务信息;根据所述待编码视频图像对应的视觉任务信息,判断所述待编码视频图像是否满足编码前图像预处理条件;若所述待编码视频图像满足编码前图像预处理条件,则对待编码视频图像执行预处理操作,并对执行预处理操作后的视频图像进行编码;若所述待编码视频图像不满足编码前图像预处理条件,则直接对所述待编码视频图像进行编码。
- 根据权利要求1所述的面向机器视觉任务的视频编码方法,其中,所述获取待编码视频图像对应的视觉任务信息包括如下至少之一:在采集视频图像之前,向图像解码端请求所述待编码视频图像对应的视觉任务信息;在采集视频图像的过程中,向图像解码端请求所述待编码视频图像对应的视觉任务信息。
- 根据权利要求1所述的面向机器视觉任务的视频编码方法,还包括:生成所述待编码视频图像的预处理标识,其中,所述预处理标识用于标识所述待编码视频图像是否已执行预处理操作。
- 根据权利要求3所述的面向机器视觉任务的视频编码方法,还包括:根据所述待编码视频图像的编码结果、预处理标识和视觉任务信息生成二进制码流,发送到图像解码端,其中,所述图像解码端用于对接收到的二进制码流进行解码,并根据解码结果中的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
- 根据权利要求1至4任一项所述的面向机器视觉任务的视频编码方法,其中,所述预处理操作包括:对视频图像的尺寸信息进行调整,使得调整后的视频图像满足机器视觉任务模型所需的尺寸信息。
- 根据权利要求1至4任一项所述的面向机器视觉任务的视频编码方法,其中,视觉任务信息包括待编码视频图像待执行的视觉任务的任务类型、执行相应任务类型视觉任务所需执行的图像预处理操作。
- 根据权利要求1至4任一项所述的面向机器视觉任务的视频编码方法,其中,在视频图像是通过摄像机拍摄的情况下,视觉任务的任务类型由摄像机的用户模式确定,其中,在用户模式为机器视觉模式M的情况下,待执行的视觉任务是机器视觉任务,在用户模式为人眼视觉模式P的情况下,待执行的视觉任务是人眼视觉任务。
- 一种面向机器视觉任务的视频解码方法,包括:接收来自图像编码端的二进制码流,其中,所述二进制码流为图像编码端根据待编码视频图像的编码结果、预处理标识和视觉任务信息生成的,所述预处理标识用于标识所述待编码视频图像是否已执行预处理操作;对来自图像编码端的二进制码流进行解码,得到解码后的视频图像、预处理标识和视觉任务信息;根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
- 根据权利要求8所述的面向机器视觉任务的视频解码方法,其中,所述根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务包括:根据解码得到的视觉任务信息,判断待执行视觉任务是否为人眼视觉任务;若待执行视觉任务为人眼视觉任务,则将解码后的视频图像直接输入到人眼视觉任务模型中;若待执行视觉任务为机器视觉任务,则根据解码得到的预处理标识,判断解码后的视频图像是否已执行预处理操作;若解码后的视频图像已执行预处理操作,则直接根据解码得到的视觉任务信息,将解码后的视频图像输入到相应的机器视觉任务模型中;若解码后的视频图像未执行预处理操作,则根据解码得到的视觉任务信息,对解码后的视频图像执行预处理操作,并将执行预处理操作后的视频图像输入到相应的机器视觉任务模型中。
- 根据权利要求8所述的面向机器视觉任务的视频解码方法,其中,视觉任务信息包括待编码视频图像待执行的视觉任务的任务类型、执行相应任务类型视觉任务所需执行的图像预处理操作。
- 根据权利要求8所述的面向机器视觉任务的视频解码方法,其中,在视频图像是通过摄像机拍摄的情况下,视觉任务的任务类型由摄像机的用户模式确定,其中, 在用户模式为机器视觉模式M的情况下,待执行的视觉任务是机器视觉任务,在用户模式为人眼视觉模式P的情况下,待执行的视觉任务是人眼视觉任务。
- 一种面向机器视觉任务的视频编码装置,包括:任务信息获取模块,用于获取待编码视频图像对应的视觉任务信息;图像预处理模块,用于根据所述待编码视频图像对应的视觉任务信息,判断所述待编码视频图像是否满足编码前图像预处理条件;第一图像编码模块,用于若所述待编码视频图像满足编码前图像预处理条件,则对待编码视频图像执行预处理操作,并对执行预处理操作后的视频图像进行编码;第二图像编码模块,用于若所述待编码视频图像不满足编码前图像预处理条件,则直接对所述待编码视频图像进行编码。
- 一种面向机器视觉任务的视频解码装置,包括:数据接收模块,用于接收来自图像编码端的二进制码流,其中,所述二进制码流为图像编码端根据待编码视频图像的编码结果、预处理标识和视觉任务信息生成的,所述预处理标识用于标识所述待编码视频图像是否已执行预处理操作;图像解码模块,用于对接收到的二进制码流进行解码,得到解码后的视频图像、预处理标识和视觉任务信息;任务执行模块,用于根据解码得到的预处理标识和视觉任务信息,对解码后的视频图像执行相应的视觉任务。
- 一种电子设备,包括:处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1~5中任意一项所述的面向机器视觉任务的视频编码方法,或权利要求6或7所述的面向机器视觉任务的视频解码方法。
- 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1~5中任意一项所述的面向机器视觉任务的视频编码方法,或权利要求6或7所述的面向机器视觉任务的视频解码方法。
- 一种计算机程序,包括:指令,所述指令当由处理器执行时使所述处理器执行根据权利要求1~5中任意一项所述的面向机器视觉任务的视频编码方法,或权利要求6或7所述的面向机器视 觉任务的视频解码方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111624129.6 | 2021-12-28 | ||
CN202111624129.6A CN116366852A (zh) | 2021-12-28 | 2021-12-28 | 面向机器视觉任务的视频编解码方法、装置、设备及介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023124461A1 true WO2023124461A1 (zh) | 2023-07-06 |
Family
ID=86940368
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/127208 WO2023124461A1 (zh) | 2021-12-28 | 2022-10-25 | 面向机器视觉任务的视频编解码方法、装置、设备及介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116366852A (zh) |
WO (1) | WO2023124461A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116847091B (zh) * | 2023-07-18 | 2024-04-26 | 华院计算技术(上海)股份有限公司 | 图像编码方法、系统、设备及介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112383778A (zh) * | 2020-11-12 | 2021-02-19 | 三星电子(中国)研发中心 | 一种视频编码方法、装置及解码方法、装置 |
CN112842690A (zh) * | 2015-04-20 | 2021-05-28 | 康奈尔大学 | 具有维度数据缩减的机器视觉 |
CN113132727A (zh) * | 2019-12-30 | 2021-07-16 | 北京大学 | 一种基于图像生成的可伸缩机器视觉编码方法 |
CN113569068A (zh) * | 2021-01-19 | 2021-10-29 | 腾讯科技(深圳)有限公司 | 描述内容生成方法、视觉内容的编码、解码方法、装置 |
WO2021251886A1 (en) * | 2020-06-09 | 2021-12-16 | Telefonaktiebolaget Lm Ericsson (Publ) | Providing semantic information with encoded image data |
-
2021
- 2021-12-28 CN CN202111624129.6A patent/CN116366852A/zh active Pending
-
2022
- 2022-10-25 WO PCT/CN2022/127208 patent/WO2023124461A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112842690A (zh) * | 2015-04-20 | 2021-05-28 | 康奈尔大学 | 具有维度数据缩减的机器视觉 |
CN113132727A (zh) * | 2019-12-30 | 2021-07-16 | 北京大学 | 一种基于图像生成的可伸缩机器视觉编码方法 |
WO2021251886A1 (en) * | 2020-06-09 | 2021-12-16 | Telefonaktiebolaget Lm Ericsson (Publ) | Providing semantic information with encoded image data |
CN112383778A (zh) * | 2020-11-12 | 2021-02-19 | 三星电子(中国)研发中心 | 一种视频编码方法、装置及解码方法、装置 |
CN113569068A (zh) * | 2021-01-19 | 2021-10-29 | 腾讯科技(深圳)有限公司 | 描述内容生成方法、视觉内容的编码、解码方法、装置 |
Also Published As
Publication number | Publication date |
---|---|
CN116366852A (zh) | 2023-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112543347B (zh) | 基于机器视觉编解码的视频超分辨率方法、装置、系统和介质 | |
WO2021036795A1 (zh) | 视频超分辨率处理方法及装置 | |
CN110798690A (zh) | 视频解码方法、环路滤波模型的训练方法、装置和设备 | |
CN112887728A (zh) | 电子装置、电子装置的控制方法以及系统 | |
US20220261961A1 (en) | Method and device, electronic equipment, and storage medium | |
CN113313776B (zh) | 图像处理方法、图像处理装置、存储介质与电子设备 | |
WO2023005740A1 (zh) | 图像编码、解码、重建、分析方法、系统及电子设备 | |
WO2023124461A1 (zh) | 面向机器视觉任务的视频编解码方法、装置、设备及介质 | |
CN112580481A (zh) | 基于边缘节点和云端协同视频处理方法、装置、服务器 | |
Safin et al. | Hardware and software video encoding comparison | |
JP7166382B2 (ja) | 画像処理の方法、装置、機器及び記憶媒体 | |
US20220335560A1 (en) | Watermark-Based Image Reconstruction | |
CN112261417B (zh) | 视频推送方法及系统、设备及可读存储介质 | |
WO2022100140A1 (zh) | 一种压缩编码、解压缩方法以及装置 | |
JP2023105812A (ja) | ビデオ変換方法、装置、電子機器および記憶媒体 | |
US11928855B2 (en) | Method, device, and computer program product for video processing | |
CN113613024A (zh) | 视频预处理方法及设备 | |
CN116546220A (zh) | 面向人机混合的视频编码与解码方法、系统、设备及介质 | |
WO2022155818A1 (zh) | 图像编码、解码方法及装置、编解码器 | |
CN117237259B (zh) | 基于多模态融合的压缩视频质量增强方法及装置 | |
CN116546214A (zh) | 面向人机混合的视频编码方法、装置、系统、设备及介质 | |
WO2024041482A1 (zh) | 一种图像处理方法、装置及系统 | |
ZHANG et al. | Recent Advances in Video Coding for Machines Standard and Technologies | |
CN117097913A (zh) | 视频编码方法、装置、设备及存储介质 | |
CN117764834A (zh) | 一种图像复原方法、装置和电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22913724 Country of ref document: EP Kind code of ref document: A1 |