Rebase Python example from ioir123ju/tkDNN/master/

This commit is contained in:
onyalcin
2020-08-22 12:53:59 -07:00
9 changed files with 424 additions and 4 deletions
+13 -1
View File
@@ -138,7 +138,19 @@ class DetectionNN {
TKDNN_TSTOP
if(save_times) *times<<t_ns<<"\n";
}
}
}
/**
* Method to get results.
*
*/
std::vector<std::vector<tk::dnn::box>>& get_batch_detected()
{
return batchDetected;
}
std::vector<std::string> get_classesName()
{
return classesNames;
}
/**
* Method to draw boundixg boxes and labels on a frame.
+7 -1
View File
@@ -6,7 +6,7 @@
#include <fstream>
#include <iomanip>
#include <stdlib.h>
#include <malloc.h>
#include "cuda.h"
#include "cuda_runtime_api.h"
#include <cublas_v2.h>
@@ -101,6 +101,12 @@ typedef enum {
ERROR_CUDNNvsTENSORRT = 8
} resultError_t;
void *xmalloc(size_t size);
void *xcalloc(size_t nmemb, size_t size);
void malloc_error();
void calloc_error();
void realloc_error();
void printCenteredTitle(const char *title, char fill, int dim = 30);
bool fileExist(const char *fname);
void downloadWeightsifDoNotExist(const std::string& input_bin, const std::string& test_folder, const std::string& weights_url);