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 fellow researchers,
I have encountered a problem and need a bit of clarification and help. Kindly read the following..
Steps to try:
Annotate the same objects (2 or more) in an image by using a rectangle (Not polygons)
Save the file as json.
Convert the existing json to coco format using the labelme2coco.py file.
Compare the jsons.
I see that there is only one bbox field in the coco converted json though there are more than one bbox in the image. But the number of segmentations in the coco converted json matches with the non coco json file.
Is this an issue with the code? Or is this intended to be like this?
Kindly clarify.
The text was updated successfully, but these errors were encountered:
I replaced lines 109 to 125 in the original labelme2coco.py file with the following, renaming labels to person-1, person-2, etc, before adding them to the coco annotations file.
masks = {} # for area
segmentations = collections.defaultdict(list) # for segmentation
labels_indices = {}
for shape in label_data['shapes']:
points = shape['points']
label = shape['label']
shape_type = shape.get('shape_type', None)
mask = labelme.utils.shape_to_mask(
img.shape[:2], points, shape_type
)
if label in masks:
labels_indices[label] += 1
label=label+"-"+str(labels_indices[label])
else:
labels_indices[label]=0
masks[label] = mask
Hi fellow researchers,
I have encountered a problem and need a bit of clarification and help. Kindly read the following..
Steps to try:
I see that there is only one bbox field in the coco converted json though there are more than one bbox in the image. But the number of segmentations in the coco converted json matches with the non coco json file.
Is this an issue with the code? Or is this intended to be like this?
Kindly clarify.
The text was updated successfully, but these errors were encountered: