mirror of https://github.com/AlexeyAB/darknet.git
Minor fix
This commit is contained in:
parent
142fcdeb1e
commit
2207acd9c4
|
@ -214,6 +214,9 @@ void train_classifier(char *datacfg, char *cfgfile, char *weightfile, int *gpus,
|
||||||
free_ptrs((void**)paths, plist->size);
|
free_ptrs((void**)paths, plist->size);
|
||||||
free_list(plist);
|
free_list(plist);
|
||||||
free(base);
|
free(base);
|
||||||
|
|
||||||
|
free_list_contents_kvp(options);
|
||||||
|
free_list(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
13
src/data.c
13
src/data.c
|
@ -1499,7 +1499,18 @@ data load_data_augment(char **paths, int n, int m, char **labels, int k, tree *h
|
||||||
const int top = cut_y;
|
const int top = cut_y;
|
||||||
const int bot = cut_y + cut_h;
|
const int bot = cut_y + cut_h;
|
||||||
|
|
||||||
const float alpha = (float)(right - left)*(bot - top) / (float)(w*h);
|
assert(cut_x >= 0 && cut_x <= w);
|
||||||
|
assert(cut_y >= 0 && cut_y <= h);
|
||||||
|
assert(cut_w >= 0 && cut_w <= w);
|
||||||
|
assert(cut_h >= 0 && cut_h <= h);
|
||||||
|
|
||||||
|
assert(right >= 0 && right <= w);
|
||||||
|
assert(bot >= 0 && bot <= h);
|
||||||
|
|
||||||
|
assert(top <= bot);
|
||||||
|
assert(left <= right);
|
||||||
|
|
||||||
|
const float alpha = (float)(cut_w*cut_h) / (float)(w*h);
|
||||||
const float beta = 1 - alpha;
|
const float beta = 1 - alpha;
|
||||||
|
|
||||||
int c, x, y;
|
int c, x, y;
|
||||||
|
|
Loading…
Reference in New Issue