Open artest08 opened 5 years ago
@artest08 i have the some confused when i want add some negative dataset(without object) in could you solve this problem?
Sorry for my late response,
I have made a little change in frontend which is for label in range(generator.num_classes()): if np.array_equal(annotations, np.array([[]])): all_annotations[i][label]=annotations.T else: all_annotations[i][label] = annotations[annotations[:, 4] == label, :4].copy()
Instead of for label in range(generator.num_classes()): all_annotations[i][label] = annotations[annotations[:, 4] == label, :4].copy()
It seems to work but I am not sure whether it is the correct way or not
I have noticed something but I am not sure,
in preprocessing part, in load annotations, there is a line that if len(annots) == 0: annots = [[]] then, this is converted to numpy array.
This is used in Frontend in the evaluation part which is the line all_annotations[i][label] = annotations[annotations[:, 4] == label, :4].copy()
Therefore, when the code tries to reach annotations[:, 4], it pops out an error, I think.
Moreover, np.array([[]]) has a shape of (1,0), in the following part, for the empty annotations, if annotations.shape[0] == 0: is added. However, because of the shape of (1,0), that part probably wont make what is intended.
I may miss some points, if I am misunderstood something or I am wrong, please correct me. Thanks in advance