unable to load coco json file
Closed this issue · 3 comments
rajendra2 commented
filename="instances_train2017.json"
with open(filename) as f:
data = json.load(f)
dataset = imantics.Dataset.from_coco(data)
for annotation in dataset.annotations:
print (annotation)
The above code does not work. The init() in the Image class is overwriting the self. Subsequent initialization in the code are not reflected in caller function, as caller gets different self.
If I comment out the following, then I am able to load the json file.
if len(path) != 0 and image_array is None:
pass
#self = Image.from_path(path)
sonvx commented
I fixed those bugs in this fork, feel free to use it: https://github.com/sonvx/imantics.