TCMonoDepth icon indicating copy to clipboard operation
TCMonoDepth copied to clipboard

TypeError: 'int' object is not subscriptable

Open makemota opened this issue 3 years ago • 1 comments

Upon running python demo.py --model large --resume ./weights/_ckpt.pt.tar --input ./videos --output ./output --resize_size 384 got an error: Output & Stacktrace:

F:\Depth_estimation\TCMonoDepth-main>python demo.py --model large --resume ./weights/_ckpt.pt.tar --input ./videos --output ./output --resize_size 384
Run Video Depth Sample
Initialize
Device: cuda
Creating model...
Loading model from ./weights/_ckpt.pt.tar
Loading model done...
Traceback (most recent call last):
  File "demo.py", line 148, in <module>
    run(args)
  File "demo.py", line 76, in run
    args.resize_size[0],  #width
TypeError: 'int' object is not subscriptable

makemota avatar Feb 13 '22 19:02 makemota

Managed to successfully run by edit two lines of code:

78            args.resize_size{0},  #width   to  args.resize_size,  #width
79            args.resize_size{1},  #height  to  args.resize_size,  #height

semel1 avatar Feb 14 '22 22:02 semel1