Skip to content

Instantly share code, notes, and snippets.

#include <chrono>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/opencv.hpp>
from tqdm import tqdm
import numpy as np
import os
import warnings
def bb_intersection_over_union(A, B) -> float:
xA = max(A[0], B[0])
yA = max(A[1], B[1])
xB = min(A[2], B[2])
#include "common.h"
#include "cudaUtility.h"
#include "mathFunctions.h"
#include "pluginImplement.h"
#include "tensorNet.h"
#include "loadImage.h"
#include "imageBuffer.h"
#include <chrono>
#include <thread>
#include <chrono>
@nvnnghia
nvnnghia / Install NVIDIA Driver and CUDA.md
Created August 13, 2018 06:41 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@nvnnghia
nvnnghia / build_opencv.sh
Created April 19, 2018 08:16
build opencv
git clone https://github.com/Itseez/opencv.git --depth=1
git clone https://github.com/Itseez/opencv_contrib --depth=1
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_TBB=ON \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
# Source:
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_pets.md
# Create data:
python object_detection/dataset_tools/create_pascal_tf_record.py --data=/home/phatv/nghia/mxnet-yolo/data1/VOCdevkit/ --year=VOC2012 --output_path=val.record --set=val
# Train:
python train.py --logtostderr --train_dir=train/ --pipeline_config_path=train/ssd_mobilenet_v11_coco.config
#combine ckpt to inference graph:
@nvnnghia
nvnnghia / Install cudnn
Last active April 12, 2021 05:26
Install cudnn on linux
source: http://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html
2.3. Installing cuDNN on Linux
The following steps describe how to build a cuDNN dependent program.
Choose the installation method that meets your environment needs.
For example, the tar file installation applies to all Linux platforms.
The debian installation package applies to Ubuntu 14.04 and 16.04.
In the following sections:
your CUDA directory path is referred to as /usr/local/cuda/
your cuDNN download path is referred to as <cudnnpath>