Closed xcharxlie closed 3 years ago
Here's the setting
sys.platform linux
Python 3.8.10 (default, Jun 4 2021, 15:09:15) [GCC 7.5.0]
numpy 1.20.2
detectron2 0.1.3 @/home/CN/zizhang.wu/zzr/AdelaiDet/detectron2/detectron2
Compiler GCC 5.5
CUDA compiler CUDA 10.2
detectron2 arch flags sm_75
DETECTRON2_ENV_MODULE
PyTorch built with:
[07/15 13:38:25] detectron2 INFO: Command line arguments: Namespace(config_file='configs/BAText/TotalText/attn_R_50.yaml', dist_url='tcp://127.0.0.1:51458', eval_only=False, machine_rank=0, num_gpus=4, num_machines=1, opts=[], resume=False) [07/15 13:38:25] detectron2 INFO: Contents of args.config_file=configs/BAText/TotalText/attn_R_50.yaml: BASE: "Base-TotalText.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 BATEXT: RECOGNIZER: "attn" # "attn" "rnn" SOLVER: IMS_PER_BATCH: 8 BASE_LR: 0.001 MAX_ITER: 5000 CHECKPOINT_PERIOD: 1000
OUTPUT_DIR: "outputs2/batext/totaltext/attn_R_50"
@xcharxlie Have you used the pretrained model to finetune on your own dataset? If you start training from scratch, you may need a lot of synthetic data and longer iterations. Using the syntext-curved data we provided is an alternative.
@xcharxlie Have you used the pretrained model to finetune on your own dataset? If you start training from scratch, you may need a lot of synthetic data and longer iterations. Using the syntext-curved data we provided is an alternative.
@Yuliang-Liu That makes sense. I didn’t pretrained it well so the model sucks. I have a question regarding the pretraning, like which dataset I should pretrain? I looked into the confit file and it says it would pretrained the syntext1, syntext2 and TotalText and mlt? Since training all of them may take a loooong time, should I really pretrain all of them or just choose anyone. Thank you!
@xcharxlie I would recommend to follow the default pretraining setting. It may take about one day training on all data using 8 V100, which shouldn't be too long.
@Yuliang-Liu I hope so as well. But due to some technical difficulties, I only have 4 GPU right now and I just checked it may take more than 2 days to just pretrain the totaltext train_images, so I would train this dataset first and see how it goes. If that doesn't work, I would try to get more GPUs for a better pretraining. Also another question, how many training images are recommended for fine-tuning? Thank you so much.
@xcharxlie The number of data does not actually change the training time. The training time should be mainly related to the number of the iterations you set, no matter how many data you use.
@Yuliang-Liu Thank you so much. One more question, sometimes the program would make little mistakes like recognizing '0' as 8. Now I'm trying to evaluate the model by checking the precision, but ended up with this error.
File "tools/train_net.py", line 212, in
I saw another thread talking about the same problem, but I don't quite understand what he meant by zipping the datasets. Which dataset should I zip then?
Also, there's another question: where could I find the training accuracy? Didn't see that in the log file. Thank you so much!
@xcharxlie We have provided an evaluation_example_script here.
There is not training accuracy in the current version.
I trained my own datasets and now in the testing stage, using 4 GPU and all TotalTextdefault settings(5000 iterations). However, it seems like all the outputs(which is the feature "rec" in the annotation) are the same for some reason.It looks like Issue 371. How could I fix it?