[ONNX] ONNX 배치 사이즈 변경하는 방법 + 삽질
onnx batch size change 라는 키워드를 통해 나온 검색 결과에 의하면, 다음 코드를 사용하면 기존에 만들어 두었던 onnx 파일의 배치 사이즈를 변경할 수 있다고 하는데, 아래 코드는 입력 사이즈만 변경하는 코드이다. 절대 아래와 같이 사용하면 안된다. import onnx def change_input_dim(model): # Use some symbolic name not used for any other dimension sym_batch_dim = "N" # or an actal value actual_batch_dim = 4 # The following code changes the first dimension of every input to be batch-dim # Modif..
2021.02.02
no image
한빛미디어 "진지한 파이썬" 베타리뷰어로 참여해본 짧은 후기
지난해 연말에 한빛미디어 "진지한 파이썬"이라는 책의 베타리뷰어로 참여했었는데, 드디어 책이 출간되었다. 베타리뷰는 처음 해보았지만, 굉장히 즐겁게 작업했던 기억이 있다. 기회만 된다면 또 참여하고 싶은 마음 한가득. (진지한 파이썬 이라는 책 꼭 사세요) 또한 2019년, 2020년에 이어 올해에도 한빛미디어 도서 서평단에 선정되어 3년째 서평단 활동을 하고 있다. 나중에는 책의 저자가 되는게 꿈이지만 ☆ 이렇게나마 추천사를 적게되어 책에 이름을 실어볼 수 있어서 기분이 너무 좋다! 기회를 주신 한빛미디어에게 깊은 감사를 드리며 ♡ 곧 진지한 파이썬 책 리뷰 글도 작성해서 올려야겠다.
2021.01.29
[DeepStream] ubuntu에서 nvidia docker + ngc 설치하기
본 포스팅은 아래 링크를 실행하기 위한 준비과정이다. 참고로 아래 링크는 NVIDIA DeepStream을 이용하여 RetinaNet 모델을 학습시키는 과정에 관한 것이다. developer.nvidia.com/blog/real-time-redaction-app-nvidia-deepstream-part-1-training/ Building a Real-time Redaction App Using NVIDIA DeepStream, Part 1: Training | NVIDIA Developer Blog Some of the biggest challenges in deploying an AI-based application are the accuracy of the model and being able to..
2021.01.27
[CUDA] 기존 CUDA 버전 삭제하기
다음과 같이 간단하게 CUDA 관련 파일들을 제거할 수 있다. 이는 기존에 설치된 CUDA 를 제거하고 새로운 버전(다운 그레이드 또는 업그레이드)을 설치하기 위함이다. 1. CUDA 제거 sudo apt-get --purge remove 'cuda*' sudo apt-get autoremove --purge 'cuda*' 2. CUDA 관련 폴더 제거 sudo rm -rf /usr/local/cuda-11.0 sudo rm -rf /usr/local/cuda
2021.01.26
no image
[DeepStream] 딥스트림 개요 및 참고자료들
DeepStream 이란 ? 딥 러닝을 활용한 비디오 분석 응용 프로그램의 고 성능 개발을 손쉽게 할 수 있도록 만든 NVIDIA의 라이브러리이다. 높은 수준의 C++ API와 고성능 런타임 (High Performance Runtime)을 통해 GPU 가속 Transcoding 과 딥러링 추론 기능을 빠르게 통합하여 보다 반응이 빠른 AI 기반 서비스를 제공할 수 있도록 한다. 이는 Intelligent Video Analytics의 보다 손 쉬운 개발을 지원하며 개발자들은 딥스트림을 사용해 실시간으로 동영상 프레임을 처리하고, 이해하며 분류 작업을 진행 할 수 있다. 또한 매우 높은 수준으로 요구되는 처리량(Throughput) 및 반응 시간(Latency)에 대한 요건을 충족 시킬 수 있다. 이러한..
2021.01.24
no image
[DeepStream] GTC 2020, Certification (Deep Learning for Intelligent Video Analytics)
GTC 2020 (2020/10/6) NVIDIA Deep Learning Institute Deep Learning for Intelligent Video Analytics Certification
2021.01.22
[Python] argparse(Argument Parser) 에서 boolean 값 받기
아래와 같이 str2bool 함수를 구현하여 argparse 에서 boolean 값을 받아올 수 있다. def str2bool(v): if isinstance(v, bool): return v if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() in ('no', 'false', 'f', 'n', '0'): return False else: raise argparse.ArgumentTypeError('Boolean value expected.') import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description='test') parse..
2021.01.14
no image
[CUDA] Supported CUDA level of GPU and card
보다 더 자세한 사항은 맨 아래 링크를 참고하길 바란다. CUDA SDK 1.0 support for compute capability 1.0 – 1.1 (Tesla)[25] CUDA SDK 1.1 support for compute capability 1.0 – 1.1+x (Tesla) CUDA SDK 2.0 support for compute capability 1.0 – 1.1+x (Tesla) CUDA SDK 2.1 – 2.3.1 support for compute capability 1.0 – 1.3 (Tesla)[26][27][28][29] CUDA SDK 3.0 – 3.1 support for compute capability 1.0 – 2.0 (Tesla, Fermi)[30][31] CUD..
2021.01.11
[Python] pytube 이용하여 Youtube 영상 저장하기
1. pytube 설치하기 python3 -m pip install --upgrade "git+https://github.com/nficano/pytube.git" 2. 코드 실행하기 참고로 유튜브 링크는 원하는 유튜브 영상을 켠 뒤 주소 창에서 긁어오면 된다. import os import pytube # pip install pytube from pytube.cli import on_progress url = "유튜브 링크" yt = pytube.YouTube(url, on_progress_callback=on_progress) print(yt.streams) save_dir = "./" # 저장경로 yt.streams.filter(progressive=True, file_extension="mp4"..
2020.12.28
pytube 를 이용하여 youtube 영상 크롤링 시 발생하는 문제
pip install pytube 명령어를 통해 pytube 패키지를 깔고 유튜브 영상 크롤링을 하려는데 어떤 영상은 정상으로 다운로드되고 또 어떤 영상은 아래와 같은 에러가 발생해서 AttributeError: 'NoneType' object has no attribute 'download' pip install pytube3 명령어를 통해 pytube 패키지를 깔았더니 아래와 같은 에러가 발생하였다. pytube.exceptions.RegexMatchError: get_ytplayer_config: could not find match for config_patterns ../pytube/extract.py 에서 config_patterns 을 바꿔보기도 했지만 소용 없어서 아래와 같이 github ..
2020.12.28
no image
[Pose Estimation] 3D human pose estimation in video with temporal convolutions and semi-supervised training
이 논문은 Facebook AI Research 에서 나온 논문이며, CVPR 2019에 채택되었다. 3D Human Pose Estimation 분야를 찾아보다가 알게된 논문인데, 현존하는 SOTA 2D Pose Estimation 방법들과 잘 결합하면 비디오 환경에서 좋은 결과를 얻을 수 있을 것으로 예상된다. 관건은 정확도 높은 2D Pose Estimation 이다. 위 gif 들은 아마 2D Pose GT를 이용했기 때문에 3D Pose 가 매우 자연스러워 보인다. Paper : arxiv.org/pdf/1811.11742.pdf Github : github.com/facebookresearch/VideoPose3D facebookresearch/VideoPose3D Efficient 3D hu..
2020.12.21
no image
[Deep Learning] Weight Standardization (+ 2D, 3D 구현 방법)
Weight Standardization Paper : arxiv.org/abs/1903.10520 Micro-Batch Training with Batch-Channel Normalization and Weight Standardization Batch Normalization (BN) has become an out-of-box technique to improve deep network training. However, its effectiveness is limited for micro-batch training, i.e., each GPU typically has only 1-2 images for training, which is inevitable for many computer v arxi..
2020.12.20