You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I force the rect variable to be False I have the same results.
I could not find an script argument to change the variable rect to False during testing a pytorch model, so I am wondering why it always need to be True .
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello all.
I trained a pytorch model then tested it
val.py --weights ./runs/train/exp2/weights/best.pt --data ./data/dataset.yaml --task test --imgsz 96 --batch 1 --iou-thres 0.6
exported it to onnx
export.py --weights ./runs/train/exp2/weights/best.pt --imgsz 96 --include onnx
then tested the onnx model
val.py --weights ./runs/train/exp2/weights/best.onnx --data ./data/dataset.yaml --task test --imgsz 96 --batch 1 --iou-thres 0.6
The results are not the same because pytorch test is doing the inference on a different image size (128 and not 96).
And this happens, because the
rect
variable is set toTrue
onval.py
line 172and consequently the image shape is modified on
dataloaders.py
line 567If I force the
rect
variable to beFalse
I have the same results.I could not find an script argument to change the variable
rect
toFalse
during testing a pytorch model, so I am wondering why it always need to beTrue
.Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions