1.25.4
- Addition of automatic INT8 calibration process for RGBA 4-channel images.
- It should be noted that the MS-COCO image set does not include an alpha channel, so this auto-calibration does not allow for decent quantization.
- There is no correlation between the channel being 4 and the input data being an image. Therefore, if the model to be converted is data other than a 4-channel image, automatic calibration should not be used.
- The following means and standard deviations are used as fixed values.
mean = np.asarray([[[[0.485, 0.456, 0.406, 0.000]]]], dtype=np.float32) std = np.asarray([[[[0.229, 0.224, 0.225, 1.000]]]], dtype=np.float32)
- Also, use a fixed value of 0.5 for the alpha channel of the calibration data.
new_element_array = np.full((*calib_data.shape[:-1], 1), 0.500, dtype=np.float32)
- The following means and standard deviations are used as fixed values.
- magic_touch.onnx.zip
- [TODO] Add 4 channels of image data to the sample data for quantization #411
What's Changed
- Addition of automatic INT8 calibration process for RGBA 4-channel images by @PINTO0309 in #670
Full Changelog: 1.25.3...1.25.4