no image
[TensorRT] 마지막 노드 찾기
이 포스팅은 Tensorflow 에서 이미 만들어진 ckpt 파일을 가지고 TensorRT로 변환하는 과정에서 마지막 노드를 찾기 위하여 겪게 된 삽질들을 적어두었다 ^^ Tensorflow에서 이미 만들어진 ckpt 파일만 가지고 pb 파일을 생성할 수 없기 때문에, ckpt 파일을 가지고 모델을 테스트 하는 과정에서 iteration 한번으로 pbtxt 를 생성하였다. 이 때 중요한 점은 테스트를 한번 돌려서 pb 파일을 생성할 수도 있지만 테스트의 pb와 트레이닝을 끝으로 만들어지는 pb 는 다르다는 것이다. 당연히 내부에 포함되어있는 가중치의 값이 다르니까. pbtxt 는 모델의 구조를 담은 파일인데 이와 ckpt 파일을 가지고 freeze 하여 pb 파일을 얻었다. 이 때 모델의 마지막 노드를 ..
2019.08.03
[TensorFlow] .ckpt vs .pb vs .pbtxt 차이점
간단하게 말하자면 아래와 같다. ckpt 파일 모델의 변수(가중치)인 체크포인트 파일 pb 파일 모델의 변수 + 구조 (즉, 전체 그래프) 로 이루어진 바이너리 파일 pbtxt 파일 pb 파일을 읽을 수 있는 텍스트 파일, 즉 모델 구조 파악 가능 더욱 자세히 말하자면 아래와 같다 ... ckpt 파일 텐서플로우에서 학습된 모델의 구조를 제외한 변수들을 담고 있는 파일이다. 즉, 모델의 가중치만 담고있는 파일이다. 그래서 모델에 대한 메타정보를 담고있기 때문에 재학습이 가능하다는 특징이 있다. 하지만, 실제 모델을 돌릴 때 필요 없는 정보들이 너무 많아서 파일의 크기가 무겁다는 단점이 있다. 체크포인트의 저장은 다음과 같이 이루어지며, iteration 별로 체크포인트 파일을 생성 할 수 있다. #/mo..
2019.08.03
no image
[Pose Estimation] wrnchAI vs OpenPose
wrnchAI 의 포즈 추정 시스템과 OpenPose를 비교하였다. wrnchAI는 비디오로부터 인간의 모션과 행위를 분석하기 위한 Real-time 용 AI 소프트웨어 플랫폼 기업이다. 그 중 pose 를 추정하는 기술을 비교하였다. 홈페이지에서 보면 쏠쏠한 자료들이 많이 있다. https://wrnch.ai/technology/ wrnch - Artificial Intelligence For Real World Applications From making our world a safer place to staying healthier and having more fun, wrnchAI is changing how we interact with the world. Browse our enabled fe..
2019.08.03
no image
[Pose Estimation] PoseTrack Dataset
Introduction Pose Estimation 분야에서 가장 유명한 데이터 세트인 COCO, MPII 등에 이어 PoseTrack 이라는 데이터세트가 나왔다. PoseTrack 데이터 세트는 기존의 MPII Human Pose 데이터 세트가 포함되어 있다. 인간 포즈 추정 및 비디오 환경에서의 관절을 추적하기 위한 벤치마크를 담고 있다. 이 데이터 세트는 "Multi-Person Pose Estimation" 또는 "Multi-Person Pose Tracking" 에서 활용 할 수 있다. 1356 video sequences 46K annotated video frames 276K body pose annotations Annotaion 또한 비디오 시퀀스에는 다음과 같은 정보들이 포함되어있다. ..
2019.08.03
no image
[Pose Estimation] Upper Body Pose Dataset
VGG Human Pose Estimation Datasets : human upper-body pose dataset 총 5개의 데이터세트로 구성되어있다. YouTube Pose BBC Pose Extended BBC Pose Short BBC Pose ChaLearn Pose https://www.robots.ox.ac.uk/~vgg/data/pose/index.html VGG Pose Datasets YouTube Pose [1] The YouTube Pose dataset is a collection of 50 YouTube videos for human upper body pose estimation. It consists of 50 videos found on YouTube covering a..
2019.08.03
no image
[TensorRT] TF-TRT vs TRT
TensorFlow에 내장되어있는 TensorRT, 일명 TF-TRT 와 그냥 TensorRT 즉 TRT 와의 성능 차이를 비교하는 벤치마크는 현재 시점(2019.08.03)에 나와있지 않다고 한다. 엔비디아에서 TRT vs TFTRT 에 대한 비교 자료를 만들고 있다고 한다. 참고자료 https://devtalk.nvidia.com/default/topic/1044901/tensorrt/performance-using-the-integration-tensorflow-tensorrt-vs-direct-tensorrt/ https://devtalk.nvidia.com/default/topic/1044901/tensorrt/performance-using-the-integration-tensorflow-te..
2019.08.03
[TensorFlow] 함수 내부에서 TensorFlow Graph 실행하기
텐서플로우 내부에서 코드를 예쁘게 구조화 하여 그래프(Graph)를 실행할 수 있다. 구현할 때, 몇가지 방법이 있다. 1. Tensor 이름 전달하기 with tf.Session(graph=graph) as sess: feed = {"Placeholder:0": 3} print(sess.run("Add:0", feed_dict=feed)) 위와 같이 Placeholder:0 이라는 텐서 자체를 feed 에 넘겨주는 것 대신, def build_graph(): g = tf.Graph() with g.as_default(): a = tf.placeholder(tf.int8, name="a") b = tf.add(a, tf.constant(1, dtype=tf.int8), name="b") return g ..
2019.08.03
[Python] 구글 이미지 크롤링 하기
인스타그램으로 크롤링 하기 이외에도 구글 이미지를 크롤링 할 수 있다. 개인적으로 해시태그를 통해서 크롤링 하는 방법은 네거티브 이미지가 너무 많이 포함되어있기 때문에 비추, 구글 이미지는 자신이 원하는 검색어의 조합을 통해 크롤링 하기 때문에 마음에 드는 이미지가 다수 포함될 수 있다는 장점이 있다. 하지만 한번에 100개 까지 밖에 수집이 안되는 듯 하다. 1. 설치하기 https://google-images-download.readthedocs.io/en/latest/installation.html $ pip install google_images_download $ git clone https://github.com/hardikvasa/google-images-download.git $ cd go..
2019.08.02
[JSON] JSON 파일 뷰어
http://jsonviewer.stack.hu/ Online JSON Viewer jsonviewer.stack.hu 이 페이지에 마우스로 json 파일을 잡아다 끌면 내용이 보인다. 그리고 참고로 jq 라는 것을 이용하여 json 의 내용을 다음과 같이 줄바꿈 하여 편집 할 수 있다. $ jq . person_keypoints_val2017.json > person_keypoints_val2017_jq.json https://stedolan.github.io/jq/ jq jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that se..
2019.08.02
no image
[Python] 인스타그램으로 크롤링하기
도메인에 알맞는 자신만의 데이터 세트를 만들기 위해서는 공개된 데이터 세트를 이용할 수 도 있지만, 추가적으로 인스타그램에 떠돌아다니는 이미지를 수집하여 저장할 수 있다. 인스타그램 크롤러를 통해서 이미지를 수집하는 것은 인스타그램 자체에서 속도를 제한시켜놓았기 때문에 1000장 이상 모으고자 할 경우, 상당히 느리게 수집된다는 단점이 있다. 또한 한 해쉬태그 당 최대 10000장 까지만 수집이 가능하다. https://github.com/huaying/instagram-crawler huaying/instagram-crawler Get Instagram posts/profile/hashtag data without using Instagram API - huaying/instagram-crawler g..
2019.08.02
[Linux] 파일 권한 변경하기
docker 를 사용중인데 파일(이미지, 텍스트 등)이 저장될 때 마다 루트 권한으로 인해 자물쇠가 걸려있어서 다음과 같이 폴더 내 모든 파일의 권한을 변경하였다. ~$ chmod 777 -R ./folder/
2019.07.31
[Pose Estimation] CVPR 2019 accepted papers
"pose" 단어로 추출한 CVPR 2019 accepted papers 관련 분야 천천히 모두 정리할 예정 Pose2Seg: Detection Free Human Instance Segmentation Pushing the Envelope for RGB-based Dense 3D Hand Pose Estimation via Neural Rendering Self-Supervised Learning of 3D Human Pose using Multi-view Geometry FSA-Net: Learning Fine-Grained Structure Aggregation for Head Pose Estimation from a Single Image Does Learning Specific Features ..
2019.07.29