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

Is the correct inference method? #25

Open
volcano1995 opened this issue Feb 3, 2021 · 2 comments
Open

Is the correct inference method? #25

volcano1995 opened this issue Feb 3, 2021 · 2 comments

Comments

@volcano1995
Copy link

Hi, I use your released models with transformers and try to do the inference. However, the test results are not so good. So I wonder if my inference method is correct. During this process, I ran into a few problems:

  1. The annotation bboxes should transfer into the tokens in your voc, but how to combine the tokens' labels to the bboxes' label?For example, "Hello" may be divided into "he" "llo", and their labels are "1" "8", then how to define the label of "hello"? I try to recover the label with the first token, as above, I use the "he"'s label "1" as the "hello"'s label. Is it correct?
  2. For the document contains more the 512 tokens, for example 782, I divided into 512 and 270 independant input to the model, and concat the results. Is it correct?
  3. For the "zero area" tokens, such as[23, 405, 23, 407], do you calculate the area?
    Thanks a lot for your attention, I'm looking forward to your reply.
@liminghao1630
Copy link
Collaborator

  1. We use the label of the whole world as the label of the first token. The rest tokens are labeled by "CrossEntropyLoss().ignore_index" which will be ignored when computing the loss.
  2. Yes.
  3. We don't calculate the area. The "zero-area" tokens are included in the data.

@spencer-hong
Copy link

@volcano1995 Hi, were you able to figure out the correct inference method that achieves similar accuracy as reported? I am also trying to run inference, and getting very low accuracy on the validation set.

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

3 participants