Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem about Inference? #52

Open
ranpin opened this issue Apr 24, 2023 · 10 comments
Open

problem about Inference? #52

ranpin opened this issue Apr 24, 2023 · 10 comments

Comments

@ranpin
Copy link

ranpin commented Apr 24, 2023

In mmdet-sam I tried a the code you gave as an example of inference using DINO and SAM model and got the predicted json file. The last image is my result, the first problem is that I am not sure if it is working and getting the correct annotation and segmentation results? It looks like garbled code, I used utf-8 just. The second problem is that the json file obtained from this inference result is in standard coco format by default?

image
the following is my commands.
image
the results follows:
image

@hhaAndroid
Copy link
Collaborator

@ranpin Did you solve the problem?

@ranpin
Copy link
Author

ranpin commented Apr 25, 2023

@ranpin Did you solve the problem?

No, I didn't. Nobady discussed with me.

@xin-li-67
Copy link
Collaborator

@ranpin Hi, I did a quick run following the README instruction, and there was no coming issue.

Here is a screenshot using the predicted anno file.

image

@ranpin
Copy link
Author

ranpin commented Apr 25, 2023

@ranpin Hi, I did a quick run following the README instruction, and there was no coming issue.

Here is a screenshot using the predicted anno file.

image

Yes, it has no problem running. My confusion is :

  1. the conut part in segmentation we get looks like garbled code, is this normal? Or is this coco's RLE format and it just looks like this with no problem?
  2. is this json file is the standard coco format? Because the readme profile says that you do not generate coco.json files with annatation. But it has.

@xin-li-67
Copy link
Collaborator

@ranpin Hi, I did a quick run following the README instruction, and there was no coming issue.
Here is a screenshot using the predicted anno file.
image

Yes, it has no problem running. My confusion is :

  1. the conut part in segmentation we get looks like garbled code, is this normal? Or is this coco's RLE format and it just looks like this with no problem?
  2. is this json file is the standard coco format? Because the readme profile says that you do not generate coco.json files with annatation. But it has.
  1. Yes, that's normal. These information may help you:
    (1) coco_style_eval.py
    (2) cocoapi issue#135
    (3) pycocotools source code
  2. It is standard coco format.

@ranpin
Copy link
Author

ranpin commented Apr 26, 2023

@ranpin Hi, I did a quick run following the README instruction, and there was no coming issue.
Here is a screenshot using the predicted anno file.
image

Yes, it has no problem running. My confusion is :

  1. the conut part in segmentation we get looks like garbled code, is this normal? Or is this coco's RLE format and it just looks like this with no problem?
  2. is this json file is the standard coco format? Because the readme profile says that you do not generate coco.json files with annatation. But it has.
  1. Yes, that's normal. These information may help you:
    (1) coco_style_eval.py
    (2) cocoapi issue#135
    (3) pycocotools source code
  2. It is standard coco format.

ok, thank you. But, there is still a problem. You say that It is standard coco format. But due to the result of generated json cat_coco.json, it's not the same as the standard coco format. the category is not ture, i think it's better to keep align as well as the other categories.

the result of generated json cat_coco.json looks like this.
image

the standard coco format looks like this.
image

@JosonChan1998
Copy link
Collaborator

@ranpin Hi, I did a quick run following the README instruction, and there was no coming issue.
Here is a screenshot using the predicted anno file.
image

Yes, it has no problem running. My confusion is :

  1. the conut part in segmentation we get looks like garbled code, is this normal? Or is this coco's RLE format and it just looks like this with no problem?
  2. is this json file is the standard coco format? Because the readme profile says that you do not generate coco.json files with annatation. But it has.
  1. Yes, that's normal. These information may help you:
    (1) coco_style_eval.py
    (2) cocoapi issue#135
    (3) pycocotools source code
  2. It is standard coco format.

ok, thank you. But, there is still a problem. You say that It is standard coco format. But due to the result of generated json cat_coco.json, it's not the same as the standard coco format. the category is not ture, i think it's better to keep align as well as the other categories.

the result of generated json cat_coco.json looks like this. image

the standard coco format looks like this. image

The categories depend on the cat/class_with_id.txt and you can customize your categories.

@ranpin
Copy link
Author

ranpin commented Apr 27, 2023

@ranpin Hi, I did a quick run following the README instruction, and there was no coming issue.
Here is a screenshot using the predicted anno file.
image

Yes, it has no problem running. My confusion is :

  1. the conut part in segmentation we get looks like garbled code, is this normal? Or is this coco's RLE format and it just looks like this with no problem?
  2. is this json file is the standard coco format? Because the readme profile says that you do not generate coco.json files with annatation. But it has.
  1. Yes, that's normal. These information may help you:
    (1) coco_style_eval.py
    (2) cocoapi issue#135
    (3) pycocotools source code
  2. It is standard coco format.

ok, thank you. But, there is still a problem. You say that It is standard coco format. But due to the result of generated json cat_coco.json, it's not the same as the standard coco format. the category is not ture, i think it's better to keep align as well as the other categories.
the result of generated json cat_coco.json looks like this. image
the standard coco format looks like this. image

The categories depend on the cat/class_with_id.txt and you can customize your categories.

I find that cat/class_with_id.txt only clarify the categories. for example cat. Then, how can i modify related category id to "17 " and supercategory to "animal"?
image

@JosonChan1998
Copy link
Collaborator

@ranpin Hi, I did a quick run following the README instruction, and there was no coming issue.
Here is a screenshot using the predicted anno file.
image

Yes, it has no problem running. My confusion is :

  1. the conut part in segmentation we get looks like garbled code, is this normal? Or is this coco's RLE format and it just looks like this with no problem?
  2. is this json file is the standard coco format? Because the readme profile says that you do not generate coco.json files with annatation. But it has.
  1. Yes, that's normal. These information may help you:
    (1) coco_style_eval.py
    (2) cocoapi issue#135
    (3) pycocotools source code
  2. It is standard coco format.

ok, thank you. But, there is still a problem. You say that It is standard coco format. But due to the result of generated json cat_coco.json, it's not the same as the standard coco format. the category is not ture, i think it's better to keep align as well as the other categories.
the result of generated json cat_coco.json looks like this. image
the standard coco format looks like this. image

The categories depend on the cat/class_with_id.txt and you can customize your categories.

I find that cat/class_with_id.txt only clarify the categories. for example cat. Then, how can i modify related category id to "17 " and supercategory to "animal"? image

Currently, it doesn't support this feature, you can change it in the source code in

category_item['supercategory'] = 'none'

category_item['id'] = int(category_id)

@ranpin
Copy link
Author

ranpin commented Apr 27, 2023

@ranpin Hi, I did a quick run following the README instruction, and there was no coming issue.
Here is a screenshot using the predicted anno file.
image

Yes, it has no problem running. My confusion is :

  1. the conut part in segmentation we get looks like garbled code, is this normal? Or is this coco's RLE format and it just looks like this with no problem?
  2. is this json file is the standard coco format? Because the readme profile says that you do not generate coco.json files with annatation. But it has.
  1. Yes, that's normal. These information may help you:
    (1) coco_style_eval.py
    (2) cocoapi issue#135
    (3) pycocotools source code
  2. It is standard coco format.

ok, thank you. But, there is still a problem. You say that It is standard coco format. But due to the result of generated json cat_coco.json, it's not the same as the standard coco format. the category is not ture, i think it's better to keep align as well as the other categories.
the result of generated json cat_coco.json looks like this. image
the standard coco format looks like this. image

The categories depend on the cat/class_with_id.txt and you can customize your categories.

I find that cat/class_with_id.txt only clarify the categories. for example cat. Then, how can i modify related category id to "17 " and supercategory to "animal"? image

Currently, it doesn't support this feature, you can change it in the source code in

category_item['supercategory'] = 'none'

category_item['id'] = int(category_id)

ok, thank you. I have no problem. But I still hope that you can support it some day. This will bring great convenience to our ordinary users.Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants