Skip to content

Commit

Permalink
Update rendaring
Browse files Browse the repository at this point in the history
  • Loading branch information
umedan committed May 11, 2023
1 parent 8d51f7f commit 2b21f1e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $ make -j
| Model | Resolutions | GFLOPS | Params | Precision | Sparsity | DNN time on RTX3080 | DNN time on Jetson Orin NX 16GB GPU | DNN time on Jetson Orin NX 16GB DLA| DNN time on Jetson Orin Nano 4GB GPU | cfg | weights |
|---|---|---|---|---|---|---|---|---|---|---|---|
| lightNet | 1280x960 | 58.01 | 9.0M | int8 | 49.8% | 1.3ms | 7.6ms | 14.2ms | 14.9ms | [github](https://github.com/daniel89710/lightNet/blob/master/cfg/lightNet-BDD100K-1280x960.cfg) |[GoogleDrive](https://drive.google.com/file/d/1qTBQ0BkIYqcyu1BwC54_Z9T1_b702HKf/view?usp=sharing) |
| LightNet+Semseg | 1280x960 | 76.61 | 9.7M | int8 | 49.8% | 2.06ms | 15.3ms | 23.2ms | 26.2m | [github](https://github.com/daniel89710/lightNet-TRT/blob/main/configs/lightNet-BDD100K-det-semaseg-1280x960.cfg) | [GoogleDrive](https://drive.google.com/file/d/1ttdVtlDiPun13EQCB4Nyls3Q8w5aXg1i/view?usp=sharing)|
| LightNet+Semseg | 1280x960 | 76.61 | 9.7M | int8 | 49.8% | 2.06ms | 15.3ms | 23.2ms | 26.2ms | [github](https://github.com/daniel89710/lightNet-TRT/blob/main/configs/lightNet-BDD100K-det-semaseg-1280x960.cfg) | [GoogleDrive](https://drive.google.com/file/d/1ttdVtlDiPun13EQCB4Nyls3Q8w5aXg1i/view?usp=sharing)|

* "DNN time" refers to the time measured by IProfiler during the enqueueV2 operation, excluding pre-process and post-process times.
* Orin NX has three independent AI processors, allowing lightNet to be parallelized across a GPU and two DLAs.
Expand Down
2 changes: 1 addition & 1 deletion modules/class_yolo_detector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class YoloDectector
uint32_t *colormap = _p_net->get_detection_colormap();
int id = result.id;
if (colormap) {
cv::rectangle(img, result.rect, cv::Scalar(colormap[3*id+2], colormap[3*id+1], colormap[3*id+0]), 2);
cv::rectangle(img, result.rect, cv::Scalar(colormap[3*id+2], colormap[3*id+1], colormap[3*id+0]), 4);
} else {
cv::rectangle(img, result.rect, cv::Scalar(255, 0, 0), 2);
}
Expand Down
9 changes: 7 additions & 2 deletions modules/yolo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,15 @@ void Yolo::createYOLOEngine(const nvinfer1::DataType dataType, Int8EntropyCalibr
std::string softmaxLayerName = "segmenter_" + std::to_string(segmenter_count);
softmax->setName(softmaxLayerName.c_str());
previous = softmax->getOutput(0);



previous->setName(softmaxLayerName.c_str());
assert(previous != nullptr);
m_Network->markOutput(*previous);
std::string outputVol = dimsToString(previous->getDimensions());
tensorOutputs.push_back(softmax->getOutput(0));
//tensorOutputs.push_back(previous);
printLayerInfo(layerIndex, "segmenter", inputVol, outputVol, " -");

TensorInfo& curYoloTensor = m_OutputTensors.at(outputTensorCount);
Expand Down Expand Up @@ -792,9 +796,10 @@ std::vector<cv::Mat> Yolo::get_depthmap(std::vector<cv::Mat> &argmax) {
for (int x = 0; x < tensor.grid_w; x++) {
int id = gray.at<unsigned char>(y, x);
float rel = id/(float)c;
int tmp = 120 + 90 * (1.0-rel);
//int tmp = 120 + 90 * (1.0-rel);
//tmp = tmp > 60.0 ? 60.0 : tmp;
int hue = tmp > 180 ? tmp-180 : tmp;
int hue = 120 + 90 * (1.0-rel);
hue = hue > 180 ? (180-hue) * (-1) : hue;
unsigned char val = 255 - 180 * (1.0-rel);
//hue = hue < 300 ? 0 : hue;
hsv.at<cv::Vec3b>(y, x)[0] = hue;
Expand Down

0 comments on commit 2b21f1e

Please sign in to comment.