merge with master
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,11 @@
|
||||
[net]
|
||||
# Testing
|
||||
batch=1
|
||||
subdivisions=1
|
||||
# Training
|
||||
#batch=64
|
||||
#subdivisions=8
|
||||
width=416
|
||||
height=416
|
||||
width=512
|
||||
height=512
|
||||
# width=608
|
||||
# height=608
|
||||
channels=3
|
||||
momentum=0.949
|
||||
decay=0.0005
|
||||
@@ -15,11 +14,11 @@ saturation = 1.5
|
||||
exposure = 1.5
|
||||
hue=.1
|
||||
|
||||
learning_rate=0.00261
|
||||
learning_rate=0.0013
|
||||
burn_in=1000
|
||||
max_batches = 500500
|
||||
max_batches = 16000
|
||||
policy=steps
|
||||
steps=400000,450000
|
||||
steps=12800,14400
|
||||
scales=.1,.1
|
||||
|
||||
#cutmix=1
|
||||
@@ -959,14 +958,14 @@ activation=leaky
|
||||
size=1
|
||||
stride=1
|
||||
pad=1
|
||||
filters=255
|
||||
filters=27
|
||||
activation=linear
|
||||
|
||||
|
||||
[yolo]
|
||||
mask = 0,1,2
|
||||
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
|
||||
classes=80
|
||||
classes=4
|
||||
num=9
|
||||
jitter=.3
|
||||
ignore_thresh = .7
|
||||
@@ -978,6 +977,7 @@ iou_normalizer=0.07
|
||||
iou_loss=ciou
|
||||
nms_kind=greedynms
|
||||
beta_nms=0.6
|
||||
max_delta=5
|
||||
|
||||
|
||||
[route]
|
||||
@@ -1046,14 +1046,14 @@ activation=leaky
|
||||
size=1
|
||||
stride=1
|
||||
pad=1
|
||||
filters=255
|
||||
filters=27
|
||||
activation=linear
|
||||
|
||||
|
||||
[yolo]
|
||||
mask = 3,4,5
|
||||
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
|
||||
classes=80
|
||||
classes=4
|
||||
num=9
|
||||
jitter=.3
|
||||
ignore_thresh = .7
|
||||
@@ -1065,6 +1065,7 @@ iou_normalizer=0.07
|
||||
iou_loss=ciou
|
||||
nms_kind=greedynms
|
||||
beta_nms=0.6
|
||||
max_delta=5
|
||||
|
||||
|
||||
[route]
|
||||
@@ -1133,14 +1134,14 @@ activation=leaky
|
||||
size=1
|
||||
stride=1
|
||||
pad=1
|
||||
filters=255
|
||||
filters=27
|
||||
activation=linear
|
||||
|
||||
|
||||
[yolo]
|
||||
mask = 6,7,8
|
||||
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
|
||||
classes=80
|
||||
classes=4
|
||||
num=9
|
||||
jitter=.3
|
||||
ignore_thresh = .7
|
||||
@@ -1153,4 +1154,5 @@ iou_normalizer=0.07
|
||||
iou_loss=ciou
|
||||
nms_kind=greedynms
|
||||
beta_nms=0.6
|
||||
max_delta=5
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
blue-cone
|
||||
yellow-cone
|
||||
orange-cone
|
||||
big-orange-cone
|
||||
@@ -0,0 +1,34 @@
|
||||
#include<iostream>
|
||||
#include<vector>
|
||||
#include "tkdnn.h"
|
||||
#include "test.h"
|
||||
#include "DarknetParser.h"
|
||||
|
||||
int main() {
|
||||
std::string bin_path = "yolo4-csp";
|
||||
std::vector<std::string> input_bins = {
|
||||
bin_path + "/layers/input.bin"
|
||||
};
|
||||
std::vector<std::string> output_bins = {
|
||||
bin_path + "/debug/layer144_out.bin",
|
||||
bin_path + "/debug/layer159_out.bin",
|
||||
bin_path + "/debug/layer174_out.bin"
|
||||
};
|
||||
std::string wgs_path = bin_path + "/layers";
|
||||
std::string cfg_path = std::string(TKDNN_PATH) + "/tests/darknet/cfg/yolo4-csp.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/AfzHE4BfTeEm2gH/download");
|
||||
|
||||
// parse darknet network
|
||||
tk::dnn::Network *net = tk::dnn::darknetParser(cfg_path, wgs_path, name_path);
|
||||
net->print();
|
||||
|
||||
//convert network to tensorRT
|
||||
tk::dnn::NetworkRT *netRT = new tk::dnn::NetworkRT(net, net->getNetworkRTName(bin_path.c_str()));
|
||||
|
||||
int ret = testInference(input_bins, output_bins, net, netRT);
|
||||
net->releaseLayers();
|
||||
delete net;
|
||||
delete netRT;
|
||||
return ret;
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "DarknetParser.h"
|
||||
|
||||
int main() {
|
||||
std::string bin_path = "yolo4_416";
|
||||
std::string bin_path = "yolo4_mmr";
|
||||
std::vector<std::string> input_bins = {
|
||||
bin_path + "/layers/input.bin"
|
||||
};
|
||||
@@ -15,9 +15,9 @@ int main() {
|
||||
bin_path + "/debug/layer161_out.bin"
|
||||
};
|
||||
std::string wgs_path = bin_path + "/layers";
|
||||
std::string cfg_path = "../tests/darknet/cfg/yolo4_416.cfg";
|
||||
std::string name_path = "../tests/darknet/names/coco.names";
|
||||
downloadWeightsifDoNotExist(input_bins[0], bin_path, "https://cloud.hipert.unimore.it/s/982LxTQcNQfFQc4/download");
|
||||
std::string cfg_path = std::string(TKDNN_PATH) + "/tests/darknet/cfg/yolo4_mmr.cfg";
|
||||
std::string name_path = std::string(TKDNN_PATH) + "/tests/darknet/names/mmr.names";
|
||||
// downloadWeightsifDoNotExist(input_bins[0], bin_path, "");
|
||||
|
||||
// parse darknet network
|
||||
tk::dnn::Network *net = tk::dnn::darknetParser(cfg_path, wgs_path, name_path);
|
||||
@@ -0,0 +1,36 @@
|
||||
#include<iostream>
|
||||
#include<vector>
|
||||
#include "tkdnn.h"
|
||||
#include "test.h"
|
||||
#include "DarknetParser.h"
|
||||
|
||||
int main() {
|
||||
std::string bin_path = "yolo4x";
|
||||
std::vector<std::string> input_bins = {
|
||||
bin_path + "/layers/input.bin"
|
||||
};
|
||||
std::vector<std::string> output_bins = {
|
||||
bin_path + "/debug/layer168_out.bin",
|
||||
bin_path + "/debug/layer185_out.bin",
|
||||
bin_path + "/debug/layer202_out.bin"
|
||||
};
|
||||
std::string wgs_path = bin_path + "/layers";
|
||||
std::string cfg_path = std::string(TKDNN_PATH) + "/tests/darknet/cfg/yolo4x.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/5MFjtNtgbDGdJEo/download");
|
||||
|
||||
|
||||
|
||||
// parse darknet network
|
||||
tk::dnn::Network *net = tk::dnn::darknetParser(cfg_path, wgs_path, name_path);
|
||||
net->print();
|
||||
|
||||
//convert network to tensorRT
|
||||
tk::dnn::NetworkRT *netRT = new tk::dnn::NetworkRT(net, net->getNetworkRTName(bin_path.c_str()));
|
||||
|
||||
int ret = testInference(input_bins, output_bins, net, netRT);
|
||||
net->releaseLayers();
|
||||
delete net;
|
||||
delete netRT;
|
||||
return ret;
|
||||
}
|
||||
Reference in New Issue
Block a user