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

evaluation during training #134

Open
seacloud-0420 opened this issue May 7, 2022 · 3 comments
Open

evaluation during training #134

seacloud-0420 opened this issue May 7, 2022 · 3 comments

Comments

@seacloud-0420
Copy link

Does this code support evaluation during training? If I want to evaluate while training, what should I do?

@csuhan
Copy link
Owner

csuhan commented May 7, 2022

Yes.

@seacloud-0420
Copy link
Author

Thank you for your answer, I have changed it as you said, but the training appears: NoteImplementedError:Built-in validation is not implemented yet in not_distributed training. Use distributed training or test.py and *eval.py scripts instead.
Also, I made my dataset according to the format of the DOTA dataset, the object in my dataset is relatively large and it is not suitable for split, I did not split my dataset. I got an error when I tested my own dataset, as shown in the image below. Is this code not suitable for the uncut DOTA data format, if so how do I need to change it?
1651911029(1)

@csuhan
Copy link
Owner

csuhan commented May 8, 2022

Ohh I'm sorry. I checked again, and this codebase does not support eval during training. It just support testing-then-evaluation (in one command) if you setup the evaluation config.

If the images in your dataset is small and do not need to split, you can comment L26-27

def evaluate(self, results, work_dir=None, gt_dir=None, imagesetfile=None):
dst_raw_path = osp.join(work_dir, 'results_before_nms')
dst_merge_path = osp.join(work_dir, 'results_after_nms')
mmcv.mkdir_or_exist(dst_raw_path)
mmcv.mkdir_or_exist(dst_merge_path)
print('Saving results to {}'.format(dst_raw_path))
self.result_to_txt(results, dst_raw_path)
print('Merge results to {}'.format(dst_merge_path))
mergebypoly(dst_raw_path, dst_merge_path)
print('Start evaluation')
detpath = osp.join(dst_merge_path, '{:s}.txt')
annopath = osp.join(gt_dir, '{:s}.txt')

Besides, you many need to change something in your result files, see this issue

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