TypeError: Unsupported format: <built-in function format> #1855
Unanswered
frankstorming
asked this question in
Q&A
Replies: 1 comment 5 replies
-
https://mmocr.readthedocs.io/en/dev-1.x/basic_concepts/datasets.html#recogtextdataset |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to convert the RCTW format,then the bug came.I can't solve it.
Error Traceback:
It takes 13.648082733154297s to convert RCTW Training annotation
Traceback (most recent call last):
File "/home/kzx22/ocr/mmocr/tools/dataset_converters/textrecog/rctw_converter.py", line 238, in
main()
File "/home/kzx22/ocr/mmocr/tools/dataset_converters/textrecog/rctw_converter.py", line 227, in main
generate_ann(root_path, 'training', trn_infos, args.preserve_vertical)
File "/home/kzx22/ocr/mmocr/tools/dataset_converters/textrecog/rctw_converter.py", line 196, in generate_ann
dump_ocr_data(img_info, dst_label_file, 'textrecog')
File "/home/kzx22/ocr/mmocr/mmocr/utils/data_converter_utils.py", line 127, in dump_ocr_data
mmengine.dump(out_json, out_json_name, **kwargs)
File "/home/kzx22/anaconda3/envs/mmocr/lib/python3.9/site-packages/mmengine/fileio/io.py", line 908, in dump
raise TypeError(f'Unsupported format: {file_format}')
TypeError: Unsupported format:
image_1.txt format:
2668,376,2832,376,2832,347,2668,347,0,"2号直流屏电源"
2681,402,2825,402,2825,379,2681,379,0,"4141065开关"
2657,1101,2828,1101,2828,1072,2657,1072,0,"2#UPS旁路电源"
2674,1129,2816,1129,2816,1102,2674,1102,0,"4141066开关"
637,392,772,392,772,365,637,365,0,"备用(电动机)"
643,415,772,415,772,394,643,394,0,"4141085开关"
662,442,753,442,753,421,662,421,0,"4kW8 2A"
645,1052,697,1052,697,1021,645,1021,0,"备用"
614,1081,745,1081,745,1052,614,1052,0,"4141086开关"
630,1108,724,1108,724,1081,630,1081,0,"4KW7.9A"
2680,1929,2849,1929,2849,1892,2680,1892,0,"4141067开关"
2682,1896,2841,1896,2841,1846,2682,1846,0,"EPS之电源"
508,1752,699,1752,699,1722,508,1722,0,"200#1楼上墙角风机"
541,1777,670,1777,670,1750,541,1750,0,"4141087开关"
545,1802,668,1802,668,1779,545,1779,0,"22kW42.4A"
Finally I print the json_name
print(out_json_name):
out_json_name: data/rctw/train_label.
Beta Was this translation helpful? Give feedback.
All reactions