open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
28.52k stars 9.29k forks source link

how use tensorboard to show train log file #11701

Open yfq512 opened 1 month ago

yfq512 commented 1 month ago

I'am training faster_rcnn model. and I get some log file. now, how use tensorboard to show train log file? train log file tree

work_dirs/mepu_detect_data_merg_0510/
├── 20240510_030714
│   ├── 20240510_030714.log
│   └── vis_data
│       ├── 20240510_030714.json
│       ├── config.py
│       └── scalars.json
├── epoch_1.pth
├── epoch_2.pth
├── epoch_3.pth
├── last_checkpoint
└── mepu_det_data_0510.py

run tensorboard:

tensorboard --logdir=./work_dirs/mepu_detect_data_merg_0510/20240510_030714/20240510_030714.log --port 8000 --bind_all

but, tensorboard show "No dashboards are active for the current data set."

can you help me?

DarkFlameSword commented 1 month ago

I'am training faster_rcnn model. and I get some log file. now, how use tensorboard to show train log file? train log file tree

work_dirs/mepu_detect_data_merg_0510/
├── 20240510_030714
│   ├── 20240510_030714.log
│   └── vis_data
│       ├── 20240510_030714.json
│       ├── config.py
│       └── scalars.json
├── epoch_1.pth
├── epoch_2.pth
├── epoch_3.pth
├── last_checkpoint
└── mepu_det_data_0510.py

run tensorboard:

tensorboard --logdir=./work_dirs/mepu_detect_data_merg_0510/20240510_030714/20240510_030714.log --port 8000 --bind_all

but, tensorboard show "No dashboards are active for the current data set."

can you help me?

in fact, here is no tf log for tensorboard as you showed. I also encounter the same question, according to some info from websites, they say these codes should be added into configurationn log_config = dict( interval=5, # 日志间隔 hooks=[ dict(type='TextLoggerHook'), # 日志钩子 dict(type='TensorboardLoggerHook') # TensorBoard 日志钩子 ]) However, it does not work(no tf log either when training), so I want to know if the latest edtion changes the way to open tensorboard

VadimShabashov commented 1 month ago

However, it does not work

Indeed, it seems the old way doesn't work anymore. Here you can find a note about that: https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/docs/en/migration/config_migration.md#logging-configuration

A new approach is setting vis_backends=[dict(type='TensorboardVisBackend')], as was also mentioned in this comment: https://github.com/open-mmlab/mmdetection/issues/10521#issuecomment-1619960687