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

Can you share the codes for generating GT IIMs? #2

Open
BJTUJia opened this issue Dec 17, 2020 · 8 comments
Open

Can you share the codes for generating GT IIMs? #2

BJTUJia opened this issue Dec 17, 2020 · 8 comments

Comments

@BJTUJia
Copy link

BJTUJia commented Dec 17, 2020

Hi there, thanks for this impressive work! I am interested in trying it out on my own counting dataset which uses a point level annotation. Can you share the script for getting the IIM maps from points or dot maps? Thanks very much!

Congratulations on this amazing work!

@taohan10200
Copy link
Owner

Before generating IIM from dot labels, we used the NWPU dataset to train a head scale prediction model, which estimates the box size for other crowd datasets. The pre-trained model and the script file will be shared after collation.

If you are in a hurry, we recommend that you can take the dilation approach, generating IIM by setting the maximum size or detecting whether the nearest areas are overlapped as the stop condition. This strategy can also generate IIM for point annotations.

Thanks for your attention!

@BJTUJia
Copy link
Author

BJTUJia commented Dec 18, 2020

Thanks! This is very helpful! I will try it out.

@BJTUJia BJTUJia closed this as completed Dec 18, 2020
@gjy3035
Copy link
Collaborator

gjy3035 commented Dec 18, 2020

You may process the following operation:

  1. set a max width or height for each point, such as 50,100.
  2. run the provided pre-processed code to tackle the overlapping.

This operation is not scale-aware, but it is also a type of IIM. It may cause some performance reductions compared with the paper's scheme.

Besides, as @taohan10200 mentioned, we will provide our size regression model ASAP.

@BJTUJia
Copy link
Author

BJTUJia commented Dec 22, 2020

Thanks a lot! @gjy3035 This is quite helpful!

@BJTUJia
Copy link
Author

BJTUJia commented Dec 22, 2020

You may process the following operation:

  1. set a max width or height for each point, such as 50,100.
  2. run the provided pre-processed code to tackle the overlapping.

This operation is not scale-aware, but it is also a type of IIM. It may cause some performance reductions compared with the paper's scheme.

Besides, as @taohan10200 mentioned, we will provide our size regression model ASAP.

@BJTUJia BJTUJia reopened this Dec 22, 2020
@BJTUJia
Copy link
Author

BJTUJia commented Dec 22, 2020

You may process the following operation:

  1. set a max width or height for each point, such as 50,100.
  2. run the provided pre-processed code to tackle the overlapping.

This operation is not scale-aware, but it is also a type of IIM. It may cause some performance reductions compared with the paper's scheme.

Besides, as @taohan10200 mentioned, we will provide our size regression model ASAP.

Hi there, @gjy3035 @taohan10200 thanks a lot for your tips in generating IIMs. However, when I tried it on my own datatset(I set max width==100), the following error occurs. IndexError: index 4 is out of bounds for axis 0 with size 4, which is thrown by this line: dst_point_ = centroids[id[start + 1]]. Since I haven't quite understood your codes yet, I can't figure out what is causing this issue. (ps, it works for some images, but throws this error for others, I can't find the pattern in this error). Can you give me some tips? Thanks very much!

@ashok-arjun
Copy link

Hi @gjy3035 and @taohan10200 .

Thanks for this wonderful work.

Are the scripts and models used to generate GT IIMs from point annotations released?

Thanks.

@taohan10200
Copy link
Owner

Yes, we now have provided the code that can directly generate IIMs with points only. You can find the function generate_masks_with_points() in dataset_prepare/prepare_NWPU.py.

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