$ ck install package --tags=dataset,imagenet,preprocessed,using-opencv
The table below summarizes the available methods.
Preprocessing method | OpenCV universal | OpenCV for ResNet | OpenCV for MobileNet |
---|---|---|---|
Additional tags | universal |
for-resnet |
for-mobilenet |
Supported models | ResNet, MobileNet | ResNet only | MobileNet only |
Supported platforms | x86i | x86 | x86 |
Data format | rgb8 (int8) | rgbf32 (float32) | rgbf32 (float32) |
Data size | 7.1G | 29G | 29G |
The table below shows the accuracy on the ImageNet 2012 validation set (50,000 images) of the MLPerf Inference v0.5 image classification models measured - via TensorFlow (C++)
Model | Metric | OpenCV universal | OpenCV for ResNet | OpenCV for MobileNet |
---|---|---|---|---|
ResNet | Top1 | 0.76442 | 0.76456 | N/A |
Top5 | 0.93074 | 0.93016 | N/A | |
MobileNet non-quantized | Top1 | 0.71676 | N/A | 0.71676 |
Top5 | 0.90118 | N/A | 0.90118 | |
MobileNet quantized | Top1 | 0.70700 | N/A | 0.70694 |
Top5 | 0.89594 | N/A | 0.89594 |
Model | Metric | OpenCV universal | OpenCV for ResNet | OpenCV for MobileNet |
---|---|---|---|---|
ResNet | Top1 | 0.76442 | 0.76456 | N/A |
Top5 | 0.93074 | 0.93016 | N/A | |
MobileNet non-quantized | Top1 | 0.71676 | N/A | 0.71676 |
Top5 | 0.90118 | N/A | 0.90118 | |
MobileNet quantized | Top1 | 0.70762 | N/A | N/A (bug?) |
Top5 | 0.89266 | N/A | N/A (bug?) |
ResNet achieves 0.76450/0.93058 with TF-C++/TFLite, universal OpenCV preprocessing and the green channel mean of 116.6.
MobileNet quantized used to achieve 0.70776 with TFLite and universal OpenCV preprocessing with area interpolation.