File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 33# Modified based on https://github.com/XuJiacong/PIDNet
44# ------------------------------------------------------------------------------
55# ------------------------------------------------------------------------------
6- # example command: python3 tools\custom.py --model-type 'pidnet-l' --model output\elanroad\best.pt --input samples\Cam5.mp4 --n-class 2 --visualize --show
6+ # example command: python tools\custom.py --model-type 'pidnet-l' --model output\elanroad\pidnet_large_elan_HSV_MBA\ best.pt --input samples\road.jpg --n-class 2 --visualize --show
77# ------------------------------------------------------------------------------
88
99import glob
@@ -93,7 +93,7 @@ def main(args):
9393 t1 = time_synchronized ()
9494 pred = model (img )
9595 t2 = time_synchronized ()
96- pred = F .interpolate (pred , size = img . size ()[ - 2 : ],
96+ pred = F .interpolate (pred , size = imgOrigin . shape [: - 1 ],
9797 mode = 'bilinear' , align_corners = True )
9898 pred = torch .argmax (pred , dim = 1 ).squeeze (0 ).cpu ().numpy ()
9999
You can’t perform that action at this time.
0 commit comments