caffe-yolo-face-detection icon indicating copy to clipboard operation
caffe-yolo-face-detection copied to clipboard

How to train yolo with my own dataset

Open PearlDzzz opened this issue 8 years ago • 5 comments

@camel007 Hi. I want to train YOLO on my own dataset, but I don't know how to use your opensource.

  1. Is leaky layer needed to add in the caffe/layers?
  2. Should I compile the pycaffe in advance, and then config it in my Anaconda to train model?

PearlDzzz avatar Dec 28 '16 03:12 PearlDzzz

1, no need. set "Relu" Layer as this: layer { name: "relu4" type: "PReLU" prelu_param { filler {type: "constant" value: 0.1} } bottom: "conv4" top: "conv4" } 2, All my code is based on C++,
git clone this repo, then compile it.

camel007 avatar Dec 28 '16 03:12 camel007

@camel007 Thanks for your advice. I have another question about the train and test lmdb. Always, we fetch "data" and "labels" from one ""Data"" layer, here you write two in train_val.prototxt. Could you give me some existing lmdb for training, or tell me how to transform lmdb of "train_im" and “train_label”.

layer { name: "data" type: "Data" top: "data" transform_param { mean_value: 127.5 mean_value: 127.5 mean_value: 127.5 scale: 0.00784 } include: { phase: TRAIN } data_param { source: "/data/celeba_dababase/yolo/train_im" batch_size: 64 backend: LMDB } } layer { name: "labels" type: "Data" top: "labels" include: { phase: TRAIN } data_param { source: "/data/celeba_dababase/yolo/train_label" batch_size: 64 backend: LMDB } }

PearlDzzz avatar Dec 28 '16 07:12 PearlDzzz

1, use code in "crop_celeba" to prepare your samples 2, use "tools/convert_darknet_model_2_caffe_model.cpp" to transform your data to lmdb

camel007 avatar Dec 28 '16 08:12 camel007

transform_param { mean_value:127.5 mean_value:127.5 mean_value:127.5 scale: 0.00784 } Hi, can you tell me why mean_value is 127.5 ? If use another datasets, it is necessary need to change this value?

Li-Lai avatar Apr 24 '17 13:04 Li-Lai

python ./python/ConvertYolo2Caffe/convert.py train_val.prototxt yolo.weights caffemodel_save_path Can you show me your train_val.prototxt ? I want to see it.

Li-Lai avatar Apr 24 '17 14:04 Li-Lai