| | |
| | | #ifndef BOX_H |
| | | #define BOX_H |
| | | |
| | | #ifdef _DEBUG |
| | | #include <stdlib.h> |
| | | #include <crtdbg.h> |
| | | #endif |
| | | |
| | | #ifdef YOLODLL_EXPORTS |
| | | #if defined(_MSC_VER) |
| | | #define YOLODLL_API __declspec(dllexport) |
| | |
| | | #ifdef _DEBUG |
| | | #include <stdlib.h> |
| | | #include <crtdbg.h> |
| | | #endif |
| | | |
| | | #include <time.h> |
| | | #include <stdlib.h> |
| | | #include <stdio.h> |
| | |
| | | cap = (CvCapture*)new cv::VideoCapture(path); |
| | | } |
| | | catch (...) { |
| | | std::cout << " Error: Web-camera " << path << " can't be opened! \n"; |
| | | std::cout << " Error: video-stream " << path << " can't be opened! \n"; |
| | | } |
| | | return cap; |
| | | } |
| | |
| | | net.n = n; |
| | | net.layers = calloc(net.n, sizeof(layer)); |
| | | net.seen = calloc(1, sizeof(int)); |
| | | #ifdef GPU |
| | | #ifdef GPU |
| | | net.input_gpu = calloc(1, sizeof(float *)); |
| | | net.truth_gpu = calloc(1, sizeof(float *)); |
| | | |
| | |
| | | net.output16_gpu = calloc(1, sizeof(float *)); |
| | | net.max_input16_size = calloc(1, sizeof(size_t)); |
| | | net.max_output16_size = calloc(1, sizeof(size_t)); |
| | | #endif |
| | | #endif |
| | | return net; |
| | | } |
| | | |
| | |
| | | int nu = 0; |
| | | list *options = make_list(); |
| | | while((line=fgetl(file)) != 0){ |
| | | ++ nu; |
| | | ++nu; |
| | | strip(line); |
| | | switch(line[0]){ |
| | | case '\0': |