-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature]Implement dump results (#8814)
* Implement dump results * support xxxevaluator * update * reuse func
- Loading branch information
Showing
5 changed files
with
51 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) OpenMMLab. All rights reserved. | ||
def trigger_visualization_hook(cfg, args): | ||
default_hooks = cfg.default_hooks | ||
if 'visualization' in default_hooks: | ||
visualization_hook = default_hooks['visualization'] | ||
# Turn on visualization | ||
visualization_hook['draw'] = True | ||
if args.show: | ||
visualization_hook['show'] = True | ||
visualization_hook['wait_time'] = args.wait_time | ||
if args.show_dir: | ||
visualization_hook['test_out_dir'] = args.show_dir | ||
else: | ||
raise RuntimeError( | ||
'VisualizationHook must be included in default_hooks.' | ||
'refer to usage ' | ||
'"visualization=dict(type=\'VisualizationHook\')"') | ||
|
||
return cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters