MhLiao / MaskTextSpotter

A PyTorch implementation of Mask TextSpotter
https://github.com/MhLiao/MaskTextSpotter
412 stars 94 forks source link

Evaluation: Calculated!{"precision": 0, "recall": 0.0, "hmean": 0, "AP": 0} #75

Open HHeracles opened 4 years ago

HHeracles commented 4 years ago

Hello @MhLiao ,when I have run the command “cd evaluation/icdar2015/e2e/” and “python script.py”,I used the downloaded model “model_finetune.pth” and the icdar2015.But the output is ”Calculated!{"precision": 0, "recall": 0.0, "hmean": 0, "AP": 0}“. I don't know why. I looked at the code and found that folder ”/outputs/finetune/inference/icdar_2015_test/model_finetune_1600_results/“ was missing.How do I get folder" /outputs/finetune/inference/icdar_2015_test/model_finetune_1600_results/"?

MhLiao commented 4 years ago

@HHeracles You should run the testing and then you will have the results directory. For the evaluation, you should set the result directory as your own.

HHeracles commented 4 years ago

@MhLiao Thanks for your kind reply. I got your points and have solved the problem .But then I have the following three questions.

First,I set parameters “TEST: ("icdar_2015_test",),DATALOADER:(NUM_WORKERS: 0)”,and the other parameters are the default values that you provide.Then I do the following: (1),sh test.sh; (2), cd evaluation/icdar2015/e2e/; (3), python script.py. but I get the result is "Calculated!{"precision": 0.8910947249007374, "recall": 0.7563793933558016, "hmean": 0.8182291666666666, "AP": 0} ".The result is right?

Second,What should I do if I just want to get the detection results, such as the data in Table 1 in your paper? Do I need to modify the ROI_MASK_HEAD parameter “MASK_ON: false” or other parameters ,then to retrain the model?

Third,when I have run the command "python3 -m torch.distributed.launch --nproc_per_node=8 tools/train_net.py --config-file configs/finetune.yaml" with one GPU ,I got the error "File "/MaskTextSpotter/maskrcnn_benchmark/engine/trainer.py", line 64, in targets = [target.to(device) for target in targets] AttributeError: 'NoneType' object has no attribute 'to'"Do I need to change the code in the data load section to solve this problem?

HHeracles commented 4 years ago

@MhLiao Thank you for your reply. I will try again as you suggest.

gtb1551050818 commented 2 years ago

@MhLiao Thanks for your kind reply. I got your points and have solved the problem .But then I have the following three questions.

First,I set parameters “TEST: ("icdar_2015_test",),DATALOADER:(NUM_WORKERS: 0)”,and the other parameters are the default values that you provide.Then I do the following: (1),sh test.sh; (2), cd evaluation/icdar2015/e2e/; (3), python script.py. but I get the result is "Calculated!{"precision": 0.8910947249007374, "recall": 0.7563793933558016, "hmean": 0.8182291666666666, "AP": 0} ".The result is right?

Second,What should I do if I just want to get the detection results, such as the data in Table 1 in your paper? Do I need to modify the ROI_MASK_HEAD parameter “MASK_ON: false” or other parameters ,then to retrain the model?

Third,when I have run the command "python3 -m torch.distributed.launch --nproc_per_node=8 tools/train_net.py --config-file configs/finetune.yaml" with one GPU ,I got the error "File "/MaskTextSpotter/maskrcnn_benchmark/engine/trainer.py", line 64, in targets = [target.to(device) for target in targets] AttributeError: 'NoneType' object has no attribute 'to'"Do I need to change the code in the data load section to solve this problem?

Hello, about your second question, I also want to get the detection results and evaluate them. What should I do? Can you help me? Thank you