snnn001 commited on
Commit
2f882b5
·
verified ·
1 Parent(s): ca538dc

Update validated TorchVision exports and compatibility documentation

Browse files

Publish the reviewed model files and current CPU/GPU/NPU compatibility table.

README.md CHANGED
@@ -35,6 +35,15 @@ model-index:
35
 
36
  EfficientNet B0 model pre-trained on ImageNet-1k. Originally introduced by Tan and Le in the influential paper, [**EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks**](https://arxiv.org/abs/1905.11946) this model utilizes compound scaling to systematically balance network depth, width, and resolution, enabling superior accuracy with significantly higher efficiency than traditional architectures.
37
 
 
 
 
 
 
 
 
 
 
38
  ## Intended uses & limitations
39
 
40
  The model files were converted from pretrained weights from PyTorch Vision. The models may have their own licenses or terms and conditions derived from PyTorch Vision and the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.
@@ -83,18 +92,18 @@ def preprocess(img: Image.Image) -> np.ndarray:
83
  w, h = img.size
84
  s = 256
85
  if w < h:
86
- img = img.resize((s, int(round(h * s / w))), Image.BICUBIC)
87
  else:
88
- img = img.resize((int(round(w * s / h)), s), Image.BICUBIC)
89
- left = (img.size[0] - 224) // 2
90
- top = (img.size[1] - 224) // 2
91
  img = img.crop((left, top, left + 224, top + 224))
92
 
93
  x = np.asarray(img, dtype=np.float32) / 255.0
94
  x = (x - np.array([0.485, 0.456, 0.406], dtype=np.float32)) / np.array(
95
  [0.229, 0.224, 0.225], dtype=np.float32
96
  )
97
- return np.transpose(x, (2, 0, 1))
98
 
99
  def main():
100
  ap = argparse.ArgumentParser()
 
35
 
36
  EfficientNet B0 model pre-trained on ImageNet-1k. Originally introduced by Tan and Le in the influential paper, [**EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks**](https://arxiv.org/abs/1905.11946) this model utilizes compound scaling to systematically balance network depth, width, and resolution, enabling superior accuracy with significantly higher efficiency than traditional architectures.
37
 
38
+ `efficientnet_b0_int8_channelwise.tflite`: Mixed INT8/FP32 with channelwise INT8 weights. The prefix through stage 5 remains FP32.
39
+
40
+ ## Compatibility
41
+
42
+ | File | CPU | GPU | NPU |
43
+ |---|---|---|---|
44
+ | `efficientnet_b0.tflite` | Supported | Supported | N/A |
45
+ | `efficientnet_b0_int8_channelwise.tflite` | Supported | Not supported | Qualcomm / MediaTek |
46
+
47
  ## Intended uses & limitations
48
 
49
  The model files were converted from pretrained weights from PyTorch Vision. The models may have their own licenses or terms and conditions derived from PyTorch Vision and the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.
 
92
  w, h = img.size
93
  s = 256
94
  if w < h:
95
+ img = img.resize((s, int(h * s / w)), Image.BICUBIC)
96
  else:
97
+ img = img.resize((int(w * s / h), s), Image.BICUBIC)
98
+ left = int(round((img.size[0] - 224) / 2.0))
99
+ top = int(round((img.size[1] - 224) / 2.0))
100
  img = img.crop((left, top, left + 224, top + 224))
101
 
102
  x = np.asarray(img, dtype=np.float32) / 255.0
103
  x = (x - np.array([0.485, 0.456, 0.406], dtype=np.float32)) / np.array(
104
  [0.229, 0.224, 0.225], dtype=np.float32
105
  )
106
+ return np.ascontiguousarray(x.transpose(2, 0, 1)[None])
107
 
108
  def main():
109
  ap = argparse.ArgumentParser()
efficientnet_b0.tflite CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:aefc589950121af9bc3288f9118337719f8e0f1dc70ebea179609521127c5d0d
3
- size 21319488
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b58d40a42fc7996070de6256a3a772771885a2609fc97753d054a3e6ea1ea98
3
+ size 21126448
efficientnet_b0_int8_channelwise.tflite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5106e5665786e750cae6c90bc0710410bb0ec34b20ed0d8cff5c54b334498c98
3
+ size 8383640