[CUDA] CUDA Driver Version
CUDA Driver Running a CUDA application requires the system with at least one CUDA capable GPU and a driver that is compatible with the CUDA Toolkit. See Table 2. For more information various GPU products that are CUDA capable, visit https://developer.nvidia.com/cuda-gpus. Each release of the CUDA Toolkit requires a minimum version of the CUDA driver. The CUDA driver is backward compatible, meani..
2020.07.06
C++ 환경에서 OpenCV 3.4.0 의 resize 사용 시 나타나는 문제
문제의 코드 cv::resize(_output, _output, cv::Size(dst_w, dst_h), cv::INTER_CUBIC); 위와 같이 double fx, double fy 의 인자를 넣지 않고 interpolation 옵션을 주면 안먹는다... (픽셀 값 확인함) 왜지? .... 보통 값 생략 하면 디폴트 값으로 들어가는 것이 아닌가 cv::INTER_CUBIC 의 값이 2로 들어가서 fx 값으로 대치된건가? ... 문제가 해결된 코드 cv::resize(_output, _output, cv::Size(dst_w, dst_h), 0, 0, cv::INTER_CUBIC); resize¶ Resizes an image. C++: void resize(InputArray src, OutputA..
2020.07.01
Visual Studio Code 에서 Tab 키 안될 때
Ctrl + M https://code.visualstudio.com/docs/getstarted/keybindings Visual Studio Code Key Bindings Here you will find the complete list of key bindings for Visual Studio Code and how to change them. code.visualstudio.com
2020.06.30
[CMake] Ubuntu 환경에서 CMakeLists.txt 생성하기 위한 참고자료들
https://cmake.org/cmake/help/v3.0/manual/cmake-commands.7.html cmake-commands(7) — CMake 3.0.2 Documentation cmake.org https://gist.github.com/luncliff/6e2d4eb7ca29a0afd5b592f72b80cb5c#Linking CMake 할때 쪼오오금 도움이 되는 문서 CMake 할때 쪼오오금 도움이 되는 문서. GitHub Gist: instantly share code, notes, and snippets. gist.github.com https://cgold.readthedocs.io/en/latest/tutorials/tests.html 3.10. Tests — CGold 0.1 ..
2020.06.17
[Python] Why time.time() gives 0.0?
You could use timeit.default_timer instead of time.time. timeit.default_timer will choose the best timer (time.time, time.clock or time.perf_counter) for your system. The resolution of the timer isn't unlimited; it goes up by small amounts periodically. If the two calls are close enough together, you will see a zero value. If you tried a large number of such calls, you would probably find that t..
2020.06.17
[TensorRT] TensorRT GA vs RC => Use the GA version
TensorRT 다운로드 시 특별한 이유가 없는 경우, GA 버전을 다운 받는 것을 추천한다. GA is a production release, it stands for "General Availability". It is the version most people should be using, for most activities. It has gone through a full test cycle. RC is a "Release Candidate". It is a preproduction version, an early release version. In general, the recommendation would be to use a GA version, unless you have a specifi..
2020.05.18
[TensorRT] Assertion `size >= bsize && "Mismatch between allocated memory size and expected size of serialized engine."'
아래와 같은 에러는 TensorRT 7.0 버전에서 만든 Engine 을 TensorRT 7.0 미만의 버전에서 사용하였을 때 나는 에러이다. 해당하는 TensorRT 버전에 맞게 끔 다시 Engine 을 생성해서 Deserialization 을 시도해야한다. python3: engine.cpp:868: bool nvinfer1::rt::Engine::deserialize(const void*, std::size_t, nvinfer1::IGpuAllocator&, nvinfer1::IPluginFactory*): Assertion `size >= bsize && "Mismatch between allocated memory size and expected size of serialized engine."..
2020.05.18
[Linux] 리눅스 파티션 나누기
리눅스 디스크 파티션에 대해서 간단히 알아보았다. 리눅스 파티션은 루트 파티션이라고 부르는 '/' 파티션과 'swap' 파티션 2개만 있어도 운영이 가능하다. 왜냐하면 루트 파티션만 생성하면 나머지 파티션 들인 /bin /etc /boot /usr /tmp /var /home 들은 모두 루트 파티션 아래 종속되기 때문이다. 물론 실무에서 리눅스를 운영할 때는 지금과 같이 파티션을 두 개로 나누지 않고, 필요한 용도에 따라서 다양하게 분할한다. 하드디스크 80GB 기준으로 다음과 같이 나눌 수 있다. 마운트 포인트 권장 크기 비고 / 10GB 루트 파티션 /bin 기본 명령어가 들어가 있음 /sbin 시스템 관리용 명령어가 들어가 있음 /etc 시스템의 환경 설정과 관련된 파일이 들어가 있음 /boot 4..
2020.05.16
[PyCUDA] 정리중
https://documen.tician.de/pycuda/driver.html Device Interface — PyCUDA 2019.1.2 documentation Pagelocked Allocation pycuda.driver.pagelocked_empty(shape, dtype, order='C', mem_flags=0) Allocate a pagelocked numpy.ndarray of shape, dtype and order. mem_flags may be one of the values in host_alloc_flags. It may only be non-zero on CUDA 2.2 and newer. documen.tician.de https://documen.tician.de/pyc..
2020.05.14
[Onnx] Onnx Tutorials (정리중)
Onnx Tutorials https://github.com/onnx/tutorials onnx/tutorials Tutorials for creating and using ONNX models. Contribute to onnx/tutorials development by creating an account on GitHub. github.com https://github.com/onnx/onnx-tensorrt onnx/onnx-tensorrt ONNX-TensorRT: TensorRT backend for ONNX. Contribute to onnx/onnx-tensorrt development by creating an account on GitHub. github.com https://githu..
2020.05.14
no image
[TensorRT] TensorRT 및 Tensor Core에서 NCHW vs NHWC 형식의 성능 차이
1. TensorRT : NCHW vs NHWC "It’s recommended to use NCHW format to get better performance with TensorRT." NVIDIA 에서는 TensorRT 입력 값으로 NCHW 포맷을 권장한다. 사용자가 TensorRT Engine 에 Input 값을 NHWC 포맷으로 입력해도 되지만, TensorRT 에서 최적화 될 때, 입력값과 호환되도록 여러 형식 변환기를 자동으로 삽입한다. 즉, NVIDIA는 입력값이 어찌되었던 GPU Acceleration 으로 인해 NCHW 를 형식을 채택한다. 또한, NHWC 형식을 선호하는 경우 UFF Parser 가 호환성을 처리할 수 있으며, 일반적으로 Caffe 는 NCHW 형식을 사용하며, 호환하..
2020.04.29
[OpenCV] Image Crop
OpenCV 에서 ROI 만큼 이미지를 Crop 시키는 방법은 아래와 같다. 간단한 방법인데, 잊지않으려고 정리한다. Python 구현 # x, y, w, h refers to the ROI for which the image is to be cropped. img = cv2.imread('test.jpg') cropped_img = img[y: y + h, x: x + w] C++ 구현 Mat img = cv::imread("test.jpg"); Rect bounds(0,0,img.cols,img.rows); Rect r(x,y,width,height); // partly outside Mat roi = img( r & bounds ); // cropped to fit image 위와 같이 구현하면 아..
2020.04.29