mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
#ifndef DATA_H
|
|
#define DATA_H
|
|
#include <pthread.h>
|
|
|
|
#include "matrix.h"
|
|
#include "list.h"
|
|
|
|
typedef struct{
|
|
matrix X;
|
|
matrix y;
|
|
int shallow;
|
|
} data;
|
|
|
|
|
|
void free_data(data d);
|
|
|
|
void print_letters(float *pred, int n);
|
|
data load_data_captcha(char **paths, int n, int m, int k, int h, int w);
|
|
data load_data_captcha_encode(char **paths, int n, int m, int h, int w);
|
|
data load_data(char **paths, int n, int m, char **labels, int k, int h, int w);
|
|
pthread_t load_data_thread(char **paths, int n, int m, char **labels, int k, int h, int w, data *d);
|
|
|
|
pthread_t load_data_detection_thread(int n, char **paths, int m, int classes, int h, int w, int nh, int nw, int jitter, int background, data *d);
|
|
data load_data_detection_jitter_random(int n, char **paths, int m, int classes, int h, int w, int nh, int nw, int jitter, int background);
|
|
|
|
data load_data_image_pathfile(char *filename, char **labels, int k, int h, int w);
|
|
data load_cifar10_data(char *filename);
|
|
data load_all_cifar10();
|
|
list *get_paths(char *filename);
|
|
char **get_labels(char *filename);
|
|
void get_random_batch(data d, int n, float *X, float *y);
|
|
void get_next_batch(data d, int n, int offset, float *X, float *y);
|
|
data load_categorical_data_csv(char *filename, int target, int k);
|
|
void normalize_data_rows(data d);
|
|
void scale_data_rows(data d, float s);
|
|
void translate_data_rows(data d, float s);
|
|
void randomize_data(data d);
|
|
data *split_data(data d, int part, int total);
|
|
|
|
#endif
|