caffe-yolo-face-detection
caffe-yolo-face-detection copied to clipboard
How to train yolo with my own dataset
@camel007 Hi. I want to train YOLO on my own dataset, but I don't know how to use your opensource.
- Is leaky layer needed to add in the caffe/layers?
- Should I compile the pycaffe in advance, and then config it in my Anaconda to train model?
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 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 } }
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
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?
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.