rec-attend-public icon indicating copy to clipboard operation
rec-attend-public copied to clipboard

Error in CVPPP - num_train should be an integer

Open alivcor opened this issue 7 years ago • 0 comments

Running ./setup_cvppp.sh throws following error:

Traceback (most recent call last):
  File "./setup_cvppp.py", line 21, in <module>
    main()
  File "./setup_cvppp.py", line 13, in main
    os.path.join(train_folder, subset), opt, split=split).assemble()
  File "/Users/abhinandandubey/Library/Mobile Documents/com~apple~CloudDocs/S17/cell-division/f17/rec-attend-public/data_api/cvppp.py", line 25, in __init__
    super(CVPPPAssembler, self).__init__(opt, output_fname)
  File "/Users/abhinandandubey/Library/Mobile Documents/com~apple~CloudDocs/S17/cell-division/f17/rec-attend-public/data_api/ins_seg_assembler.py", line 21, in __init__
    self.img_ids = self.read_ids()
  File "/Users/abhinandandubey/Library/Mobile Documents/com~apple~CloudDocs/S17/cell-division/f17/rec-attend-public/data_api/cvppp.py", line 32, in read_ids
    self.write_split()
  File "/Users/abhinandandubey/Library/Mobile Documents/com~apple~CloudDocs/S17/cell-division/f17/rec-attend-public/data_api/cvppp.py", line 81, in write_split
    train_ids = image_ids[idx[:num_train]]
TypeError: slice indices must be integers or None or have an __index__ method

Line 81 in write_split method has num_train variable which holds a float value, should be changed to integer value:

print(num_train)
103.0

alivcor avatar Oct 02 '17 21:10 alivcor