-
Hi everyone, I have implemented a custom evaluation Hook, let's call it I have tried inserting it as a custom hook in the config file
But it breaks because it doesn't get in input the data loader. I have also tried to insert it in the config as
but it also breaks because it doesn't know what to do with the Obviously the file of Any way to use MyEvalHook? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I believe you have to modify the code in mmdet/apis/train.py to get what you want in this line mmdetection/mmdet/apis/train.py Line 193 in ff9bc39 Change this snippet eval_hook = DistEvalHook if distributed else EvalHook runner.register_hook( eval_hook(val_dataloader, **eval_cfg), priority='LOW') to
|
Beta Was this translation helpful? Give feedback.
I believe you have to modify the code in mmdet/apis/train.py to get what you want in this line
mmdetection/mmdet/apis/train.py
Line 193 in ff9bc39
Change this snippet
eval_hook = DistEvalHook if distributed else EvalHook runner.register_hook( eval_hook(val_dataloader, **eval_cfg), priority='LOW')
to
eval_hook = MyDistEvalHook if distributed else MyEvalHook runner.register_hook( eval_hook(val_dataloader, **eval_cfg), priority='LOW')
So you may also have to implement MyDistEvalHook for distributed training.
You can refer to DistEvalHook to implement your custom counterpart, like you did with MyEvalHook.
Best.