question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get the evaluations

See original GitHub issue

Hello, I already trained my own dataset that is in coco format, but it has different classes.

If I understand correctly I need to set MetadataCatalog.get(dataset_name).evaluator_type

and I try to run the following code to get the evaluations

MetadataCatalog.get("dataset_name").evaluator_type="coco"
cfg.DATASETS.TEST = ("dataset_name",)  
cfg.MODEL.WEIGHTS = os.path.join("output/model_final.pth")
model = DefaultTrainer.build_model(cfg)
DetectionCheckpointer(model, save_dir=cfg.OUTPUT_DIR).resume_or_load(cfg.MODEL.WEIGHTS)
res = DefaultTrainer.test(cfg, model)

But I got this error NotImplementedError: Please either implement build_evaluator() in subclasses, or pass your evaluator as arguments to DefaultTrainer.test().

Thank you for your attention.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23

github_iconTop GitHub Comments

2reactions
insanesaccommented, Apr 29, 2021

I could make it work by being sure the train/test split was the same as the one I used during training. The easiest was to evaluate in the same script. Using V7labs I could pull and split several times (GPU and local machine) and that was the reason I had only 0.0 as AP, because the test on my local machine was not the same as the one on GPU

I have separate train and test datasets. It works without any issue if I do the evaluation in the same script as training. But when I try to evaluate in a separate script after loading my model, I get empty APs.

2reactions
djpecotcommented, Jan 6, 2020

For anyone using Colab, if you put this in at the front of your code with the rest of the detectron installs, seems to do the trick: !pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 steps to request a free school evaluation - Understood.org
6 steps to request a free school evaluation · 1. Find out where to send your request. · 2. Write a letter or...
Read more >
6 Secrets to Getting a Better Performance Evaluation
3. Evaluate yourself first. Some companies build self-assessments into their evaluation processes, and so you might be asked to fill out a self- ......
Read more >
How To Get A Core Evaluation Completed Through Your ...
The first step in obtaining your child's testing evaluation through the public school system is to make a referral, or request for testing,...
Read more >
How to get your Credential Evaluations for the U.S.
To get your credential evaluation done first you need to choose an agency that provides credential evaluations.
Read more >
10 self-evaluation tips for a better performance review - CIO
Self-assessment is critical to your long-term career success. Hereu2019s how to examine your performance, determine the progress youu2019ve ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found