Retrain a CNN with ssdCaffe - AD-EYE/AD-EYE_Core GitHub Wiki

Source: https://github.com/Coldmooon/SSD-on-Custom-Dataset

https://web.archive.org/web/20190711074948/https://github.com/Coldmooon/SSD-on-Custom-Dataset

Bug Report:

  • When executing the create_list.sh script, if files are not found, it may be because there are carriage return and line feed in the document created in windows. To fix this issue, add 2 "\r" symbols in the script as follows:
    img_file=$bash_dir/$dataset"_img.txt"
    cp $dataset_file $img_file
    sed -i "s/^/$name\/JPEGImages\//g" $img_file
    sed -i "s/\r\r$/.jpg/g" $img_file

    label_file=$bash_dir/$dataset"_label.txt"
    cp $dataset_file $label_file
    sed -i "s/^/$name\/Annotations\//g" $label_file
    sed -i "s/\r\r$/.xml/g" $label_file

Source: http://www.yanglajiao.com/article/10km/70144925

WARNING: I had to adapt the fix that this source provides by adding a second "\r"

http://web.archive.org/web/20190712080148/http://www.yanglajiao.com/article/10km/70144925

  • ImportError: No module named caffe.proto

Fix: edit ~/.bashrc and add or modify the python path to add caffe as a Library:

export PYTHONPATH=/home/adeye/ssdcaffe/python:$PYTHONPATH

Source: https://github.com/weiliu89/caffe/issues/536 Source: https://github.com/BVLC/caffe/issues/263 (may be not as useful but check it just in case if the first one doesn't fix the bug)

http://web.archive.org/web/20190712084145/https://github.com/weiliu89/caffe/issues/536

  • No module named google.protobuf.internal

Fix: pip install protobuf

Source: https://stackoverflow.com/questions/37666241/importing-caffe-results-in-importerror-no-module-named-google-protobuf-interna

http://web.archive.org/save/https://stackoverflow.com/questions/37666241/importing-caffe-results-in-importerror-no-module-named-google-protobuf-interna