You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, it's really great to find the project, I have being searching this for several days and almost give up. I sincerely thank you developing this awesome tool, but i meet with a problem using it to build my dataset.
below is my code, basically i loop twice and for each time I read a image and mask, then create annoation, then use Dataset.add method adding them to the dataset
data = imantics.Dataset(name='allen_342')`
for i in tqdm(range(2)):`
image = imantics.Image.from_path('/mydir/image_{}.png'.format(i))
mask_array =cv2.imread(/mydir/mask_{}.png'.format(i),cv2.IMREAD_GRAYSCALE)
mask=imantics.Mask(mask_array)
ann=(imantics.Annotation.from_mask(mask,image,imantics.Category('cell')))
data.add(image)
data.add(ann)
out = data.coco()
the problem is , i got very strange output which is
for i==0
the annotations add, but there are only one annotation for each loop, the origin mask have multiple area for each image.
the annotation['image_id'] and the images['id'] always 0, however, the file_name did change
I read about the docus, maybe the Dataset is not a "dataset" but a handle to iterator the image and annos? but even though this doesn't make sense anyway. For,example, the new add anno has the same image_id with the previous one.
How can I make ONE json file with images contains multiple object in each one for future train ? Thank you,
The text was updated successfully, but these errors were encountered:
Hi, it's really great to find the project, I have being searching this for several days and almost give up. I sincerely thank you developing this awesome tool, but i meet with a problem using it to build my dataset.
below is my code, basically i loop twice and for each time I read a image and mask, then create annoation, then use
Dataset.add
method adding them to the datasetthe problem is , i got very strange output which is
for
i==0
for
i==1
allow me to point out the problems.
annotation['image_id']
and theimages['id']
always 0, however, the file_name did changeI read about the docus, maybe the Dataset is not a "dataset" but a handle to iterator the image and annos? but even though this doesn't make sense anyway. For,example, the new add anno has the same
image_id
with the previous one.How can I make ONE json file with images contains multiple object in each one for future train ? Thank you,
The text was updated successfully, but these errors were encountered: