try_detect
This commit is contained in:
1 parent
cd9cc177c5
commit
9b008eaa99
2 files changed
+16
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
python /data6/zhangw/yolov5/detect.py \
|
||||||
|
--weights /data6/zhangw/ZW_gra_project/yolov5_result_pretrained/G0_cub100_yolov5s6_raw_e300/weights/best.rknn \
|
||||||
|
--source /data6/zhangw/ZW_gra_project/CUB_100/images/test/Acadian_Flycatcher_0073_795628.jpg
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import torch
|
||||||
|
|
||||||
|
model = torch.load("/data6/zhangw/ZW_gra_project/yolov5_result_pretrained/G0_cub100_yolov5s6_raw_e300/weights/best.pt", map_location="cpu")["model"]
|
||||||
|
model.eval()
|
||||||
|
|
||||||
|
x = torch.randn(1, 3, 640, 640)
|
||||||
|
y = model(x)
|
||||||
|
|
||||||
|
if isinstance(y, (list, tuple)):
|
||||||
|
for o in y:
|
||||||
|
print(o.shape)
|
||||||
|
else:
|
||||||
|
print(y.shape)
|
||||||
Reference in new issue
Block a user