yl-1993 / learn-to-cluster

Learning to Cluster Faces (CVPR 2019, CVPR 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Training on custom dataset

Sayyam-Jain opened this issue · comments

I want to train on my own dataset. Can you please tell me the steps to do so. How do I generate my own labels.meta file and features.bin file?

Thanks

@Sayyam-Jain DATASET.md gives the description of a dataset. To be specific, features and labels can be generated as follows.

  • features.bin is a bin file containing NxD matrix, which can be saved by write_feat.
  • 'labels.meta' is a text file with N lines, where each line indicates a label of the corresponding features.

@yl-1993 您好,请问在训练自己的数据时出现log_str += 'memory: {}, '.format(log_dict['memory'])
KeyError: 'memory'这个问题要如何解决?

@qiudi0127 您好,能否给出完整的报错信息?我怀疑这个错误是mmcv里的,想要知道一下具体的版本信息以便复现这个问题

@qiudi0127 您好,能否给出完整的报错信息?我怀疑这个错误是mmcv里的,想要知道一下具体的版本信息以便复现这个问题

Traceback (most recent call last):
File "vegcn/main.py", line 104, in
main()
File "vegcn/main.py", line 100, in main
handler(model, cfg, logger)
File "/learn-to-cluster/vegcn/train_gcn_v.py", line 35, in train_gcn_v
_single_train(model, dataset, cfg)
File "/learn-to-cluster/vegcn/train_gcn_v.py", line 65, in _single_train
runner.run(train_data, cfg.workflow, cfg.total_epochs)
File "/miniconda3/envs/lzc-cluster3/lib/python3.6/site-packages/mmcv/runner/runner.py", line 371, in run
epoch_runner(data_loaders[i], **kwargs)
File "/lzc/learn-to-cluster/vegcn/runner/runner.py", line 26, in train_gcnv
self.call_hook('after_train_iter')
File "/miniconda3/envs/lzc-cluster3/lib/python3.6/site-packages/mmcv/runner/runner.py", line 238, in call_hook
getattr(hook, fn_name)(self)
File "/miniconda3/envs/lzc-cluster3/lib/python3.6/site-packages/mmcv/runner/hooks/logger/base.py", line 45, in after_train_iter
self.log(runner)
File "/miniconda3/envs/lzc-cluster3/lib/python3.6/site-packages/mmcv/runner/hooks/logger/text.py", line 109, in log
self._log_info(log_dict, runner)
File "/miniconda3/envs/lzc-cluster3/lib/python3.6/site-packages/mmcv/runner/hooks/logger/text.py", line 50, in _log_info
log_str += 'memory: {}, '.format(log_dict['memory'])
KeyError: 'memory'

我也出现了这个问题