GithubHelp home page GithubHelp logo

yuantailing / ctw-baseline Goto Github PK

View Code? Open in Web Editor NEW
327.0 12.0 88.0 907 KB

Baseline methods for [CTW dataset](https://ctwdataset.github.io/)

License: MIT License

Python 84.54% Shell 2.40% Jupyter Notebook 9.65% C++ 2.71% HTML 0.63% QMake 0.07% Dockerfile 0.01%
ctwdataset chinese-text-detection chinese-text-classification

ctw-baseline's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctw-baseline's Issues

about the run efficiency

thank you for your sharing. I haven't run this respository successfully. Actually the fiIes is so complex and I don't know how to start. I want ask about the efficiency. How many times(average time) does the method run per image. And the trained weight is getting from the lib your mention in paper? How can I use it?

Very slow training speed. Is this expected for my system setup?

I am currently training a model using the Chinese in the Wild image data. My system setup is as follows:

  • OS: Windows Server 2016 Standard
  • RAM: 256 GB
  • Had drive: 6TB
  • Processor: Intel Xeon CPU E5-2687W v4 (24 cores)
  • GPU: NVIDIA Tesla V100-PCIE-16GB

The speed is shown below: Each step takes close to 30 seconds. The training has been running for 2 days, and it's only done 5410 steps, so far. It seems like GPU is getting utilized -- 96% of the GPU memory is used. The CPU also shows quite a bit of activity - e.g., 40% by the Python session in which the training is running.

Also, when I started training, I got the message failed to allocate 15.90G (17071144960 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY. Not sure if this is related

So my question is if the speed I am observing is normal for the kind of computer setup I have, and how I might improve the speed. Thanks!

INFO:tensorflow:Recording summary at step 5315.
INFO:tensorflow:Saving checkpoint to path E:\Projects\TEXT DETECTION\chinese_text_in_the_wild\ctw-baseline-master\classification\products\train_logs_alexnet_v2\model.ckpt
INFO:tensorflow:Recording summary at step 5319.
INFO:tensorflow:global step 5320: loss = 6.8224 (29.31 sec/step)
INFO:tensorflow:Recording summary at step 5323.
INFO:tensorflow:Recording summary at step 5327.
INFO:tensorflow:global step 5330: loss = 6.9395 (29.13 sec/step)
INFO:tensorflow:Recording summary at step 5331.
INFO:tensorflow:Recording summary at step 5335.
INFO:tensorflow:Recording summary at step 5339.
INFO:tensorflow:global step 5340: loss = 6.7953 (34.16 sec/step)
INFO:tensorflow:Recording summary at step 5343.
INFO:tensorflow:Recording summary at step 5347.
INFO:tensorflow:global step 5350: loss = 6.8213 (30.08 sec/step)
INFO:tensorflow:Recording summary at step 5351.
INFO:tensorflow:Recording summary at step 5355.
INFO:tensorflow:Saving checkpoint to path E:\Projects\TEXT DETECTION\chinese_text_in_the_wild\ctw-baseline-master\classification\products\train_logs_alexnet_v2\model.ckpt
INFO:tensorflow:Recording summary at step 5359.
INFO:tensorflow:global step 5360: loss = 6.8168 (29.48 sec/step)
INFO:tensorflow:Recording summary at step 5363.
INFO:tensorflow:Recording summary at step 5367.
INFO:tensorflow:global step 5370: loss = 6.8478 (29.09 sec/step)
INFO:tensorflow:Recording summary at step 5371.
INFO:tensorflow:Recording summary at step 5375.
INFO:tensorflow:Recording summary at step 5376.
INFO:tensorflow:global step 5380: loss = 6.8576 (30.47 sec/step)
INFO:tensorflow:Recording summary at step 5380.
INFO:tensorflow:Recording summary at step 5384.
INFO:tensorflow:Recording summary at step 5388.
INFO:tensorflow:global step 5390: loss = 6.8722 (30.95 sec/step)
INFO:tensorflow:Recording summary at step 5392.

The model cannot converge when training

Hi,

I just followed the instruction to train the SSD model, but the loss can't fall.

At the beginning, the base_lr= 0.001 but the loss=nan
Then, I set a lower base_lr = 0.0001 , the loss drops from 40+ to ~10 ,and don't have any change.
Next, I kill the training and set the base_lr=0.001 and resume to train, the loss = nan again.
So, maybe the 0.01 is too big for the model, I lower learning rate which base_lr= 0.0004, but the loss is aways ~8.

how much the loss in the SSD model will finally be? and can you give me some advice to training the data?

Problem when reproducing the classification performance

Hi, sorry for bothering. I used validation set as test dataset by cd ../prepare && python3 fake_testing_set.py and tried to reproduce the paper evaluation results by running !cd ../judge && python3 classification_perf.py inception_v4
However, I got this
image

Performance for 店、路、车 are both 0.0%
And in the "cls_precision_by_model_size" file, I got this
image
The accuracy are all about 0.2

I also have read this issue #29 (comment) , but I did run your classsification/decide_cates.py without modification to generate cates.json. What reasons might it be for the performance I got?
Thanks for your help :)

如何获取行文本图像和标签?

  1. 行文本可通过截取本行文字的最小外接矩形来获得。如何获得行文本标签?主要是不确定train.jsonl文件中,单个字符出现顺序是否和行文本字符出现顺序一致?

restore the weight of Inception_v4

nvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [3,3,128,768] rhs shape= 5,5,128,768, use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](InceptionV4/AuxLogits/Conv2d_2a/weights, save/RestoreV2:9)]]

like:
tensorflow/tensorflow#18725

when excute ../detection/merge_results.py FileNotFoundError: [Errno 2] No such file or directory: 'products/results/chinese.0.txt'

../dection/products/results/ have files like this:
chinese.00.txt
chinese.01.txt
chinese.02.txt
...........
chinese.01000.txt
FileNotFoundError: [Errno 2] No such file or directory: 'products/results/chinese.0.txt'
and in chinese.00.txt content like this:
0000238_0_0_6 0.005599 168.512253 18.311182 191.943985 73.990639
0000238_0_0_6 0.006422 154.573227 33.430981 174.645065 88.398880
0000238_0_0_6 0.006141 137.837555 49.250305 158.787659 104.747925
.....

so when i chage the filename another error is:
merge_results.py", line 44, in read_one
file_path, cate_id, x, y, w, h, prob = line.split()
ValueError: not enough values to unpack (expected 7, got 6)

Question when running detection_perf.py

I just use train set as "trainval set" + val set as "test set".
And when I run detection_perf.py,I got this output:
image
It's weird that APs of 店,路,车 are all 0.0 %.
So it's means that there're some error heppened?
Or these characters didn't appear in the val set?
Or the other reasons... ?
Thanks for your help. :)

ImportError: No module named model_libs

我尝试在caffe下训练一个模型,发生了这个错误
python train.py
python2 ssd_hardcode/ssd_pascal_512.py
Traceback (most recent call last):
File "ssd_hardcode/ssd_pascal_512.py", line 3, in
from caffe.model_libs import *
ImportError: No module named model_libs
Traceback (most recent call last):
File "train.py", line 35, in
main()
File "train.py", line 31, in main
assert 0 == p.returncode
AssertionError

有几个现在无法处理的问题需要请教帮忙.......

我想要在不训练,使用现有模型的情况下实现图片内文字检测的功能,阅读文档后还有以下的问题:
1、直接使用已有模型,是否需要从tutorial2的部分开始进行呢?还是直接从tutorial3中间开始呢?
2、如果需要下载一部分的图片文件来避免程序报错,是否应该放置在../data/image/下的test和trainval文件夹下?
3、我想要采用google inception模型,下载之后解压,得到的模型文件应该放到哪里?
4、如果想要实现自己的图片检测,图片路径应该在哪里?

Some question about test in detection

I run all the code above python3 eval.py, and set the TEST_GPU_NUM = 2, But ,it run without GPU. I run nvidia-smi,but there are no project . There are just some number on the terminal, like :4 4 4 4 4 8 8 8 8 8 12 12 12 12 12...... , Is this normal?

training for classification does not converge

I tried to train the classification models for alexnet and inception, with the hyperparameters in train.py ( 'learning_rate_decay_type': 'exponential', 'learning_rate': '0.01', 'learning_rate_decay_factor': '0.1'), but the loss fluctuates around 6 and 11 respectively for the two models. I tried to tune the learning rate in the range from 1e-5 to 0.1, but the training still shows no sign of convergence (even after 10,000 steps). Could you inform me of the hyperparameters chosen for the training of the classification models in order to reproduce the results, and the final values of the cross-entropy loss?
screen shot 2018-07-27 at 3 08 18 pm

word level annotations?

thanks for the great dataset.

I looked into the dataset, it is a character-based dataset. and you use detection with different category for recognizing. But my solution is detecting the word bbox then recognizing.

Maybe I can write code to convert the annotation to word format. But it's time consuming. Could you also offer a word level annotation. It maybe much more easy to use for someone like me.

Unable to run eval.py successfully

Hi,I followed your steps in tutorial 3-detection ,but I got some error when I try to run eval.py.
Here is the wrong log:
mask_scale: Using default '1.000000'
Loading weights from products/backup/yolo-chinese_final.weights...conv 5030 1 x 1 / 1 38 x 38 x1024 -> 38 x 38 x5030
30 detection
mask_scale: Using default '1.000000'
Loading weights from products/backup/yolo-chinese_final.weights...Done!
Learning Rate: 0.0001, Momentum: 0.9, Decay: 0.0005
4
Done!
Learning Rate: 0.0001, Momentum: 0.9, Decay: 0.0005
4
8
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/deeplearn/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/deeplearn/anaconda3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/gxwang2/ctw/ctw-baseline/detection/pythonapi/common_tools.py", line 77, in parallel_work
func(*args_list[i], tid=tid)
File "eval.py", line 70, in eval_yolo
assert 0 == p.returncode
AssertionError

Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/deeplearn/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/deeplearn/anaconda3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/gxwang2/ctw/ctw-baseline/detection/pythonapi/common_tools.py", line 77, in parallel_work
func(*args_list[i], tid=tid)
File "eval.py", line 70, in eval_yolo
assert 0 == p.returncode
AssertionError

I changed the num_thread and TEST_NUM_GPU but that doesn't work.
Could you give me some help? Thank you

images-test miss some images

images-test: (https://onedrive.live.com/?authkey=%21AGB7y%5F2e%5Fpd20Tk&id=90370BDE439CA25F%2119397&cid=90370BDE439CA25F)

I downloaded images-test files. But, when I try to create test.pkl and trainval.pkl files, some images could not be found, here I got most name lists of them.

  • [ name_list: ['0000994', '0001002', '0001007', '0001008', '0001009', '0001010', '0001012', '0001013', '0001014', '0001015', '0001016', '0001017', '0001020', '0001021', '0001023', '0001022', '0001024', '0001417', '0001419', '0001970', '0001985', '1000486', '1000487', '1000488', '1000491', '1000493', '1000494', '1000496', '1000501', '1000504', '1000505', '1000508', '1000511', '1000513', '1000515', '1000737', '1000738', '1000739', '1000740', '1000746', '1000747', '1000748', '1000751', '1000753', '1000756', '1000762', '1000763', '1000764', '1000950', '1000949', '1000955', '1000765', '1000956', '1000957', '1000963', '1000964', '1000969', '1000970', '1000971', '1000977', '1000978', '1000980', '1000981', '1000982', '1000989', '1000990', '1000997', '1001004', '1001005', '1001012', '1001013', '1001018', '1001019', '1001022', '1001020', '1001494', '1002734', '1001025', '1002760', '1002789', '1002761', '1002790', '1002797', '1002799', '1002804', '1002806', '1002809', '1002810', '1002811', '1002812', '1002822', '1002889', '1002890', '1002892', '1002896', '1002897', '1002904', '1002909', '1002911', '1002912', '1003114', '1003128', '1003129', '1004627', '1003134', '1005205', '1005206', '1005921', '1005922', '1005923', '1005964', '1005965', '1005966', '1005967', '1006336', '1006337', '1006338', '1006339', '1006340', '1006342', '1006343', '1006344', '1006377', '1006440', '1006454', '1006455', '1006511', '1009530', '1009535', '1009566', '1009569', '1009595', '1009600', '1009605', '1009608', '1009609', '1009610', '1009611', '1009612', '1009613', '1009614', '1009615', '1009616', '1009923', '1009924', '1009925', '1009926', '1009927', '1009928', '1009929', '1009930', '1009932', '1009933', '1009931', '1009934', '1009935', '1009936', '1009937', '1009938', '1009939', '1009940', '1009941', '1009942', '1009943', '1009944', '1009945', '1009946', '1009947', '1009948', '1009949', '1009950', '1009951', '1009952', '1009953', '1009954', '1015609', '1015610', '1015611', '1015612', '1015614', '1015640', '1015641', '1015642', '1015644', '1017790', '1017791', '1017991', '1017992', '1017993', '1017994', '1017995', '1017996', '1017997', '1017998', '1017999', '1018000', '1018001', '1018002', '1018003', '1018004', '1018005', '1018007', '1018006', '1018008', '1018009', '1018010', '1018011', '1018012', '1018013', '1018014', '1018015', '1018016', '1018017', '1018018', '1022104', '1022105', '1022106', '1022113', '1022116', '1022121', '1022125', '1022127', '1022129', '1022132', '1022136', '1022137', '1022138', '1025821', '1025822', '1025823', '1025824', '1025825', '1025826', '1025827', '1025828', '1025841', '1025842', '1025859', '1025866', '1025867', '1025868', '1025869', '1025870', '1025871', '1026145', '1026146', '1026147', '1026148', '1026150', '1026151', '1026149', '1026152', '1026153', '1026154', '1026155', '1026167', '1026169', '1026168', '1026171', '1026170', '1026172', '1026173', '1026174', '1026176', '1026177', '1026175', '1026179', '1026178', '1026181', '1026180', '1029206', '1029209', '1029211', '1029212', '1029228', '1029260', '1029257', '1029263', '1029261', '1029269', '1029270', '1029271', '1029276', '1031104', '1031112', '1031127', '1031126', '1031128', '1031138', '1031139', '1031141', '1031140', '1031143', '1031144', '1031145', '1031146', '1031147', '1031148', '1031153', '1031154', '1031156', '1031157', '1031158', '1031159', '1031160', '1031161', '1031162', '1031163', '1031167', '1031172', '1031173', '1031174', '1031176', '1031178', '1031179', '1031186', '1031187', '1031188', '1031189', '1031190', '1031191', '1031195', '1031196', '1031197', '1031198', '1031201', '1031210', '1031211', '1031246', '1031249', '1031247', '1031256', '1031260', '1031262', '1031263', '1031264', '1031265', '1031266', '1031270', '1031269', '1031273', '1031282', '1031283', '1031284', '1032148', '1032149', '1032151', '1032152', '1032153', '1032154', '1032155', '1032156', '1032158', '1032160', '1032162', '1032163', '1032165', '1032164', '1032168', '1032167', '1032169', '1032171', '1032172', '1032582', '1032583', '1032584', '1032587', '1032588', '1032589', '1032592', '1032593', '1032597', '1032600', '1032602', '1032604', '1032603', '1032606', '1032607', '1032605', '1032608', '1032609', '1032611', '1032612', '1032620', '1032621', '1032622', '1032623', '1032624', '1032625', '1032629', '1032627', '1032630', '1032635', '1032636', '1032637', '1032639', '1032652', '1032654', '1032655', '1032656', '1032657', '1032658', '1032659', '1032660', '1032661', '1032663', '1032662', '1032664', '1032665', '1032667', '1032865', '1033085', '1033307', '1033587', '1033645', '1033648', '1033668', '1033669', '1041033', '1041034', '1041035', '1041036', '1041037', '1041038', '1041039', '1041040', '1041041', '1041042', '1041044', '1041045', '1041043', '1041046', '1041047', '1041048', '1041049', '1041050', '1041051', '1041052', '1041053', '1041054', '1041055', '1041056', '1041057', '1041058', '1041059', '1041060', '1043088', '1043090', '1043089', '1043091', '1043092', '1043093', '1043094', '1043098', '1043099', '1043100', '1043101', '1043102', '1043103', '1043104', '1043134', '1043135', '1043137', '1043138', '1043139', '1043140', '1043142', '1043511', '1043514', '1043526', '1043527', '1043528', '1043529', '1043530', '1043531', '1043538', '1043540', '1043539', '1043541', '1043542', '1043544', '1043545', '1043543', '1045611', '1043546', '1045612', '1045614', '1045613', '1045615', '1045616', '1045617', '1045618', '1045619', '1045620', '1045621', '1045622', '1045623', '1045624', '1045626', '1045625', '1045633', '1045632', '1045634', '1045635', '1045636', '1045637', '1045638', '2000486', '2000495', '2000497', '2000498', '2000503', '2000504', '2000505', '2000506', '2000511', '2000514', '2000738', '2000737', '2000739', '2000740', '2000741', '2000742', '2000743', '2000744', '2000746', '2000747', '2000748', '2000749', '2000750', '2000757', '2000758', '2000760', '2000761', '2000763', '2000764', '2000765', '2000766', '2000953', '2000954', '2000955', '2000956', '2000957', '2000958', '2000962', '2000964', '2000972', '2000973', '2000974', '2000976', '2000975', '2000977', '2000978', '2000981', '2000982', '2000984', '2000986', '2000985', '2000987', '2000988', '2000998', '2000999', '2001000', '2001001', '2001010', '2001034', '2001035', '2002381', '2001446', '2002573', '2002699', '2002700', '2002701', '2002702', '2002711', '2002712', '2002713', '2002714', '2002722', '2002723', '2002724', '2002728', '2002729', '2002731', '2002732', '2002733', '2002745', '2002746', '2002747', '2002752', '2002755', '2002759', '2002760', '2002761', '2002767', '2002768', '2002769', '2002770', '2002773', '2002783', '2002790', '2002795', '2002797', '2002798', '2002799', '2002800', '2002801', '2002803', '2002807', '2002808', '2002809', '2002810', '2002811', '2002812', '2002816', '2002821', '2002823', '2002818', '2002824', '2002867', '2002868', '2002875', '2002874', '2002882', '2002883', '2002884', '2002885', '2002886', '2002887', '2002888', '2002889', '2002890', '2002891', '2002892', '2002894', '2002895', '2002897', '2002902', '2002903', '2002905', '2002904', '2002908', '2002909', '2002910', '2002911', '2002916', '2002917', '2002918', '2002921', '2003115', '2003116', '2003117', '2003118', '2003119', '2003120', '2003121', '2003122', '2003123', '2003124', '2003128', '2003127', '2003129', '2003130', '2003131', '2003132', '2003135', '2004320', '2004626', '2004361', '2004633', '2004634', '2004703', '2004704', '2004705', '2004719', '2004721', '2005201', '2005200', '2005207', '2005208', '2005209', '2005211', '2005212', '2005921', '2005922', '2005923', '2005925', '2005926', '2005952', '2005955', '2005964', '2006316', '2006317', '2006324', '2006323', '2006325', '2006327', '2006326', '2006328', '2006329', '2006330', '2006331', '2006337', '2006365', '2006372', '2006373', '2006374', '2006438', '2015636', '2015637', '2015638', '2015639', '2017787', '2017788', '2017789', '2017790', '2017791', '2017792', '2017793', '2017794', '2022113', '2022114', '2022115', '2022117', '2022118', '2022119', '2022120', '2022122', '2022123', '2022124', '2022126', '2022127', '2022128', '2022129', '2022130', '2022131', '2022132', '2022136', '2022137', '2022138', '2022139', '2025814', '2025815', '2025816', '2025817', '2025818', '2025819', '2026145', '2025871', '2026148', '2026149', '2026150', '2026151', '2029226', '2029219', '2029256', '2029257', '2029263', '2029265', '2029266', '2029267', '2029269', '2029274', '2029275', '2031108', '2031109', '2031125', '2031126', '2031127', '2031129', '2031131', '2031130', '2031133', '2031132', '2031136', '2031134', '2031137', '2031146', '2031147', '2031150', '2031151', '2031153', '2031159', '2031160', '2031161', '2031176', '2031182', '2031177', '2031183', '2031185', '2031186', '2031187', '2031194', '2031195', '2031198', '2031199', '2031200', '2031205', '2031206', '2031211', '2031215', '2031255', '2031257', '2031264', '2031272', '2031273', '2032146', '2032147', '2032166', '2032168', '2032169', '2032170', '2032584', '2032592', '2032593', '2032603', '2032604', '2032610', '2032611', '2032612', '2032618', '2032619', '2032620', '2032621', '2032622', '2032624', '2032625', '2032643', '2032644', '2032645', '2032654', '2032655', '2032656', '2032658', '2032659', '2032657', '2032660', '2032661', '2032662', '2032663', '2032665', '2032666', '2033089', '2033294', '2033298', '2033301', '2033302', '2033306', '2033381', '2033382', '2033383', '2033643', '2033652', '2033664', '2033665', '2033669', '2033760', '2034526', '2034855', '2034857', '2041036', '2041037', '2041040', '2041041', '2041045', '2041048', '2041049', '2041050', '2041057', '2041059', '2041060', '2043095', '2043103', '2043104', '2043135', '2043134', '2043137', '2043138', '2043142', '2043511', '2043512', '2043513', '2043525', '2043526', '2043527', '2043528', '2043529', '2043530', '2043538', '2043539', '2043540', '2043541', '2043542', '2043544', '2043543', '2043545', '2045619', '2045626', '2045620', '2045627', '2045634', '2045635', '2045636', '2045637', '2045638', '3000490', '3000491', '3000492', '3000493', '3000497', '3000499', '3000503', '3000504', '3000506', '3000507', '3000511', '3000515', '3000737', '3000738', '3000739', '3000742', '3000744', '3000746', '3000747', '3000748', '3000749', '3000755', '3000756', '3000761', '3000764', '3000765', '3000766', '3000955', '3000956', '3000958', '3000959', '3000965', '3000962', '3000967', '3000966', '3000968', '3000969', '3000970', '3000971', '3000972', '3000974', '3000975', '3000976', '3000973', '3000977', '3000982', '3000987', '3000990', '3000993', '3000999', '3001000', '3001001', '3001004', '3001003', '3001006', '3001005', '3001009', '3001010', '3001018', '3001023', '3001420', '3002703', '3002705', '3002704', '3002706', '3002720', '3002709', '3002710', '3002711', '3002714', '3002718', '3002719', '3002721', '3002707', '3002725', '3002726', '3002727', '3002745', '3002746', '3002749', '3002751', '3002754', '3002750', '3002757', '3002758', '3002762', '3002765', '3002766', '3002772', '3002775', '3002776', '3002778', '3002779', '3002777', '3002780', '3002781', '3002782', '3002784', '3002787', '3002786', '3002792', '3002793', '3002796', '3002798', '3002799', '3002802', '3002804', '3002805', '3002806', '3002808', '3002809', '3002813', '3002814', '3002815', '3002817', '3002870', '3002879', '3002880', '3002881', '3002884', '3002886', '3002887', '3002889', '3002904', '3002914', '3003109', '3003110', '3003112', '3003114', '3003115', '3003111', '3003117', '3003116', '3003121', '3003122', '3003130', '3003132', '3003124', '3003134', '3003133', '3003135', '3003136', '3005202', '3005203', '3005207', '3005209', '3005921', '3005922', '3005923', '3005926', '3005952', '3005953', '3005954', '3005955', '3005956', '3005966', '3005957', '3005967', '3006327', '3006328', '3006331', '3006332', '3006333', '3006338', '3006339', '3006346', '3006347', '3006374', '3006373', '3006399', '3006398', '3006449', '3006447', '3006458', '3006459', '3006508', '3006507', '3006460', '3009519', '3009520', '3009521', '3009522', '3009523', '3009524', '3009525', '3009526', '3009527', '3009528', '3009529', '3009530', '3009531', '3009532', '3009533', '3009534', '3009535', '3009536', '3009537', '3009548', '3009562', '3009563', '3009564', '3009565', '3009570', '3009571', '3009573', '3009572', '3009574', '3009580', '3009581', '3009587', '3009591', '3009588', '3009930', '3009931', '3009932', '3009933', '3009934', '3009935', '3009936', '3009937', '3009938', '3009939', '3009940', '3009941', '3009942', '3009943', '3009952', '3009944', '3009953', '3009954', '3015535', '3015536', '3015537', '3015540', '3015543', '3015545', '3015544', '3015546', '3015547', '3015549', '3015550', '3015551', '3015552', '3015556', '3015557', '3015558', '3015559', '3015560', '3015561', '3015562', '3015576', '3015575', '3015577', '3015603', '3015602', '3015604', '3015605', '3015606', '3015607', '3015608', '3015609', '3015637', '3015638', '3015641', '3015642', '3015643', '3015644', '3017771', '3017772', '3017773', '3017774', '3017775', '3017776', '3017777', '3017784', '3017783', '3017785', '3017786', '3017787', '3017788', '3017789', '3017790', '3017791', '3017792', '3017793', '3017794', '3017796', '3017795', '3017797', '3017798', '3017799', '3017800', '3017801', '3017802', '3017803', '3017804', '3017805', '3017806', '3017828', '3017829', '3017830', '3017831', '3017832', '3017833', '3017834', '3017835', '3017836', '3017992', '3017991', '3017993', '3017994', '3017995', '3017996', '3017997', '3017998', '3018002', '3018003', '3018004', '3018005', '3018006', '3018007', '3018008', '3018009', '3018010', '3018011', '3018012', '3018013', '3018016', '3018017', '3022096', '3022097', '3022098', '3022101', '3022102', '3022105', '3022108', '3022109', '3022118', '3022119', '3022121', '3022132', '3022131', '3022133', '3022135', '3022138', '3025812', '3025813', '3025815', '3025814', '3025817', '3025816', '3025818', '3025819', '3025820', '3025821', '3025822', '3025823', '3025824', '3025825', '3025826', '3025827', '3025828', '3025829', '3025840', '3025841', '3025867', '3025868', '3025869', '3025870', '3025871', '3025872', '3026150', '3026151', '3026152', '3026153', '3026157', '3026159', '3026167', '3026168', '3026171', '3026172', '3026173', '3026174', '3026175', '3026176', '3026177', '3026178', '3026179', '3026180', '3026181', '3029199', '3029200', '3029201', '3029202', '3029203', '3029204', '3029212', '3029211', '3029213', '3029216', '3029217', '3029220', '3029225', '3029226', '3029227', '3029228', '3029240', '3029236', '3029244', '3029256', '3029258', '3029259', '3029261', '3029262', '3029273', '3031109', '3031110', '3031111', '3029278', '3031117', '3031118', '3031112', '3031119', '3031124', '3031125', '3031127', '3031126', '3031132', '3031128', '3031138', '3031146', '3031147', '3031148', '3031150', '3031151', '3031152', '3031155', '3031156', '3031159', '3031160', '3031158', '3031164', '3031166', '3031161', '3031169', '3031170', '3031171', '3031176', '3031177', '3031178', '3031181', '3031184', '3031186', '3031187', '3031188', '3031190', '3031195', '3031196', '3031197', '3031198', '3031201', '3031202', '3031203', '3031205', '3031204', '3031207', '3031209', '3031246', '3031247', '3031249', '3031251', '3031252', '3031253', '3031254', '3031258', '3031259', '3031262', '3031263', '3031264', '3031270', '3031271', '3031272', '3031273', '3031278', '3031279', '3031280', '3032148', '3032149', '3032151', '3032152', '3032150', '3032153', '3032155', '3032156', '3032157', '3032158', '3032159', '3032160', '3032161', '3032166', '3032167', '3032168', '3032169', '3032170', '3032171', '3032172', '3032581', '3032584', '3032585', '3032586', '3032587', '3032588', '3032592', '3032593', '3032594', '3032595', '3032596', '3032598', '3032599', '3032600', '3032601', '3032602', '3032603', '3032604', '3032606', '3032612', '3032615', '3032616', '3032617', '3032619', '3032621', '3032620', '3032622', '3032623', '3032625', '3032626', '3032627', '3032628', '3032629', '3032631', '3032634', '3032632', '3032635', '3032639', '3032640', '3032641', '3032642', '3032643', '3032644', '3032647', '3032649', '3032648', '3032652', '3032653', '3032654', '3032657', '3032658', '3032659', '3032660', '3032661', '3032662', '3032863', '3033289', '3033295', '3033305', '3033649', '3033666', '3033665', '3034496', '3034574', '3041033', '3034826', '3041035', '3041034', '3041037', '3041036', '3041042', '3041043', '3041045', '3041049', '3041050', '3041051', '3043088', '3043089', '3043090', '3043091', '3043092', '3043093', '3043094', '3043095', '3043096', '3043097', '3043098', '3043099', '3043100', '3043101', '3043102', '3043103', '3043104', '3043109', '3043108', '3043140', '3043142', '3043511', '3043512', '3043514', '3043519', '3043520', '3043526', '3043527', '3043529', '3043528', '3043530', '3043531', '3043538', '3043539', '3043540', '3043544', '3043545', '3045614', '3045615', '3045616', '3045617', '3045618', '3045620', '3045621', '3045622', '3045623', '3045625', '3045624', '3045627', '3045628', '3045634', '3045635', '3045636', '3045637', '3045638']
    The number of missed images: 1541]

jupyter Error:SyntaxError: invalid syntax

Hello,
when i try to follow the jupyter to run it ,it happens at the begining.how can i solve it?

File "settings.py", line 1
../prepare/settings.py
^
SyntaxError: invalid syntax

should i move the settings.py or do something ?thanks!

训练超过1000类的单字分类器的问题

您好,我想把单字类别扩展一下,把setting中的1000改掉后,想预加载模型,在train_image_classifer.py中把最后一层的名字给屏蔽掉:'checkpoint_exclude_scopes', ‘alexnet_v2/fc8’。发现仍会报错,似乎一直会预加载fc8层:
InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [6855] rhs shape= [1001],[[Node: save_1/Assign_44 = Assign[T=DT_FLOAT, _class=["loc:@alexnet_v2/fc8/biases"], use_locking=true
能给个思路吗?

Quenstion about total detection procedure

Hi,
Sorry to bothering.
I want to use some other detection net arch (for example, YOLOv3, mask rcnn...) to train with CTW DATASET. And I just want to make sure that my total procedure of detection is/or not correct...(Because my experiment result is too bad...)

1. Follw the tutorial part1 and part3 until cd ../detection && python3 prepare_train_data.py.
( Question 1 :1 0.716797 0.395833 0.216406 0.147222 in trainval txt files means
class center-x center-y w h? )

2. Just use all jpgs and txts in trainval to train a net. And use cates.json generated by python3 decide_cates.py with train+val.

3. Just use python3 prepare_test_data.py to generate test set, use trained net to output all boxes in all test jpgs with confidence thresh> 0.005, then generate files chinese.0.txt ~ chnese.11.txt by myself just like the output of python3 eval.py.
(Question 2: products/test/3032626_0_3_5.jpg 12 288.8592 434.3807 14.8512 39.1104 0.072 in each line of chinese.x.txt means every bbox with filename class topleft-x topleft-y w h with respect to the scale 1216 ? )

4. Finally, just use python3 merge_results.py and cd ../judge && python3 detection_perf.py without any extra change to get the final result !

But I get the really poor result... Did I MISS something important... ?
Thanks for your help. :)

Where can I locate the 'learning' module?

in the train_image_classifier.py file, there is a line that imports a module called learning. Is this a module that needs to be installed through pip install or is it a module provided by you? When I tried pip install learning, I was able to install it, but when I try train.py, it gave me an error message saying learning has no attribute train. Thanks!

Why didn't I generate complete chinese.x.txt

Hello, I used your trained yolo model and found a missing chinese.names file,then I download ctw-trainval-01-of-26.tar,used prepare_train_data.py to generate chinese.names.

I ran prepare_test_data.py with all provided test data,got these

root@0a0fe4b86df1:~/shared/ctw-baseline/detection/products# ls
backup           chinese.2.data  chinese.8.data         test         test.3.txt  test.9.txt
cates.json       chinese.3.data  chinese.9.data         test.0.txt   test.4.txt  test.txt
chinese.0.data   chinese.4.data  chinese.data           test.1.txt   test.5.txt  trainval
chinese.1.data   chinese.5.data  chinese.names          test.10.txt  test.6.txt  trainval.txt
chinese.10.data  chinese.6.data  darknet19_448.conv.23  test.11.txt  test.7.txt  yolo-chinese-test.cfg
chinese.11.data  chinese.7.data  results                test.2.txt   test.8.txt  yolo-chinese.cfg

Then about more than a dozen hours after I ran eval.py,I got these txt in /detection/products/result/

root@0a0fe4b86df1:~/shared/ctw-baseline/detection/products/results# ls
chinese.10.txt  chinese.11.txt  chinese.3.txt  chinese.4.txt  chinese.6.txt  chinese.7.txt  chinese.8.txt  chinese.9.txt

,it didn't generate complete chinese.x.txt,I wanna know why

sentance is sentence?

https://github.com/yuantailing/ctw-baseline/blob/master/tutorial/1-basics.ipynb said:

annotation (corresponding to one line in .jsonl):
{
    image_id: str,
    file_name: str,
    width: int,
    height: int,
    annotations: [sentance_0, sentance_1, sentance_2, ...],    # MUST NOT be empty
    ignore: [ignore_0, ignore_1, ignore_2, ...],               # MAY be an empty list
}

sentance:
[instance_0, instance_1, instance_2, ...]                 # MUST NOT be empty

instance:
{
    polygon: [[x0, y0], [x1, y1], [x2, y2], [x3, y3]],    # x, y are floating-point numbers
    text: str,                                            # the length of the text MUST be exactly 1
    is_chinese: bool,
    attributes: [attr_0, attr_1, attr_2, ...],            # MAY be an empty list
    adjusted_bbox: [xmin, ymin, w, h],                    # x, y, w, h are floating-point numbers
}

attr:
"occluded" | "bgcomplex" | "distorted" | "raised" | "wordart" | "handwritten"

ignore:
{
    polygon: [[x0, y0], [x1, y1], [x2, y2], [x3, y3]],
    bbox: [xmin, ymin, w, h],
]

Maybe the sentance should be sentence, right?

Problem of CodaLab

Hello, thank you very much for your work. I encountered an issue when uploading my prediction results to CodaLab. It seems that CodaLab has changed servers and requires you to register for the competition again. Could you please register for the competition again? If it’s too much trouble, could you send me a test dataset label file so that I can evaluate my model locally? The following is the massage I received when submitting my results on CodaLab:

Submission upload has been disabled. See the new instance at: https://codalab.lisn.upsaclay.fr/

OSError:[Errno 2] No such file or directory:

  hello, when i try to run the command cd ../detection && python3 eval.py, it tell me OSError

and i found the function
def eval_yolo(split_id, tid):
in eval.py line 48
settings.DARKNET_RESULTS_OUT is chinese,
and os.path.dirname(settings.DARKNET_RESULTS_OUT means nothing
so it can't mkdir, do you know why ?

issue when run prepare_test

Hi, I got some error when I try to get test.txt by running prepare_test file. Could you give me some help? Thanks a lot.

Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/deeplearn/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/deeplearn/anaconda3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/gangliu/ctw-baseline/ssd/pythonapi/common_tools.py", line 77, in parallel_work
func(*args_list[i], tid=tid)
File "/home/gangliu/ctw-baseline/ssd/pythonapi/common_tools.py", line 92, in foo
func(*args)
File "../detection/prepare_test_data.py", line 77, in foo
crop_once(*args)
File "../detection/prepare_test_data.py", line 52, in crop_once
assert image.shape == imshape
AttributeError: 'NoneType' object has no attribute 'shape'

list test 0 / 1

The NAN loss value in SSD

Hi,
I ran the SSD code in the baseline to train the ctw datasets with the batch of 12 (instead of 14 because of the limited GPU memory), but the loss is NAN. I just followd the "CTW dataset tutorial (Part 3: detection baseline)", and I don't change any things except the batch-size. Can you give me some advice?

I0403 09:59:07.896572 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 09:59:08.678768 38087 sgd_solver.cpp:138] Iteration 860, lr = 0.001
I0403 09:59:25.406322 38087 solver.cpp:243] Iteration 870, loss = nan
I0403 09:59:25.406674 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 09:59:25.406772 38087 sgd_solver.cpp:138] Iteration 870, lr = 0.001
I0403 09:59:40.899689 38087 solver.cpp:243] Iteration 880, loss = nan
I0403 09:59:40.899760 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 09:59:41.602229 38087 sgd_solver.cpp:138] Iteration 880, lr = 0.001
I0403 09:59:57.435994 38087 solver.cpp:243] Iteration 890, loss = nan
I0403 09:59:57.436153 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 09:59:57.436187 38087 sgd_solver.cpp:138] Iteration 890, lr = 0.001
I0403 10:00:14.717105 38087 solver.cpp:243] Iteration 900, loss = nan
I0403 10:00:14.717172 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 10:00:14.717288 38087 sgd_solver.cpp:138] Iteration 900, lr = 0.001
I0403 10:00:31.561822 38087 solver.cpp:243] Iteration 910, loss = nan
I0403 10:00:31.562093 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 10:00:32.274315 38087 sgd_solver.cpp:138] Iteration 910, lr = 0.001
I0403 10:00:48.392671 38087 solver.cpp:243] Iteration 920, loss = nan
I0403 10:00:48.392729 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 10:00:48.392833 38087 sgd_solver.cpp:138] Iteration 920, lr = 0.001
I0403 10:01:04.803617 38087 solver.cpp:243] Iteration 930, loss = nan
I0403 10:01:04.804121 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 10:01:05.511602 38087 sgd_solver.cpp:138] Iteration 930, lr = 0.001
I0403 10:01:21.101698 38087 solver.cpp:243] Iteration 940, loss = nan
I0403 10:01:21.101753 38087 solver.cpp:259] Train net output #0: mbox_loss = nan (* 1 = nan loss)
I0403 10:01:21.807464 38087 sgd_solver.cpp:138] Iteration 940, lr = 0.001

Error on CodaLab (CTW dataset classification)

Hi, Yuan Tauiling.

When I submitted my result, something went wrong.
Do you know how to solve it?

Error:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

Aspect ratio of the anchor boxes

Hi Tailing,

Thank you for sharing the code and dataset! It is a great job!

I'm just writing to double-check if you performed KNN to find the optimum anchor box aspect ratio? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.