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 when reproducing the classification performance #44

Closed
Amy-Liao opened this issue Jul 18, 2022 · 2 comments
Closed

Problem when reproducing the classification performance #44

Amy-Liao opened this issue Jul 18, 2022 · 2 comments

Comments

@Amy-Liao
Copy link

Hi, sorry for bothering. I used validation set as test dataset by cd ../prepare && python3 fake_testing_set.py and tried to reproduce the paper evaluation results by running !cd ../judge && python3 classification_perf.py inception_v4
However, I got this
image

Performance for 店、路、车 are both 0.0%
And in the "cls_precision_by_model_size" file, I got this
image
The accuracy are all about 0.2

I also have read this issue #29 (comment) , but I did run your classsification/decide_cates.py without modification to generate cates.json. What reasons might it be for the performance I got?
Thanks for your help :)

@yuantailing
Copy link
Owner

yuantailing commented Jul 18, 2022

To use the pre-trained model, we should use the real train.jsonl and eval.jsonl, not the fake data generated by fake_testing_set.py .

You can run cp ../data/annotations/downloads/*.jsonl ../data/annotations/ and then python3 decide_cates.py. As a result, the top-10 categories in cates.json are

  {
    "cate_id": 0,
    "text": "中",
    "trainval": 13924
  },
  {
    "cate_id": 1,
    "text": "国",
    "trainval": 9410
  },
  {
    "cate_id": 2,
    "text": "大",
    "trainval": 8843
  },
  {
    "cate_id": 3,
    "text": "电",
    "trainval": 6908
  },
  {
    "cate_id": 4,
    "text": "店",
    "trainval": 6622
  },
  {
    "cate_id": 5,
    "text": "路",
    "trainval": 6555
  },
  {
    "cate_id": 6,
    "text": "车",
    "trainval": 6541
  },
  {
    "cate_id": 7,
    "text": "家",
    "trainval": 6200
  },
  {
    "cate_id": 8,
    "text": "公",
    "trainval": 5946
  },
  {
    "cate_id": 9,
    "text": "行",
    "trainval": 5672
  },

@Amy-Liao
Copy link
Author

Thank you so much!
I've successfully reproduced the performance :)
image

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

2 participants