FastSAM icon indicating copy to clipboard operation
FastSAM copied to clipboard

TypeError: 'int' object is not subscriptable

Open penglu666 opened this issue 2 years ago • 0 comments

when run python Inference.py --model_path ./weights/FastSAM-x.pt --img_path ./images/dogs.jpg --box_prompt "[570,200,230,400]" in README.md this error occurs: Traceback (most recent call last): File "Inference.py", line 121, in <module> main(args) File "Inference.py", line 93, in main if args.box_prompt[0][2] != 0 and args.box_prompt[0][3] != 0: TypeError: 'int' object is not subscriptable so, the correct code should be: python Inference.py --model_path ./weights/FastSAM-x.pt --img_path ./images/dogs.jpg --box_prompt "[[570,200,230,400]]"

penglu666 avatar Jul 04 '23 12:07 penglu666