mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Minor fix
This commit is contained in:
@ -100,7 +100,6 @@ On Linux use `./darknet` instead of `darknet.exe`, like this:`./darknet detector
|
|||||||
* Remeber to put data/9k.tree and data/coco9k.map under the same folder of your app if you use the cpp api to build an app
|
* Remeber to put data/9k.tree and data/coco9k.map under the same folder of your app if you use the cpp api to build an app
|
||||||
* To process a list of images `data/train.txt` and save results of detection to `result.txt` use:
|
* To process a list of images `data/train.txt` and save results of detection to `result.txt` use:
|
||||||
`darknet.exe detector test data/voc.data yolo-voc.cfg yolo-voc.weights -dont_show -ext_output < data/train.txt > result.txt`
|
`darknet.exe detector test data/voc.data yolo-voc.cfg yolo-voc.weights -dont_show -ext_output < data/train.txt > result.txt`
|
||||||
You can comment this line so that each image does not require pressing the button ESC: https://github.com/AlexeyAB/darknet/blob/6ccb41808caf753feea58ca9df79d6367dedc434/src/detector.c#L509
|
|
||||||
|
|
||||||
##### For using network video-camera mjpeg-stream with any Android smartphone:
|
##### For using network video-camera mjpeg-stream with any Android smartphone:
|
||||||
|
|
||||||
@ -428,7 +427,7 @@ Example of custom object detection: `darknet.exe detector test data/obj.data yol
|
|||||||
* for training for small objects - set `layers = -1, 11` instead of https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L720
|
* for training for small objects - set `layers = -1, 11` instead of https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L720
|
||||||
and set `stride=4` instead of https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L717
|
and set `stride=4` instead of https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L717
|
||||||
|
|
||||||
* General rule - you should keep relative size of objects in the Training and Testing datasets roughly the same:
|
* General rule - your training dataset should include such a set of relative sizes of objects that you want to detect - differing by no more than 2 times:
|
||||||
|
|
||||||
* `train_network_width * train_obj_width / train_image_width ~= detection_network_width * detection_obj_width / detection_image_width`
|
* `train_network_width * train_obj_width / train_image_width ~= detection_network_width * detection_obj_width / detection_image_width`
|
||||||
* `train_network_height * train_obj_height / train_image_height ~= detection_network_height * detection_obj_height / detection_image_height`
|
* `train_network_height * train_obj_height / train_image_height ~= detection_network_height * detection_obj_height / detection_image_height`
|
||||||
|
@ -65,6 +65,9 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
|
|||||||
printf("\n Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64 \n");
|
printf("\n Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64 \n");
|
||||||
getchar();
|
getchar();
|
||||||
}
|
}
|
||||||
|
else if ((net.batch * net.subdivisions) < 64) {
|
||||||
|
printf("\n Warning: You set batch= lower than 64! It is recommended to set batch=64 subdivision=64 \n");
|
||||||
|
}
|
||||||
|
|
||||||
int imgs = net.batch * net.subdivisions * ngpus;
|
int imgs = net.batch * net.subdivisions * ngpus;
|
||||||
printf("Learning Rate: %g, Momentum: %g, Decay: %g\n", net.learning_rate, net.momentum, net.decay);
|
printf("Learning Rate: %g, Momentum: %g, Decay: %g\n", net.learning_rate, net.momentum, net.decay);
|
||||||
|
12
src/utils.c
12
src/utils.c
@ -206,12 +206,12 @@ void find_replace_extension(char *str, char *orig, char *rep, char *output)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void replace_image_to_label(char *input_path, char *output_path) {
|
void replace_image_to_label(char *input_path, char *output_path) {
|
||||||
//find_replace(input_path, "images", "labels", output_path); // COCO
|
//find_replace(input_path, "/images/", "/labels/", output_path); // COCO
|
||||||
find_replace(input_path, "images/train2014/", "labels/train2014/", output_path); // COCO
|
find_replace(input_path, "/images/train2014/", "/labels/train2014/", output_path); // COCO
|
||||||
find_replace(output_path, "images/val2014/", "labels/val2014/", output_path); // COCO
|
find_replace(output_path, "/images/val2014/", "/labels/val2014/", output_path); // COCO
|
||||||
//find_replace(output_path, "JPEGImages", "labels", output_path); // PascalVOC
|
//find_replace(output_path, "/JPEGImages/", "/labels/", output_path); // PascalVOC
|
||||||
find_replace(output_path, "VOC2007/JPEGImages", "VOC2007/labels", output_path); // PascalVOC
|
find_replace(output_path, "/VOC2007/JPEGImages/", "/VOC2007/labels/", output_path); // PascalVOC
|
||||||
find_replace(output_path, "VOC2012/JPEGImages", "VOC2012/labels", output_path); // PascalVOC
|
find_replace(output_path, "/VOC2012/JPEGImages/", "/VOC2012/labels/", output_path); // PascalVOC
|
||||||
|
|
||||||
//find_replace(output_path, "/raw/", "/labels/", output_path);
|
//find_replace(output_path, "/raw/", "/labels/", output_path);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user