본문 바로가기

컴퓨터비전

(3)
Faster R-CNN 실습해보기 지금의 COCO dataset으로 pretrained된 inference 모델은 tensorflow만으로 사용가능하다. 하지만 향후 사용해보게 될 tensorflow object detection API는 tensorflow에 들어있지 않고 따로 install 해야한다. 이는 custom data를 학습 시키는 데에 사용된다. 이를 통해 만들어진 모델은 그냥 tensorflow에서 object detection을 수행할 수 있다. #inference graph를 읽음 with tf.gfile.FastGFile(os.path.join(default_rcnn_dir, 'pretrained/faster_rcnn_resnet50_coco_2018_01_28/frozen_inference_graph.pb'), '..
Fast R-CNN과 Faster R-CNN single stage라서 전체 네트워크를 한번에 업데이트 가능하다는 점에서 의의가 있다. 과정 1. input으로 이미지와 region proposal(selective search를 통한) 2. conv feature map을 생성한다. 3. RoI pooling layer을 통과한다.(고정된 feature vector 생성을 위해) 4. fc layer 지난 뒤 5. multi task로 softmax(어떤 물체인가?), bounding box regression(위치 상세 조정)이 한번에 진행 RoI pooling layer RoI 영역에 한하여 max pooling을 통해 feature map으로부터 고정된 길이의 저차원 벡터로 축소 faster r-cnn selective search(cpu로..
R-CNN 과정 1. input 이미지를 넣는다. 2. selective search를 통해 약 2000개 정도의 bounding box에 대한 region proposal을 받는다. 3. 이후 fully connected layer에 고정된 사이즈로 input이 들어가야 하기 때문에 cnn input때부터 아예 warp를 통해서 제각각 사이즈인 후보 상자들을 억지로 227*227 사이즈로 변형시킨다. 4. CNN을 통과하여 feature vector이 나온다. 5-1. feature vector을 가지고 각 클래스 별로 svm classifier을 학습시킨다. 객체인가, 객체라면 어떤 물체일 확률이 높은지에 대한 score을 갖게 된다. 5-2. feature vector을 가지고 bounding box regr..