row_s, row_e = box[1], box[3]
col_s, col_e = box[0], box[2]
masks[row_s:row_e, col_s:col_e, i] = 1--throws an error
class_ids.append(self.class_names.index('bacterialblight'))
return masks, asarray(class_ids, dtype='int32')
我需要浮点值才能为对象创建掩码。代码错误表示索引必须具有整数值,但要求是浮点值。
尝试将numpy降级为1.17
数组的索引不能为浮点数。
例如matrix_A [1.1]没有任何意义。
确保row_s,row_e,col_s,col_e和i等是索引