MhLiao / TextBoxes_plusplus

TextBoxes++: A Single-Shot Oriented Scene Text Detector
Other
953 stars 279 forks source link

Error when starting training #73

Closed Leonhard1987 closed 6 years ago

Leonhard1987 commented 6 years ago

I once successfully ran the python example/text/train.py (So it all worked before)

What i can remember what i have done: I changed the training set and ran data/text/create_data.sh create_data.sh processed all my 10.000 data samples but at the end the output was the following:

W0725 17:10:25.671221 10737 io.cpp:266] When parsing //mnt/share/data/GeneratedTrainingData/boxes/extended_7_bit_rand_pt_9996.json.xml: No such node (annotation.size.height)
W0725 17:10:25.676280 10737 io.cpp:266] When parsing //mnt/share/data/GeneratedTrainingData/boxes/extended_7_bit_rand_pt_9997.json.xml: No such node (annotation.size.height)
W0725 17:10:25.681442 10737 io.cpp:266] When parsing //mnt/share/data/GeneratedTrainingData/boxes/extended_7_bit_rand_pt_9998.json.xml: No such node (annotation.size.height)
W0725 17:10:25.686343 10737 io.cpp:266] When parsing //mnt/share/data/GeneratedTrainingData/boxes/extended_7_bit_rand_pt_9999.json.xml: No such node (annotation.size.height)
I0725 17:10:25.740768 10737 convert_annoset.cpp:195] Processed 10000 files.
link_dir /root/TextBoxes_plusplus/examples/text/text_train_lmdb
out_dir ./data/lmdb/text_train_lmdb
Traceback (most recent call last):
  File "/root/TextBoxes_plusplus/scripts/create_annoset.py", line 175, in <module>
    os.symlink(out_dir, link_dir)
OSError: [Errno 17] File exists

Ignoring this message, I started the training. This is the Output:

I0725 17:03:30.811698 10171 net.cpp:395] relu2_2 -> conv2_2 (in-place)
I0725 17:03:30.811708 10171 net.cpp:150] Setting up relu2_2
I0725 17:03:30.811717 10171 net.cpp:157] Top shape: 16 128 198 153 (62042112)
I0725 17:03:30.811723 10171 net.cpp:165] Memory required for data: 3164154240
I0725 17:03:30.811730 10171 layer_factory.hpp:77] Creating layer pool2
I0725 17:03:30.811738 10171 net.cpp:100] Creating Layer pool2
I0725 17:03:30.811745 10171 net.cpp:434] pool2 <- conv2_2
I0725 17:03:30.811755 10171 net.cpp:408] pool2 -> pool2
I0725 17:03:30.811787 10171 net.cpp:150] Setting up pool2
I0725 17:03:30.811797 10171 net.cpp:157] Top shape: 16 128 99 77 (15611904)
I0725 17:03:30.811805 10171 net.cpp:165] Memory required for data: 3226601856
I0725 17:03:30.811810 10171 layer_factory.hpp:77] Creating layer conv3_1
I0725 17:03:30.811822 10171 net.cpp:100] Creating Layer conv3_1
I0725 17:03:30.811828 10171 net.cpp:434] conv3_1 <- pool2
I0725 17:03:30.811839 10171 net.cpp:408] conv3_1 -> conv3_1
I0725 17:03:30.814316 10171 net.cpp:150] Setting up conv3_1
I0725 17:03:30.814332 10171 net.cpp:157] Top shape: 16 256 99 77 (31223808)
I0725 17:03:30.814337 10171 net.cpp:165] Memory required for data: 3351497088
I0725 17:03:30.814350 10171 layer_factory.hpp:77] Creating layer relu3_1
I0725 17:03:30.814363 10171 net.cpp:100] Creating Layer relu3_1
I0725 17:03:30.814370 10171 net.cpp:434] relu3_1 <- conv3_1
I0725 17:03:30.814378 10171 net.cpp:395] relu3_1 -> conv3_1 (in-place)
I0725 17:03:30.814397 10171 net.cpp:150] Setting up relu3_1
I0725 17:03:30.814406 10171 net.cpp:157] Top shape: 16 256 99 77 (31223808)
I0725 17:03:30.814412 10171 net.cpp:165] Memory required for data: 3476392320
I0725 17:03:30.814419 10171 layer_factory.hpp:77] Creating layer conv3_2
I0725 17:03:30.814433 10171 net.cpp:100] Creating Layer conv3_2
I0725 17:03:30.814440 10171 net.cpp:434] conv3_2 <- conv3_1
I0725 17:03:30.814451 10171 net.cpp:408] conv3_2 -> conv3_2
OpenCV Error: Assertion failed ((scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F)) in cvtColor, file /build/buildd/opencv-2.4.8+dfsg1/modules/imgproc/src/color.cpp, line 3959
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/buildd/opencv-2.4.8+dfsg1/modules/imgproc/src/color.cpp:3959: error: (-215) (scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F) in function cvtColor

[...]

Do you have an idea what might be the problem?

Leonhard1987 commented 6 years ago

Solved: The training-set was not set up properly. Image-conversion of OpenCV and network is build at the same time, which is a good thing but might be alittle confusing.

Leonhard1987 commented 6 years ago

Image has to have 24bit colordepth (like jpgs usually do)