Merge with master, add yolov4tiny_512

Signed-off-by: tk <micaelaverucchi@gmail.com>
This commit is contained in:
tk
2020-07-06 17:57:50 +02:00
38 changed files with 1328 additions and 361 deletions
+15 -2
View File
@@ -14,14 +14,27 @@ int main() {
bin_path + "/debug/layer23_out.bin",
};
std::string wgs_path = bin_path + "/layers";
std::string cfg_path = "../tests/darknet/cfg/yolo3tiny_512.cfg";
std::string name_path = "../tests/darknet/names/coco.names";
std::string cfg_path = std::string(TKDNN_PATH) + "/tests/darknet/cfg/yolo3tiny_512.cfg";
std::string name_path = std::string(TKDNN_PATH) + "/tests/darknet/names/coco.names";
downloadWeightsifDoNotExist(input_bins[0], bin_path, "https://cloud.hipert.unimore.it/s/8Zt6bHwHADqP4JC/download");
// parse darknet network
tk::dnn::Network *net = tk::dnn::darknetParser(cfg_path, wgs_path, name_path);
net->print();
// for(int i=0; i<net->num_layers; i++) {
// if(net->layers[i]->getLayerType() == tk::dnn::LAYER_CONV2D) {
// tk::dnn::Conv2d *c = (tk::dnn::Conv2d*) net->layers[i];
// c->releaseDevice();
// c->releaseHost(true, false);
// }
// if(net->layers[i]->dstData != nullptr) {
// cudaFree(net->layers[i]->dstData);
// net->layers[i]->dstData = nullptr;
// }
// }
//convert network to tensorRT
tk::dnn::NetworkRT *netRT = new tk::dnn::NetworkRT(net, net->getNetworkRTName(bin_path.c_str()));