Image bit width conversion method, neural network training method, device and medium
By performing information statistics on images and using neural networks to generate bit-width conversion reference information, the problem of converting high-bit-width images into low-bit-width images was solved, realizing the visual perception task in autonomous driving and improving the safety and reliability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN HORIZON ROBOTICS TECH CO LTD
- Filing Date
- 2023-09-06
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, effectively converting high-bit-width images captured by cameras into low-bit-width images for use in visual perception tasks in autonomous driving is a challenge.
By performing information statistics on the image to be converted, bit-width conversion reference information is generated, and bit-width conversion is performed using the target neural network to generate a low-bit-width image for visual perception tasks.
It achieves efficient and reliable image bit-width conversion, ensuring the safety and reliability of autonomous driving, and is capable of performing visual perception tasks such as semantic segmentation, object detection, and object tracking.
Smart Images

Figure CN117079102B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to machine vision technology, and in particular to an image bit-width conversion method, a neural network training method, apparatus, and medium. Background Technology
[0002] Autonomous driving technology is being used more and more widely in vehicles and other mobile devices. When using autonomous driving technology, visual perception tasks can be performed based on images captured by front-end cameras.
[0003] It should be noted that images captured by cameras have a high bit width. Generally, these images need to be converted to a lower bit width before being used for visual perception tasks. Therefore, how to effectively implement image bit width conversion is a problem worthy of attention for those skilled in the art. Summary of the Invention
[0004] To address the aforementioned technical problems, this disclosure provides an image bit-width conversion method, a neural network training method, an apparatus, and a medium to effectively achieve image bit-width conversion.
[0005] According to one aspect of this disclosure, an image bit-width conversion method is provided, comprising:
[0006] Information statistics are performed on the first image to be bit-width converted to obtain statistical information of the first image in a predetermined feature dimension;
[0007] Based on the statistical information of the first image in a predetermined feature dimension, bit-width conversion reference information is generated via the target neural network;
[0008] Based on the bit-width conversion reference information, the first image is bit-width converted to obtain the second image.
[0009] According to another aspect of this disclosure, a training method for a neural network to assist in image bit-width conversion is provided, comprising:
[0010] Information statistics are performed on the first training image to be bit-width converted to obtain statistical information of the first training image in a predetermined feature dimension;
[0011] Based on the statistical information of the first training image in a predetermined feature dimension, training bit-width conversion reference information is generated via the neural network to be trained.
[0012] Based on the training bit-width conversion reference information, the first training image is bit-width converted to obtain the second training image;
[0013] Based on the first training image, a predetermined visual perception task is performed via a visual perception network to obtain the first task execution result;
[0014] Based on the second training image, the predetermined visual perception task is performed via the visual perception network to obtain the second task execution result;
[0015] The network loss value of the neural network to be trained is determined by comparing the execution results of the first task and the execution results of the second task.
[0016] The neural network to be trained is trained using the network loss value;
[0017] In response to the trained neural network meeting the preset training termination condition, the trained neural network is determined as the target neural network.
[0018] According to another aspect of this disclosure, an image bit-width conversion apparatus is provided, comprising:
[0019] The first statistics module is used to perform information statistics on the first image to be converted to bit width, and obtain statistical information of the first image in a predetermined feature dimension.
[0020] The first generation module is used to generate bit-width conversion reference information based on the statistical information of the first image in a predetermined feature dimension obtained by the first statistical module, via a target neural network.
[0021] The first bit-width conversion module is used to perform bit-width conversion on the first image based on the bit-width conversion reference information generated by the first generation module to obtain the second image.
[0022] According to another aspect of this disclosure, a training apparatus for assisting in the implementation of image bit-width conversion is provided, comprising:
[0023] The second statistical module is used to perform information statistics on the first training image to be converted to bit width, and obtain statistical information of the first training image in a predetermined feature dimension.
[0024] The second generation module is used to generate training bit-width conversion reference information based on the statistical information of the first training image in a predetermined feature dimension obtained by the second statistical module, via the neural network to be trained.
[0025] The second bit-width conversion module is used to perform bit-width conversion on the first training image based on the training bit-width conversion reference information generated by the second generation module to obtain the second training image.
[0026] The first execution module is used to perform a predetermined visual perception task based on the first training image via a visual perception network to obtain a first task execution result.
[0027] The second execution module is used to execute the predetermined visual perception task based on the second training image obtained by the second bit-width conversion module via the visual perception network, and obtain the second task execution result;
[0028] The first determining module is used to determine the network loss value of the neural network to be trained by comparing the first task execution result obtained by the first execution module and the second task execution result obtained by the second execution module.
[0029] The training module is used to train the neural network to be trained using the network loss value determined by the first determining module.
[0030] The second determining module is used to determine the neural network to be trained as the target neural network in response to the training module meeting the preset training termination condition.
[0031] According to another aspect of the present disclosure, a computer-readable storage medium is provided, the storage medium storing a computer program for executing the above-described image bit-width conversion method, or executing the above-described training method for a neural network used to assist in implementing image bit-width conversion.
[0032] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising:
[0033] processor;
[0034] Memory used to store the processor's executable instructions;
[0035] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the above-described image bit-width conversion method, or to implement the above-described training method for a neural network used to assist in the implementation of image bit-width conversion.
[0036] According to another aspect of the present disclosure, a computer program product is provided that, when instructions in the computer program product are executed by a processor, performs the above-described image bit-width conversion method or the above-described training method for a neural network used to assist in implementing image bit-width conversion.
[0037] Based on the image bit-width conversion method, neural network training method, apparatus, medium, electronic device, and product provided in the above embodiments of this disclosure, if there is a need to convert the bit-width of a first image, information statistics can be performed on the first image from a predetermined feature dimension, and the obtained statistical information can be provided to a target neural network. The target neural network can then generate bit-width conversion reference information. Guided by the bit-width conversion reference information, the bit-width conversion of the first image can be achieved to obtain the desired second image. For the second image, semantic segmentation, target detection, target tracking, target trajectory prediction, and other processing can be performed. In this way, through the application of statistical methods and a target neural network, image bit-width conversion can be achieved efficiently and reliably, enabling the use of low-bit-width images for various visual perception tasks, thus ensuring the safety and reliability of autonomous driving. Attached Figure Description
[0038] Figure 1 This is a schematic diagram illustrating two stages involved in an embodiment of this disclosure.
[0039] Figure 2 This is a schematic flowchart of an image bit-width conversion method provided in an exemplary embodiment of this disclosure.
[0040] Figure 3 This is a flowchart illustrating a method for performing bit-width conversion on a first image based on bit-width conversion reference information in an exemplary embodiment of this disclosure.
[0041] Figure 4 This is a flowchart illustrating a method for performing bit-width conversion on the pixel value of the first pixel according to a bit-width conversion rule that matches the bit-width conversion reference value corresponding to the target segmented image in an exemplary embodiment of this disclosure.
[0042] Figure 5 This is a schematic diagram of 24-bit data used to represent the pixel value of a first pixel in an exemplary embodiment of this disclosure.
[0043] Figure 6 This is a flowchart illustrating a method for performing information statistics on a first image in an exemplary embodiment of this disclosure.
[0044] Figure 7 This is a flowchart illustrating a method for performing information statistics on a first image in another exemplary embodiment of this disclosure.
[0045] Figure 8-1 This is a schematic diagram of the first image in an exemplary embodiment of this disclosure.
[0046] Figure 8-2 This is a schematic diagram of a multi-channel image in an exemplary embodiment of this disclosure.
[0047] Figure 8-3This is a schematic diagram of the first image in another exemplary embodiment of this disclosure.
[0048] Figure 8-4 This is a schematic diagram of a multi-channel image in another exemplary embodiment of this disclosure.
[0049] Figure 9 This is a flowchart illustrating a training method for a neural network used to assist in image bit-width conversion, provided by an exemplary embodiment of this disclosure.
[0050] Figure 10 This is a schematic diagram illustrating the implementation of image bit-width conversion in an exemplary embodiment of this disclosure.
[0051] Figure 11 This is a schematic diagram of the structure of an image bit-width conversion device provided in an exemplary embodiment of the present disclosure.
[0052] Figure 12 This is a schematic diagram of the structure of the first wide conversion module in an exemplary embodiment of this disclosure.
[0053] Figure 13 This is a schematic diagram of the structure of a bit-width conversion submodule in an exemplary embodiment of this disclosure.
[0054] Figure 14 This is a schematic diagram of the structure of the first statistics module in an exemplary embodiment of this disclosure.
[0055] Figure 15 This is a schematic diagram of the structure of the first statistics module in another exemplary embodiment of this disclosure.
[0056] Figure 16 This is a schematic diagram of the structure of a training apparatus for assisting in the implementation of image bit-width conversion, provided by an exemplary embodiment of the present disclosure.
[0057] Figure 17 This is a structural diagram of an electronic device provided in an exemplary embodiment of this disclosure. Detailed Implementation
[0058] To explain this disclosure, exemplary embodiments of the disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the disclosure, and not all of them. It should be understood that the disclosure is not limited to exemplary embodiments.
[0059] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0060] Application Overview
[0061] When using autonomous driving technology, visual perception tasks can be performed based on images captured by front-end cameras. The photosensitive device in the camera can be a complementary metal-oxide-semiconductor (CMOS) photosensitive device. The images captured by the camera can have a high dynamic range, thus the images captured by the camera will have a high bit width, for example, the bit width of the images captured by the camera may be 20 bits, 24 bits, etc.
[0062] Generally, after acquiring images from a camera, it is necessary to convert the high-bit-width images to low-bit-width images before using the converted low-bit-width images for visual perception tasks. Therefore, it is necessary to take certain measures to achieve image bit-width conversion.
[0063] Exemplary System
[0064] like Figure 1 As shown, the embodiments of this disclosure involve two stages: a training stage and an inference stage. In the training stage, a large amount of sample data can be used to train the neural network to assist in achieving image bit-width conversion, thereby obtaining the target neural network. In the inference stage, the bit-width conversion of the image can be achieved through the application of the target neural network.
[0065] Exemplary methods
[0066] Figure 2 This is a schematic flowchart of an image bit-width conversion method provided in an exemplary embodiment of this disclosure. Figure 2 The method shown can be executed during the inference phase. Figure 2 The method shown may include steps 210, 220 and 230, which are described below.
[0067] Step 210: Perform information statistics on the first image to be bit-width converted to obtain statistical information of the first image in a predetermined feature dimension.
[0068] Optionally, the first image may be an image directly captured by a camera set on a mobile device (such as a vehicle, ship, or airplane). In this case, the first image may also be called a Raw domain image. The format of the first image includes, but is not limited to, Bayer format, RGBIR format, etc.; where R represents red, G represents green, B represents blue, and IR represents infrared.
[0069] When the format of the first image is Bayer format, the first image includes, but is not limited to, RGGB image, BGGR image, GRBG image, GBRG image, etc.
[0070] When the format of the first image is RGBIR, the first image includes, but is not limited to, RGBIR images in a 2*2 array or RGBIR images in a 4*4 array.
[0071] Of course, the first image does not have to be an image directly captured by the camera, but rather an image obtained after certain processing of an image directly captured by the camera. As long as there is a bit width conversion requirement for the first image, it is acceptable.
[0072] It should be noted that the predetermined feature dimensions involved in the embodiments of this disclosure can be understood as the perspective used to evaluate the image, and the predetermined feature dimensions include, but are not limited to, brightness dimension, color dimension, etc.
[0073] In step 210, statistical methods can be used to perform information statistics on the first image from a predetermined feature dimension to obtain statistical information of the first image in the predetermined feature dimension. Optionally, the presentation form of the statistical information of the first image in the predetermined feature dimension includes, but is not limited to, chart form, numerical form, matrix form, etc.
[0074] Step 220: Based on the statistical information of the first image in a predetermined feature dimension, bit-width conversion reference information is generated via the target neural network.
[0075] The target neural network can be a neural network that has been trained during the training phase and is used to assist in the implementation of image bit-width conversion.
[0076] Optionally, the statistical information of the first image in the predetermined feature dimension can be presented in the same form as the information input form supported by the target neural network, such as both being in numerical form. In this case, the statistical information of the first image in the predetermined feature dimension can be directly provided as input to the target neural network, which can then perform calculations to generate bit-width conversion reference information.
[0077] Alternatively, the presentation format of the statistical information of the first image in the predetermined feature dimension may be different from the information input format supported by the target neural network. For example, one may be in numerical form and the other in matrix form. In this case, the statistical information of the first image in the predetermined feature dimension may be converted into the information input format supported by the target neural network first, and then the conversion result may be provided as input to the target neural network. The target neural network may then perform calculations based on this to generate bit-width conversion reference information.
[0078] It should be noted that the bit-width conversion reference information can be used to indicate how to perform bit-width conversion on the first image. For example, the bit-width conversion reference information can be used to indicate which compression method to use to process the first image to achieve bit-width conversion. Compression methods include, but are not limited to, local tone mapping and log compression. Of course, the bit-width conversion reference information is not limited to this; for clarity, examples will be provided later.
[0079] Step 230: Based on the bit-width conversion reference information, perform bit-width conversion on the first image to obtain the second image.
[0080] In step 230, the first image can be bit-width converted in a corresponding manner according to the instructions of the bit-width conversion reference information to obtain the second image. The size of the second image can be the same as the size of the first image. The bit width of the second image can be smaller than the bit width of the first image; for example, the bit width of the first image can be 24 bits, and the bit width of the second image can be 8 bits or 10 bits. The second image can be used for predetermined visual perception tasks, including but not limited to semantic segmentation tasks, object detection tasks, object tracking tasks, object trajectory prediction tasks, etc.
[0081] In the embodiments of this disclosure, if there is a need to perform bit-width conversion on the first image, information statistics can be performed on the first image from a predetermined feature dimension, and the obtained statistical information can be provided to the target neural network. The target neural network can then generate bit-width conversion reference information. Guided by the bit-width conversion reference information, the bit-width conversion of the first image can be achieved to obtain the desired second image. For the second image, semantic segmentation, object detection, object tracking, object trajectory prediction, and other processing can be performed. In this way, by using statistical methods and the target neural network, bit-width conversion of images can be achieved efficiently and reliably, enabling the use of low-bit-width images for various visual perception tasks, thus ensuring the safety and reliability of autonomous driving.
[0082] In some optional examples, such as Figure 3 As shown, step 230 includes steps 2301, 2303, 2305, 2307, and 2309.
[0083] Step 2301: According to preset rules, the first image is segmented to obtain multiple segmented images.
[0084] Optionally, the preset rule can be: divide the image into N equal parts, where N can be 2, 3, 4, 5, or an integer greater than 5, and will not be listed here. In this way, by dividing the first image according to the preset rule, N segmented images can be obtained, and the N segmented images can have the same size.
[0085] Of course, the preset rules are not limited to this. For example, the image can also be divided unevenly, so that at least two of the N segmented images obtained by segmentation can have different sizes.
[0086] Step 2303: From multiple segmented images, determine the target segmented image to which the first pixel in the first image belongs.
[0087] It should be noted that the first pixel can be any pixel in the first image. Based on the distribution position of the first pixel in the first image, it can be determined which segmentation image the first image belongs to, and that segmentation image can be used as the target segmentation image.
[0088] Step 2305: Determine the bit width conversion reference value corresponding to the target segmented image based on the bit width conversion reference information.
[0089] Optionally, the bit-width conversion reference information may include: bit-width conversion reference values corresponding to each of the multiple segmented images; wherein, the bit-width conversion reference value corresponding to any segmented image can be used to indicate how to perform bit-width conversion on the segmented image. In this way, the bit-width conversion reference value corresponding to the target segmented image can be directly extracted from the bit-width conversion reference information.
[0090] Of course, the bit width conversion reference information may not directly include the bit width conversion reference values corresponding to each of the multiple segmented images, but may include other information corresponding to each of the multiple segmented images. However, there is a certain conversion relationship between this other information and the bit width conversion reference values. In this way, by using the conversion relationship, the bit width conversion reference values corresponding to each of the multiple segmented images can also be obtained.
[0091] Step 2307: According to the bit width conversion rule that matches the bit width conversion reference value corresponding to the target segmented image, perform bit width conversion on the pixel value of the first pixel to obtain the pixel value of the second pixel in the second image to be generated, which corresponds to the first pixel.
[0092] Optionally, each pixel in the second image can correspond one-to-one with each pixel in the first image. For example, the pixel with position coordinates (u, v) in the second image can correspond to the pixel with position coordinates (u, v) in the first image.
[0093] In some alternative embodiments of this disclosure, such as Figure 4 As shown, step 2307 includes steps 23071, 23073 and 23075.
[0094] Step 23071: Determine the target preset reference value range from multiple preset reference value ranges, which is the distribution range of the bit width conversion reference value corresponding to the target segmented image.
[0095] Optionally, the number of preset reference value ranges included in the multiple preset reference value ranges can be 2, 3, 4 or more, and will not be listed here.
[0096] Given the known bit-width conversion reference value corresponding to the target segmented image, the bit-width conversion reference value corresponding to the target segmented image can be compared with multiple preset reference value ranges one by one to determine which preset reference value range the bit-width conversion reference value corresponding to the target segmented image is distributed in. This preset reference value range can then be used as the target preset reference value range.
[0097] Step 23073: Determine the bit filtering rules that are compatible with the target preset reference value range.
[0098] Optionally, a pre-defined correspondence between preset reference value ranges and bit filtering rules can be set. For example, there can be three preset reference value ranges in the pre-defined correspondence, represented as Z1, Z2, and Z3 respectively. The bit filtering rule corresponding to Z1 can be: filter the 8 bits of data located in the highest bit, the bit filtering rule corresponding to Z2 can be: filter the 8 bits of data located in the lowest bit, and the bit filtering rule corresponding to Z3 can be: filter the 8 bits of data located in the middle bit.
[0099] Based on the pre-set correspondence, the bit filtering rule corresponding to the target preset reference value range can be determined efficiently and reliably. This bit filtering rule can then be used as the bit filtering rule that is compatible with the target preset reference value range.
[0100] Step 23075: According to the bit filtering rules adapted to the target preset reference value range, the pixel value of the first pixel is filtered by bit to obtain the pixel value of the second pixel.
[0101] Assuming the first image has a bit width of 24 bits, the pixel value of the first pixel is a 24-bit data set, where each bit is either 1 or 0. For example, the pixel value of the first pixel could be as follows: Figure 5 As shown; where, Figure 5 The position displaying the number 23 at the bottom center is the highest digit. Figure 5 The position with the number 0 displayed in the lower middle is the lowest digit.
[0102] Assuming the bit filtering rule that matches the target preset reference value range is Z1 as described above, by filtering the pixel value of the first pixel, 8 bits of data can be obtained. These 8 bits of data include 0, 0, 1, 1, 0, 0, 0, 0 in sequence. These 8 bits of data can be used to represent a value between 0 and 255, which can then be used as the pixel value of the second pixel.
[0103] Assuming the bit filtering rule that matches the target preset reference value range is Z2 as described above, by filtering the pixel value of the first pixel, 8 bits of data can be obtained. These 8 bits of data include 0, 1, 0, 0, 0, 0, 0, 0 in sequence. These 8 bits of data can be used to represent a value between 0 and 255, which can then be used as the pixel value of the second pixel.
[0104] Figure 4 In the embodiment shown, by referring to the distribution of the bit width conversion reference value corresponding to the target segmented image relative to multiple preset reference value ranges, a bit filtering rule that is compatible with the target segmented image can be determined efficiently and reliably. By applying the determined bit filtering rule, some bits of data can be filtered out from the multi-bit data used to form the pixel value of the first pixel, thereby obtaining the pixel value of the second pixel. This is equivalent to representing the pixel value of the first pixel with lower bit data.
[0105] Step 2309: Generate a second image based on the pixel value of the second pixel.
[0106] The above describes how to represent the pixel value of the first pixel with lower bit data. Since the first pixel is any pixel in the first image, all pixels in the first image can be represented with lower bit data in this way, thereby generating a second image with a lower bit width than the first image.
[0107] In the embodiments of this disclosure, the first image can be segmented according to certain rules to obtain multiple segmented images. For any segmented image, all pixels in the segmented image can share the bit-width conversion reference value corresponding to the segmented image to achieve bit-width conversion. That is, the first image is segmented into regions for bit-width conversion, and the bit-width conversion of each region can utilize a suitable bit-width conversion reference value. This is beneficial to ensuring the image quality of the second image finally generated after bit-width conversion.
[0108] In some alternative embodiments, the first image may not be segmented, and the bit-width conversion reference information may include the bit-width conversion reference value of each pixel in the first image to guide the bit-width conversion of the pixel value of each pixel.
[0109] In some optional examples, such as Figure 6 As shown, step 210 includes steps 2101, 2103, 2105 and 2107.
[0110] Step 2101: For each of the multiple preset brightness ranges, count the number of pixels in the first image whose brightness values are distributed within that preset brightness range, and obtain the number of pixels corresponding to each of the multiple preset brightness ranges.
[0111] Optionally, the number of preset brightness ranges included in the multiple preset brightness ranges can be 2, 3, 4 or more, and will not be listed here. For example, the multiple preset brightness ranges can include at least the following 4 preset brightness ranges: 0 to 20, 20 to 40, 40 to 60, and 60 to 80.
[0112] In step 2101, the brightness value of each pixel can be extracted from the first image, and the brightness value of each pixel can be compared with multiple preset brightness ranges one by one. Thus, for each preset brightness range, the number of pixels in the first image whose brightness values are distributed within that preset brightness range can be determined.
[0113] Step 2103: According to preset rules, the first image is segmented to obtain multiple segmented images.
[0114] It should be noted that the specific implementation of step 2103 can be referred to the relevant introduction of step 2301 above, and will not be repeated here.
[0115] Step 2105: Determine the brightness statistical feature values corresponding to each of the multiple segmented images.
[0116] For each segmented image in a plurality of segmented images, statistical analysis can be performed on the brightness values of all pixels in the segmented image to obtain the mean brightness, maximum brightness, minimum brightness, median brightness, etc. of the segmented image. The brightness statistical feature value of the segmented image may include at least one of the following: the mean brightness, maximum brightness, minimum brightness, and median brightness of the segmented image.
[0117] Step 2107: Based on the number of pixels corresponding to each of the multiple preset brightness ranges and the brightness statistical feature values corresponding to each of the multiple segmented images, determine the statistical information of the first image in the brightness dimension.
[0118] Optionally, the statistical information of the first image in the brightness dimension may include: the number of pixels corresponding to each of the multiple preset brightness ranges; and / or, the brightness statistical feature values corresponding to each of the multiple segmented images.
[0119] In the embodiments of this disclosure, by referring to the distribution of the brightness values of each pixel in the first image relative to multiple preset brightness ranges, the number of pixels corresponding to each of the multiple preset brightness ranges can be obtained efficiently and reliably. By referring to the brightness values of each pixel in the first image, the brightness statistical feature values corresponding to each of the multiple segmented images can be obtained efficiently and reliably. These quantities and brightness statistical feature values can be used to determine the statistical information of the first image in the brightness dimension. In this way, the determined statistical information can effectively characterize the brightness distribution features and brightness value features of the first image. Using the determined statistical information to generate bit-width conversion reference information can ensure that the generated bit-width conversion reference information is compatible with the brightness distribution features and brightness value features of the first image, thereby helping to ensure the image quality of the second image finally generated after bit-width conversion.
[0120] In some optional examples, the first image is a raw image captured by the camera, that is, the first image is the Raw domain image mentioned above.
[0121] like Figure 7 As shown, step 210 includes steps 2109, 2111, and 2113.
[0122] Step 2109: Based on the multiple color components included in the first image, perform image rearrangement on the first image to obtain a multi-channel image.
[0123] Optionally, the multi-channel image can be a four-channel image. The first channel of the multi-channel image may include: each element located in the odd row and odd column of the first image; the second channel of the multi-channel image may include: each element located in the odd row and even column of the first image; the third channel of the multi-channel image may include: each element located in the even row and odd column of the first image; and the fourth channel of the multi-channel image may include: each element located in the even row and even column of the first image.
[0124] Assuming the first image is Figure 8-1 The RGGB image shown (which includes three color components) can then be viewed from... Figure 8-1 Starting with the element in the first row and first column, elements are extracted at 1-pixel intervals along both the width and height directions. All extracted elements are then arranged in the first channel of the multi-channel image. This arrangement ensures that the relative positions of any two elements after arrangement are consistent with their positions in the first channel. Figure 8-1 The relative positions are consistent.
[0125] It should be noted that in the embodiments of this disclosure, the elements in an image can refer to pixel values in the image; therefore, element extraction from an image can refer to the extraction of pixel values from the image. Thus, by extracting from... Figure 8-1Starting with the element in the first row and first column, extract elements at 1-pixel intervals along both the width and height directions to obtain... Figure 8-1 The first channel of a multi-channel image may include all pixel values at locations where R is displayed. Figure 8-1 The pixel values at all locations where R is displayed.
[0126] Alternatively, from Figure 8-1 Starting with the element in the first row and second column, elements are extracted at 1-pixel intervals along both the width and height directions. All extracted elements are then arranged in the second channel of the multi-channel image. This arrangement ensures that the relative positions of any two elements after arrangement are consistent with their positions in the second channel of the image. Figure 8-1 The relative positions are consistent.
[0127] Similarly, the corresponding elements can be arranged in the third and fourth channels of a multi-channel image, thereby obtaining... Figure 8-2 The complete multi-channel image shown.
[0128] When the first image is an RGBIR image, a multi-channel image can also be formed by extracting and rearranging the elements of the RGBIR image. Assume the first image is... Figure 8-3 The RGBIR image shown can be used to create a multi-channel image as follows: Figure 8-4 As shown.
[0129] Step 2111: Perform information statistics on the multiple channels included in the multi-channel image to obtain multiple statistical information of the multi-channel image in the color dimension.
[0130] Taking the case where the first image is an RGGB image as an example, a multi-channel image can be a four-channel image, where the first channel can be an R channel, the second channel can be a G channel, the third channel can be a G channel, and the fourth channel can be a B channel.
[0131] For the first channel of a multi-channel image, statistical methods can be used to collect information from the color dimension, thus obtaining the statistical information of the first channel in the color dimension. Specific statistical methods can be found in [reference needed]. Figure 6The illustrated embodiment describes the statistical method for the brightness dimension. Thus, the statistical information for the first channel of a multi-channel image in the color dimension can include: the number of pixels corresponding to each of multiple preset pixel value ranges; and / or, the color statistical feature values corresponding to each of the multiple segmented images. The number of pixels corresponding to any preset pixel value range can be used to characterize the number of pixels in the R channel whose pixel values are distributed within that preset pixel value range. The color statistical feature values corresponding to any segmented image can include at least one of the following: the mean, maximum, minimum, and median pixel values of the R channel corresponding to that segmented image.
[0132] The method for obtaining the statistical information of the other channels of a multi-channel image in the color dimension is the same as the method for obtaining the statistical information of the first channel of a multi-channel image in the color dimension described in the previous paragraph, and will not be repeated here.
[0133] Step 2113: Based on multiple statistical information of the multi-channel image in the color dimension, determine the statistical information of the first image in the color dimension.
[0134] Optionally, the statistical information of the first image in the color dimension may include multiple statistical information of the multi-channel image in the color dimension. Additionally, the statistical information of the first image in the color dimension may also include statistical information of the first image in the brightness dimension.
[0135] In the embodiments of this disclosure, referring to the multiple color components included in the first image, a multi-channel image can be obtained by image rearrangement of the first image. For each channel of the multi-channel image, information statistics can be performed on it from the color dimension. The multiple statistical information of the multi-channel image in the color dimension can be used to determine the statistical information of the first image in the color dimension. In this way, the determined statistical information can effectively characterize the pixel value distribution characteristics and pixel value numerical characteristics of the first image corresponding to various color components. Using the determined statistical information to generate bit-width conversion reference information can ensure that the generated bit-width conversion reference information is compatible with the pixel value distribution characteristics and pixel value numerical characteristics of the first image corresponding to various color components, thereby helping to ensure the image quality of the second image finally generated after bit-width conversion.
[0136] In some optional examples,
[0137] Step 210 involves performing information statistics on the first image to be converted to bit width, including:
[0138] The image signal processor (ISP) performs information statistics on the first image to be bit-width converted.
[0139] And / or,
[0140] Step 210, which involves bit-width conversion of the first image, includes:
[0141] Optionally, the image signal processor may include a statistics module and a bit-width conversion module, both of which can be hardware modules.
[0142] In the embodiments of this disclosure, the statistical module, as a hardware module, can perform information statistics on the first image to obtain statistical information of the first image in a predetermined feature dimension. The statistical information of the first image in the predetermined feature dimension can be provided to the target neural network. The operation performed by the target neural network can be considered a software-level operation. Through the software-level operation, bit-width conversion information can be obtained. The bit-width conversion module, as a hardware module, can be used to perform bit-width conversion on the first image based on the bit-width conversion reference information to obtain the second image. It can be seen that the embodiments of this disclosure achieve image conversion from high bit-width to low bit-width through the collaborative work of hardware and software. This simultaneously possesses the efficiency of hardware and the flexibility of software, thereby ensuring bit-width conversion efficiency. Furthermore, there is no limitation on the bit-width of the image requiring bit-width conversion; whether it is 20-bit, 24-bit, or other bit-widths, bit-width conversion can be achieved.
[0143] Figure 9 This is a flowchart illustrating a training method for a neural network used to assist in image bit-width conversion, provided by an exemplary embodiment of this disclosure. Figure 9 The method shown may include steps 910, 920, 930, 940, 950, 960, 970 and 980, each of which will be explained below.
[0144] Step 910: Perform information statistics on the first training image to be bit-width converted to obtain statistical information of the first training image in a predetermined feature dimension.
[0145] Step 920: Based on the statistical information of the first training image in a predetermined feature dimension, training bit-width conversion reference information is generated via the neural network to be trained.
[0146] Step 930: Based on the training bit-width conversion reference information, perform bit-width conversion on the first training image to obtain the second training image.
[0147] It should be noted that the neural network to be trained in step 920 refers to an untrained neural network used to assist in the implementation of image bit width conversion. The specific implementation methods of steps 910 to 930 can be referred to the relevant introduction of steps 210 to 230 above, and will not be repeated here.
[0148] Step 940: Based on the first training image, a predetermined visual perception task is performed via the visual perception network to obtain the first task execution result.
[0149] It should be noted that the visual perception network can be either a pre-trained network used to perform a predetermined visual perception task, or an untrained network used to perform the predetermined visual perception task (in which case, the visual perception network can be trained together with the neural network to be trained). For ease of understanding, the embodiments of this disclosure are all described using the case where the visual perception network is a pre-trained network used to perform the predetermined visual perception task as an example.
[0150] If the predetermined visual perception task is a semantic segmentation task, the visual perception network can be a semantic segmentation network. In step 940, the first training image can be provided as input to the semantic segmentation network, which can then perform calculations to generate a semantic segmentation result that includes the predicted category of each pixel in the first training image. This semantic segmentation result can be used as the result of the first task execution.
[0151] If the predetermined visual perception task is object detection, the visual perception network can be an object detection network. In step 940, the first training image can be provided as input to the object detection network, which can then perform calculations to generate object detection results that include detection boxes and predicted categories for each detected object in the first training image. The object detection results can be used as the result of the first task execution.
[0152] Step 950: Based on the second training image, a predetermined visual perception task is performed via the visual perception network to obtain the second task execution result.
[0153] It should be noted that the specific implementation of step 950 can be referred to the relevant introduction of step 940 above, and will not be repeated here.
[0154] Step 960: By comparing the execution results of the first task and the second task, determine the network loss value of the neural network to be trained.
[0155] Optionally, a loss function can be used to calculate the error between the execution results of the first task and the second task, and the calculated error can be used as the network loss value of the neural network to be trained; wherein, the loss function includes, but is not limited to, the mean absolute error loss function (L1 loss function), the mean squared error loss function (L2 loss function), etc.
[0156] Step 970: Train the neural network to be trained using the network loss value.
[0157] Optionally, based on the network loss value, gradient descent (e.g., stochastic gradient descent, steepest gradient descent, etc.) can be used to train the neural network and optimize its parameters, thereby achieving the training of the neural network.
[0158] Step 980: In response to the trained neural network meeting the preset training termination condition, the trained neural network is determined as the target neural network.
[0159] It should be noted that when training the neural network to be trained, a large amount of sample data can be used. Each sample data includes a first training image. In this way, for each sample data, steps 910 to 970 above can be executed. The process of executing steps 910 to 970 above for each sample data can be regarded as an iterative process.
[0160] After several iterations, if the trained neural network converges at a certain point, it can be determined that the trained neural network meets the preset training termination condition. At this point, the trained neural network can be directly identified as the target neural network.
[0161] Of course, the preset training termination condition is not limited to this. For example, it can also be determined that the trained neural network meets the preset training termination condition when the number of iterations reaches a preset number.
[0162] In the embodiments of this disclosure, during the training phase, information statistics can be performed on the first training image from a predetermined feature dimension, and the obtained statistical information is provided to the neural network to be trained. The neural network to be trained can then generate training bit-width conversion reference information. Guided by this training bit-width conversion reference information, the bit-width conversion of the first training image can be achieved to obtain a second training image. Both the first and second training images can be used for a predetermined visual perception task to obtain a first task execution result corresponding to the first training image and a second task execution result corresponding to the second training image. The network loss value obtained by comparing the first and second task execution results can be used to evaluate the prediction accuracy of the neural network to be trained. Based on the network loss value, backpropagation can be used to optimize the parameters of the neural network to be trained to obtain a target neural network with good prediction accuracy. Thus, during the inference phase, by using the target neural network, bit-width conversion reference information with good accuracy and reliability can be obtained for bit-width conversion, thereby enabling efficient and reliable bit-width conversion of images.
[0163] In addition, in the embodiments of this disclosure, since the network loss value is obtained by comparing the execution results of the first task and the second task, and both the execution results of the first task and the second task are generated by the visual perception network, it can be considered that the training phase uses the output results of the visual perception network to supervise the neural network to be trained. That is, the target neural network is generated under the guidance of the visual perception network. This can save tedious manual annotation and debugging, which is conducive to engineering implementation. On the other hand, it can make the target neural network finally trained match the predetermined visual perception task, which is conducive to ensuring the visual perception effect in the inference phase.
[0164] In some optional examples, such as Figure 10 As shown, for high-bit-width data (equivalent to the first image above), the statistical module in the ISP can perform statistical analysis on it from the brightness and / or color dimensions to obtain corresponding statistical information. This statistical information is then provided to the Artificial Intelligence (AI) model (equivalent to the target neural network above). The AI model can then perform calculations to generate bit-width conversion reference information, which is also provided to the bit-width conversion module in the ISP. The high-to-low bit-width conversion module can then convert the high-bit-width data according to the bit-width conversion reference information to obtain low-bit-width data (equivalent to the second image above), thus achieving high-to-low bit-width conversion of the image. For the low-bit-width data, semantic segmentation, object detection, object tracking, and object trajectory prediction can be performed.
[0165] In addition, such as Figure 10 As shown, during the training phase, both low-bit-width and high-bit-width data can be provided to the visual perception network. The output of the visual perception network can be used to supervise the training of the AI model, thereby guiding the AI model to learn the ideal bit-width conversion reference information under the current statistical information.
[0166] In summary, the embodiments of this disclosure employ a hardware and software collaborative approach to achieve the conversion of images from high bit width to low bit width, which can simultaneously possess the efficiency of hardware and the flexibility of software. Furthermore, the training process does not rely on manual annotation, thus saving manual annotation costs and facilitating engineering implementation.
[0167] Exemplary device
[0168] Figure 11 This is a schematic diagram of the structure of an image bit-width conversion device provided in an exemplary embodiment of the present disclosure. Figure 11 The device shown includes a first statistics module 1110, a first generation module 1120, and a first bit width conversion module 1130.
[0169] The first statistical module 1110 is used to perform information statistics on the first image to be converted to bit width, and obtain statistical information of the first image in a predetermined feature dimension.
[0170] The first generation module 1120 is used to generate bit-width conversion reference information based on the statistical information of the first image in a predetermined feature dimension obtained by the first statistics module 1110, via a target neural network.
[0171] The first bit width conversion module 1130 is used to perform bit width conversion on the first image based on the bit width conversion reference information generated by the first generation module 1120 to obtain the second image.
[0172] In some optional examples, such as Figure 12 As shown, the first width conversion module 1130 includes:
[0173] The first segmentation module 11301 is used to segment the first image according to a preset rule to obtain multiple segmented images;
[0174] The first determining submodule 11303 is used to determine the target segmented image to which the first pixel in the first image belongs from multiple segmented images obtained from the first segmenting submodule 11301;
[0175] The second determining submodule 11305 is used to determine the bit width conversion reference value corresponding to the target segmentation image determined by the first determining submodule 11303 based on the bit width conversion reference information generated by the first generating module 1120.
[0176] Bit width conversion submodule 11307 is used to perform bit width conversion on the pixel value of the first pixel according to the bit width conversion rule that matches the bit width conversion reference value determined by the first determining submodule 11303, so as to obtain the pixel value of the second pixel corresponding to the first pixel in the second image to be generated.
[0177] The generation submodule is used to generate a second image based on the pixel value of the second pixel obtained by the bit-width conversion submodule 11307.
[0178] In some optional examples, such as Figure 13 As shown, the bit-width conversion submodule 11307 includes:
[0179] The first determining unit 113071 is used to determine the target preset reference value range from which the bit width conversion reference value determined by the first determining submodule 11303 is distributed from multiple preset reference value ranges;
[0180] The second determining unit 113073 is used to determine the bit filtering rules that are compatible with the target preset reference value range determined by the first determining unit 113071.
[0181] The filtering unit 113075 is used to filter the pixel value of the first pixel according to the bit filtering rules determined by the second determining unit 113073 to obtain the pixel value of the second pixel.
[0182] In some optional examples,
[0183] The first statistical module 1110 includes:
[0184] The image signal processor performs information statistics on the first image to be converted to bit width.
[0185] And / or,
[0186] The first wide conversion module 1130 includes:
[0187] The first image is bit-width converted using an image signal processor.
[0188] In some optional examples, such as Figure 14 As shown, the first statistical module 1110 includes:
[0189] The first statistical submodule 11101 is used to count the number of pixels in the first image whose brightness values are distributed in each of the multiple preset brightness ranges, and to obtain the number of pixels corresponding to each of the multiple preset brightness ranges.
[0190] The second segmentation module 11103 is used to segment the first image according to a preset rule to obtain multiple segmented images;
[0191] The third determining submodule 11105 is used to determine the brightness statistical feature values corresponding to the multiple segmented images obtained by the second segmenting submodule 11103;
[0192] The fourth determining submodule 11107 is used to determine the statistical information of the first image in the brightness dimension based on the number of pixels corresponding to each of the multiple preset brightness ranges obtained by the first statistical submodule 11101 and the brightness statistical feature values corresponding to each of the multiple segmented images determined by the third determining submodule 11105.
[0193] In some optional examples, the first image is a raw image captured by the camera;
[0194] like Figure 15 As shown, the first statistical module 1110 includes:
[0195] Image rearrangement submodule 11109 is used to rearrange the first image based on the multiple color components included in the first image to obtain a multi-channel image;
[0196] The second statistical submodule 11111 is used to perform information statistics on the multiple channels of the multi-channel image obtained by the image rearrangement submodule 11109, and obtain multiple statistical information of the multi-channel image in the color dimension.
[0197] The fifth determining submodule 11113 is used to determine the statistical information of the first image in the color dimension based on the multiple statistical information of the multi-channel image in the color dimension obtained by the second statistical submodule 11111.
[0198] Figure 16 This is a schematic diagram of the structure of a training apparatus for assisting in the implementation of image bit-width conversion, provided by an exemplary embodiment of the present disclosure. Figure 16 The apparatus shown includes a second statistics module 1610, a second generation module 1620, a second bit width conversion module 1630, a first execution module 1640, a second execution module 1650, a first determination module 1660, a training module 1670, and a second determination module 1680.
[0199] The second statistical module 1610 is used to perform information statistics on the first training image to be converted to bit width, and obtain statistical information of the first training image in a predetermined feature dimension.
[0200] The second generation module 1620 is used to generate training bit-width conversion reference information based on the statistical information of the first training image in a predetermined feature dimension obtained by the second statistics module 1610, via the neural network to be trained.
[0201] The second bit-width conversion module 1630 is used to perform bit-width conversion on the first training image based on the training bit-width conversion reference information generated by the second generation module 1620 to obtain the second training image.
[0202] The first execution module 1640 is used to perform a predetermined visual perception task based on the first training image via a visual perception network to obtain the first task execution result;
[0203] The second execution module 1650 is used to perform a predetermined visual perception task based on the second training image obtained by the second bit-width conversion module 1630 via a visual perception network, and obtain the second task execution result.
[0204] The first determining module 1660 is used to determine the network loss value of the neural network to be trained by comparing the first task execution result obtained by the first execution module 1640 with the second task execution result obtained by the second execution module 1650.
[0205] The training module 1670 is used to train the neural network to be trained using the network loss value determined by the first determining module 1660.
[0206] The second determining module 1680 is used to determine the neural network to be trained by the training module 1670 as the target neural network in response to the training neural network to be trained after the training module 1670 meets the preset training termination condition.
[0207] In the apparatus disclosed herein, the various optional embodiments, optional implementation methods and optional examples disclosed above can be flexibly selected and combined as needed to achieve the corresponding functions and effects, and this disclosure does not list them all.
[0208] Exemplary electronic devices
[0209] Figure 17 The illustration shows a block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 1700 includes one or more processors 1710 and a memory 1720.
[0210] The processor 1710 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1700 to perform desired functions.
[0211] The memory 1720 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1710 may execute one or more computer program instructions to implement the methods of the various embodiments of this disclosure described above and / or other desired functions.
[0212] In one example, the electronic device 1700 may also include an input device 1730 and an output device 1740, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0213] The input device 1730 may also include, for example, a keyboard, a mouse, etc.
[0214] The output device 1740 can output various information to the outside, including, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0215] Of course, for the sake of simplicity, Figure 17Only some of the components of the electronic device 1700 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 1700 may include any other suitable components depending on the specific application.
[0216] Exemplary computer program products and computer-readable storage media
[0217] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of this disclosure as described in the "Exemplary Methods" section of this specification.
[0218] Computer program products can be written in any combination of one or more programming languages to perform the operations of embodiments of this disclosure. These programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0219] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of this disclosure described in the "Exemplary Methods" section above.
[0220] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0221] The basic principles of this disclosure have been described above with reference to specific embodiments. However, the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. The specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the specific details described above.
[0222] Various modifications and variations can be made to this disclosure without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, this disclosure is also intended to include such modifications and variations.
Claims
1. An image bit-width conversion method, comprising: Information statistics are performed on the first image to be bit-width converted to obtain statistical information of the first image in a predetermined feature dimension; Based on the statistical information of the first image in a predetermined feature dimension, bit-width conversion reference information is generated via the target neural network; Based on the bit-width conversion reference information, the first image is bit-width converted to obtain a second image, wherein the bit-width of the second image is smaller than the bit-width of the first image; The step of performing bit-width conversion on the first image based on the bit-width conversion reference information to obtain the second image includes: The first image is segmented according to a preset rule to obtain multiple segmented images; From the plurality of segmented images, determine the target segmented image to which the first pixel in the first image belongs; Based on the bit-width conversion reference information, determine the bit-width conversion reference value corresponding to the target segmented image; According to the bit width conversion rule that matches the bit width conversion reference value, the pixel value of the first pixel is bit width converted to obtain the pixel value of the second pixel in the second image to be generated, which corresponds to the first pixel. The second image is generated based on the pixel value of the second pixel.
2. The method of claim 1, wherein, The step of performing bit-width conversion on the pixel value of the first pixel according to a bit-width conversion rule matching the bit-width conversion reference value to obtain the pixel value of the second pixel corresponding to the first pixel in the second image to be generated includes: From multiple preset reference value ranges, determine the target preset reference value range in which the bit width conversion reference value is distributed; Determine the bit filtering rules that are compatible with the target preset reference value range; According to the bit filtering rules, the pixel value of the first pixel is filtered by bit to obtain the pixel value of the second pixel.
3. The method according to claim 1, wherein, The information statistics of the first image to be converted to bit width include: The image signal processor performs information statistics on the first image to be converted to bit width. And / or, The bit-width conversion of the first image includes: The first image is bit-width converted using an image signal processor.
4. The method of any one of claims 1-3, wherein, The step of performing information statistics on the first image to be bit-width converted, to obtain statistical information of the first image in a predetermined feature dimension, includes: For each of the multiple preset brightness ranges, the number of pixels in the first image whose brightness values are distributed within that preset brightness range is counted to obtain the number of pixels corresponding to each of the multiple preset brightness ranges; The first image is segmented according to a preset rule to obtain multiple segmented images; Determine the brightness statistical feature values corresponding to each of the multiple segmented images; Based on the number of pixels corresponding to each of the multiple preset brightness ranges, and the brightness statistical feature values corresponding to each of the multiple segmented images, the statistical information of the first image in the brightness dimension is determined.
5. The method of any one of claims 1-3, wherein, The first image is a raw image captured by the camera; The step of performing information statistics on the first image to be bit-width converted, to obtain statistical information of the first image in a predetermined feature dimension, includes: Based on the multiple color components included in the first image, the first image is rearranged to obtain a multi-channel image; Information statistics are performed on each of the multiple channels included in the multi-channel image to obtain multiple statistical information of the multi-channel image in the color dimension; Based on multiple statistical information of the multi-channel image in the color dimension, the statistical information of the first image in the color dimension is determined.
6. A training method for a neural network used to assist in image bit-width conversion, comprising: Information statistics are performed on the first training image to be bit-width converted to obtain statistical information of the first training image in a predetermined feature dimension; Based on the statistical information of the first training image in a predetermined feature dimension, training bit-width conversion reference information is generated via the neural network to be trained. Based on the training bit-width conversion reference information, the first training image is bit-width converted to obtain a second training image, wherein the bit-width of the second training image is smaller than the bit-width of the first training image. Based on the first training image, a predetermined visual perception task is performed via a visual perception network to obtain the first task execution result; Based on the second training image, the predetermined visual perception task is performed via the visual perception network to obtain the second task execution result; The network loss value of the neural network to be trained is determined by comparing the execution results of the first task and the execution results of the second task. The neural network to be trained is trained using the network loss value; In response to the trained neural network meeting the preset training termination condition, the trained neural network is determined as the target neural network. The step of performing bit-width conversion on the first training image based on the training bit-width conversion reference information to obtain the second training image includes: According to preset rules, the first training image is segmented to obtain multiple segmented training images; From the plurality of training segmented images, determine the target training segmented image to which the first training pixel in the first training image belongs; Based on the training bit-width conversion reference information, determine the training bit-width conversion reference value corresponding to the target training segmented image; According to the bit width conversion rule that matches the training bit width conversion reference value, the pixel value of the first training pixel is bit width converted to obtain the pixel value of the second training pixel in the second training image to be generated, which corresponds to the first training pixel. The second training image is generated based on the pixel values of the second training pixels.
7. An image bit-width conversion device, comprising: The first statistics module is used to perform information statistics on the first image to be converted to bit width, and obtain statistical information of the first image in a predetermined feature dimension. The first generation module is used to generate bit-width conversion reference information based on the statistical information of the first image in a predetermined feature dimension obtained by the first statistical module, via a target neural network. The first bit width conversion module is used to perform bit width conversion on the first image based on the bit width conversion reference information generated by the first generation module to obtain a second image, wherein the bit width of the second image is smaller than the bit width of the first image; The first bit-width conversion module includes: The first segmentation module is used to segment the first image according to a preset rule to obtain multiple segmented images; The first determining submodule is used to determine, from the plurality of segmented images, the target segmented image to which the first pixel in the first image belongs; The second determining submodule is used to determine the bit width conversion reference value corresponding to the target segmented image based on the bit width conversion reference information; The bit-width conversion submodule is used to perform bit-width conversion on the pixel value of the first pixel according to the bit-width conversion rule matched with the bit-width conversion reference value, so as to obtain the pixel value of the second pixel in the second image to be generated that corresponds to the first pixel. The generation submodule is used to generate the second image based on the pixel value of the second pixel.
8. A training apparatus for assisting in the implementation of image bit-width conversion, comprising: The second statistical module is used to perform information statistics on the first training image to be converted to bit width, and obtain statistical information of the first training image in a predetermined feature dimension. The second generation module is used to generate training bit-width conversion reference information based on the statistical information of the first training image in a predetermined feature dimension obtained by the second statistical module, via the neural network to be trained. The second bit-width conversion module is used to segment the first training image according to a preset rule to obtain multiple training segmented images; From the plurality of training segmented images, determine the target training segmented image to which the first training pixel in the first training image belongs; Based on the training bit-width conversion reference information, the training bit-width conversion reference value corresponding to the target training segmentation image is determined; according to the bit-width conversion rule matching the training bit-width conversion reference value, the pixel value of the first training pixel is bit-width converted to obtain the pixel value of the second training pixel corresponding to the first training pixel in the second training image to be generated; The second training image is generated based on the pixel values of the second training pixels; wherein the bit width of the second training image is smaller than the bit width of the first training image. The first execution module is used to perform a predetermined visual perception task based on the first training image via a visual perception network to obtain a first task execution result; The second execution module is used to execute the predetermined visual perception task based on the second training image obtained by the second bit-width conversion module, via the visual perception network, and obtain the second task execution result; The first determining module is used to determine the network loss value of the neural network to be trained by comparing the first task execution result obtained by the first execution module and the second task execution result obtained by the second execution module. The training module is used to train the neural network to be trained using the network loss value determined by the first determining module. The second determining module is used to determine the neural network to be trained as the target neural network in response to the training module meeting the preset training termination condition.
9. A computer-readable storage medium storing a computer program for executing the image bit-width conversion method according to any one of claims 1-5, or for executing the training method of the neural network for assisting in the implementation of image bit-width conversion according to claim 6.
10. An electronic device, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the image bit-width conversion method according to any one of claims 1-5, or to implement the training method of the neural network for assisting in the implementation of image bit-width conversion according to claim 6.