---
# System prepended metadata

title: 藥品辨識

---

# 藥品辨識
# 06253
![](https://i.imgur.com/qYDnXHq.jpg =200x)
# 06297
![](https://i.imgur.com/KuJ1eEd.jpg =200x)
# 11027
![](https://i.imgur.com/8xZiDmi.jpg =200x)
# 13405
![](https://hackmd.io/_uploads/BJb1RY1Hn.png =200x)

# 05121
![](https://hackmd.io/_uploads/BkWOCYyrn.png =200x)

# 16002
![](https://hackmd.io/_uploads/SkXsCtJHn.png =200x)
# 05273
![](https://hackmd.io/_uploads/rkO00FJSn.png  =200x)

# 11037
![](https://hackmd.io/_uploads/HkHQkq1rn.png  =200x)

# 03102
![](https://hackmd.io/_uploads/r1fDk5krh.png   =200x)

# 11402
![](https://hackmd.io/_uploads/S17i1qJH3.png =200x)

# 02043
![](https://hackmd.io/_uploads/Hyc6yqyHh.png =200x)

# 16004
![](https://hackmd.io/_uploads/r1aKl91Sn.png =200x)

# 13473
![](https://hackmd.io/_uploads/BJ5Tl9JBn.png =200x)

# 19054
![](https://hackmd.io/_uploads/ry2E-q1H2.png  =200x)

# 19055
![](https://hackmd.io/_uploads/Hy4XGcyBh.png  =200x)

# 05237
![](https://hackmd.io/_uploads/HJ7Yz9yrh.png  =200x)

# pt 轉 onnx
```
def export_onnx(self,img_path):
image = Image.open(img_path).convert('RGB')
x = self.transform(image).unsqueeze(0)
torch.onnx.export(self.model, x, self.model_name+".onnx")
```
# onnx 轉 tensorrt
```
/usr/src/tensorrt/bin/trtexec --onnx=rexnet_100.onnx --fp16 --workspace=2000 --saveEngine=rexnet_100.engine
```


# 嘗試半精浮點數
half


# 測試推論
```
/usr/src/tensorrt/bin/trtexec --loadEngine=rexnet_100.engine --inputIOFormats=fp32:CHW --output=BiasAdd_1203 --batch=1 /app/timm/test_100/Train/DoHands-onActivities/1000_125_1.jpg


```