<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>lake_park_0706.log</title>
        <link>https://velog.io/</link>
        <description>호수공원</description>
        <lastBuildDate>Thu, 02 Feb 2023 06:50:56 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>lake_park_0706.log</title>
            <url>https://velog.velcdn.com/images/lake_park_0706/profile/e72f9096-dd0e-44ea-8e7f-9c647037fb18/image.jpg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. lake_park_0706.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/lake_park_0706" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[Review] Self-supervised Vision Transformers for Land-cover Segmentation and Classification]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Self-supervised-Vision-Transformers-for-Land-cover-Segmentation-and-Classification</link>
            <guid>https://velog.io/@lake_park_0706/Review-Self-supervised-Vision-Transformers-for-Land-cover-Segmentation-and-Classification</guid>
            <pubDate>Thu, 02 Feb 2023 06:50:56 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>In this paper, it proposed the method to <strong>combine vision transformer architecture and self-supervied learning</strong>  </li>
</ul>
<hr>
<h1 id="2-method">2. Method</h1>
<ul>
<li>Overall structure
<img src="https://velog.velcdn.com/images/lake_park_0706/post/7f9709ef-a181-4820-b657-1f8b8714408f/image.png" alt=""></li>
</ul>
<h4 id="21-self-supervised-learning">2.1. Self-supervised learning</h4>
<ul>
<li><img src="https://velog.velcdn.com/images/lake_park_0706/post/ed7b3ec4-2f79-49a1-855c-e86edca0ac75/image.png" alt=""></li>
</ul>
<h4 id="22-swinunet">2.2. SwinUNet</h4>
<ul>
<li>This work proposed two separate SwinUNet streams for contrastive learning process as Fig 2. </li>
</ul>
<hr>
<h1 id="3-result">3. Result</h1>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/e623276d-e562-4ed5-a2ca-1c78f1a895a9/image.png" alt=""></p>
<hr>
<blockquote>
<p>Reference</p>
</blockquote>
<ul>
<li><a href="https://openaccess.thecvf.com/content/CVPR2022W/EarthVision/papers/Scheibenreif_Self-Supervised_Vision_Transformers_for_Land-Cover_Segmentation_and_Classification_CVPRW_2022_paper.pdf">https://openaccess.thecvf.com/content/CVPR2022W/EarthVision/papers/Scheibenreif_Self-Supervised_Vision_Transformers_for_Land-Cover_Segmentation_and_Classification_CVPRW_2022_paper.pdf</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review] Swin Transformer: Hierarchical Vision Transformer using Shifted Windows]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Swin-Transformer-Hierarchical-Vision-Transformer-using-Shifted-Windows</link>
            <guid>https://velog.io/@lake_park_0706/Review-Swin-Transformer-Hierarchical-Vision-Transformer-using-Shifted-Windows</guid>
            <pubDate>Wed, 01 Feb 2023 06:49:15 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>The transformer structure shows that adaptation of attention module can outperform traditional CNN-based model.</li>
<li>However the <strong>transformer</strong> has a problem that it is computational complexity is <strong>quadratic to image size</strong>. Therefore, in this paper, it proposed <strong>swin-transformer which is linear to image size</strong>.</li>
</ul>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/b914ec6e-e051-4e20-be34-e758cfe716df/image.png" alt=""></p>
<hr>
<h1 id="2-method">2. Method</h1>
<h3 id="21-shifted-window-based-self-attention">2.1. Shifted Window based Self-Attention</h3>
<ul>
<li><p>Computational complexity of transformer is caused from global attention</p>
</li>
<li><p>Self-attention in non-overlapped windows</p>
<ul>
<li>For efficiency, the paper proposed the method to calculate <strong>local attention in non-overlapped windows with MxM patches</strong>. It can decrease the computational overhead as shown in equation (2)<img src="https://velog.velcdn.com/images/lake_park_0706/post/19463ef2-dae2-48f8-a962-bac9c7e8d4bd/image.png" alt=""></li>
</ul>
</li>
<li><p>Shifted window partitioning in successive blocks</p>
<ul>
<li>Just seperating the image to <strong>MxM patch might decrease connections across windows</strong>. To deal with the issue, shifted window partitioning approach is proposed.<img src="https://velog.velcdn.com/images/lake_park_0706/post/71f9b555-77b8-4963-a731-fcde8619c3f3/image.png" alt=""></li>
</ul>
</li>
<li><p>Efficient batch computation for shifted configuration</p>
<ul>
<li>The cyclic shift makes computional cost same as regular window partition(3x3 -&gt; 2x2)<img src="https://velog.velcdn.com/images/lake_park_0706/post/a1605168-5566-427c-9689-6fc80a116fdd/image.png" alt=""></li>
</ul>
</li>
</ul>
<hr>
<h1 id="3-result">3. Result</h1>
<ul>
<li><p>Image classification in ImageNet<img src="https://velog.velcdn.com/images/lake_park_0706/post/51d9a345-0a15-41da-8828-7f923cb74e4c/image.png" alt=""></p>
</li>
<li><p>Object detection in COCO<img src="https://velog.velcdn.com/images/lake_park_0706/post/12a8909b-4e71-4461-95d5-31f2eed16c7e/image.png" alt=""></p>
</li>
<li><p>Semantic Segmentation on ADE20K<img src="https://velog.velcdn.com/images/lake_park_0706/post/bd721e00-5c1b-4425-8751-2a04fc1def6b/image.png" alt=""></p>
</li>
</ul>
<hr>
<blockquote>
<p>Reference
<a href="https://arxiv.org/abs/2103.14030v2">https://arxiv.org/abs/2103.14030v2</a></p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review] Stand-Alone Self-Attention in Vision Models]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Stand-Alone-Self-Attention-in-Vision-Models</link>
            <guid>https://velog.io/@lake_park_0706/Review-Stand-Alone-Self-Attention-in-Vision-Models</guid>
            <pubDate>Tue, 31 Jan 2023 05:34:21 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>Architecture of CNN has out-standing performance in computer vision applications. However, <strong>capturing long term arange interactions for convolutions is challenging</strong> because of poor scaling properties.</li>
<li>The problem of long range interaction has been tackled with using of <strong>attention</strong> and most of works using attention had used <strong>global attention layers as an add-on to existing CNN</strong>.</li>
<li>Therefore, this paper proposed <strong>the local self-attention layer that can be used for both small and large inputs</strong>. </li>
</ul>
<hr>
<h1 id="2-method">2. Method</h1>
<h3 id="21-base-model-of-cnn">2.1. Base model of CNN</h3>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/8d2fb388-41a7-4213-926e-6f579a76295c/image.png" alt=""></p>
<h3 id="22-self-attention">2.2. Self-Attention</h3>
<ul>
<li><strong>Self-attention is</strong> defined as attention applied to a single context which <strong>query, key and value are extracted from the same image</strong>.</li>
<li>Single-head attnetion is computed as equation(2). With the equation, the model <strong>extracts local attention</strong>.(k is spatial extent) Global attention can be used after spatial downsampling has been applied because of computational cost issue.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/eaa54108-68a9-430e-a444-38b6126ba128/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/65bf173d-9131-4657-988e-48510ea780b8/image.png" alt=""></li>
<li>In practice, <strong>multiple attention heads are used to learn multiple dinstinct representations of the input</strong>. Feature of input are divided into N groups in depthwise and the dimension of each weight is d_out/N * d_in/N. Finally the model output representation in d_out after concatenating.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/481ac61a-b3ab-410c-8c6a-1eedba6c0dbd/image.png" alt=""></li>
</ul>
<h3 id="23-fully-attentional-vision-models">2.3. Fully Attentional Vision Models</h3>
<ul>
<li><p>The main purpose of this work is <strong>creating a fully attentional vision model</strong>. Therefore, it takes an existing convolutional architecture and <strong>replaces every convolutional layer with attention layer</strong>. </p>
<ul>
<li>In this paper, it references resnet</li>
</ul>
</li>
<li><p>For the initial layers of CNN refered as stem, attnetion layer is applied without positional information. </p>
</li>
</ul>
<hr>
<h1 id="3-result">3. Result</h1>
<ul>
<li><p>In imagenet classification
<img src="https://velog.velcdn.com/images/lake_park_0706/post/534c358f-a417-42f3-a07d-191e8d48d28c/image.png" alt=""></p>
</li>
<li><p>Coco dataset obeject detection
<img src="https://velog.velcdn.com/images/lake_park_0706/post/569f8704-8265-405c-b032-a3fc2274a531/image.png" alt=""></p>
</li>
<li><p>Affect of relative position information 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/ab1376b6-e26c-4711-9dca-ebbfc576ab52/image.png" alt=""></p>
</li>
<li><p>Spatial extent
<img src="https://velog.velcdn.com/images/lake_park_0706/post/11e7b2ad-0d0c-49b0-a906-66b6e3191541/image.png" alt=""></p>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Reveiw] Dense Cross-Query-and-Support Attention Weighted Mask Aggregation for Few-Shot Segmentation - incomplete]]></title>
            <link>https://velog.io/@lake_park_0706/Reveiw-Dense-Cross-Query-and-Support-Attention-Weighted-Mask-Aggregation-for-Few-Shot-Segmentation-incomplete</link>
            <guid>https://velog.io/@lake_park_0706/Reveiw-Dense-Cross-Query-and-Support-Attention-Weighted-Mask-Aggregation-for-Few-Shot-Segmentation-incomplete</guid>
            <pubDate>Fri, 27 Jan 2023 08:38:31 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>This paper proposed the model that <strong>expolits all available foreground and background features in the support images</strong>  for dense pixel-wise classification. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/1d38e760-7582-4df3-8eea-fc8bf8cf2731/image.png" alt=""></li>
</ul>
<h1 id="2-method">2. Method</h1>
<ul>
<li>Overall structure
<img src="https://velog.velcdn.com/images/lake_park_0706/post/30ef0139-1246-402d-bee7-f9f1a3d99ebd/image.png" alt=""><h3 id="21-feature-extraction-and-mask-preparation">2.1. Feature extraction and mask preparation</h3>
</li>
<li>First feature vector of query image and support image is extracted from backbone model. The <strong>feature extractor outputs multi-scale, multi-layer feature map</strong> like Fig 2. Meanwhile, <strong>support masks</strong> of multi-layer are generated via bilinear <strong>interpolation</strong>. </li>
</ul>
<h3 id="22-multi-scale-multi-layer-cross-attention-weighted-mask-aggregation">2.2. Multi-scale multi-layer cross attention weighted mask aggregation</h3>
<ul>
<li>Attention is the main concept of vision transformer and the paper <strong>use equation (1) to adopt to compute attention</strong> across the query and support features. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/b174a4bb-9450-4282-aee4-b32e2a7c29f2/image.png" alt=""></li>
<li>The dimension of feauture map is h x w x c and mask is h x w x 1</li>
<li>The proposed model flatten the feature vector and interpolated masks to treat each pixel as a token. Then, generate Q and K matrices. After that, dot-product attention can be computed for each head. Lastly the paper average the outputs of the multiple heads for each token and reshaped them.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/347c2a1b-f9df-4ad1-81c2-fdf4c245ba21/image.png" alt=""></li>
</ul>
<h1 id="3-result">3. Result</h1>
<ul>
<li><img src="https://velog.velcdn.com/images/lake_park_0706/post/afaf6851-73c6-49df-80db-b92515eb3b1d/image.png" alt=""></li>
<li>Efficiency
<img src="https://velog.velcdn.com/images/lake_park_0706/post/5b0af3ae-49b9-44da-903d-0df8e0a2d438/image.png" alt=""></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review] PANet: Few-Shot Image Semantic Segmentation with Prototype Alignment]]></title>
            <link>https://velog.io/@lake_park_0706/Review-PANet-Few-Shot-Image-Semantic-Segmentation-with-Prototype-Alignment</link>
            <guid>https://velog.io/@lake_park_0706/Review-PANet-Few-Shot-Image-Semantic-Segmentation-with-Prototype-Alignment</guid>
            <pubDate>Thu, 19 Jan 2023 07:21:25 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>Previous few-shot segmentation method <strong>do not differentiate the feature extraction</strong> of the target object in the support set <strong>and segmentation process</strong> of query image, which may be problematic since the segmentation model representation is mixed with the feature extracted from support set. </li>
<li>This paper <strong>propose the model that is separated as prototype extraction and non-parametric learning</strong>. Moreover, <strong>the paper attempted to use mask for few shot learning process</strong>. </li>
</ul>
<h1 id="2-method">2. Method</h1>
<ul>
<li>Overall structure 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/0488fc5c-e39b-471b-a952-b7fbc4dbf233/image.png" alt=""></li>
</ul>
<h3 id="21-prototype-learning">2.1. Prototype learning</h3>
<ul>
<li>In proposed model, it leverages the mask annotations over the support images to learn prototypes for foreground and background separately. </li>
<li>Before leveraging, there are two strategies to exploit the segmentations masks. <strong>Early fusion masks the support image</strong> before feature extration. Otherwize, <strong>late fusion masks the feature map</strong> to treate foreground and background differently. <strong>The paper used the late fusion</strong>. </li>
<li>Equation (1) means the prototype of foreground and (2) means the prototype of back ground.<br><img src="https://velog.velcdn.com/images/lake_park_0706/post/cef05ab3-5056-48f8-9ca0-00b25e60822a/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/4d3e82f2-287b-470a-96f9-cc9883863b77/image.png" alt=""></li>
</ul>
<h3 id="22-non-parametric-metric-learning">2.2. Non-parametric metric learning</h3>
<ul>
<li>To segment the query image, <strong>first the model calculates the distance between query feature vector at each spatial location with each computed prototype</strong> at 2.1. <strong>Second, softmax is applied over the distance to produce proability map</strong>. Cosine similarity is applied for calculating distance. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/e76fa922-01a3-451b-8e88-21676f9a7fa1/image.png" alt=""></li>
</ul>
<h3 id="23-prototype-alignment-regularization-par">2.3. Prototype alignment regularization (PAR)</h3>
<ul>
<li>This module make it easy to extract general feature from the support set image to guide the FSS.</li>
<li>If the model can predict a good segmentation mask, then <strong>prototypes learned from query set should be able to segment support set images</strong>. Thus, PAR takes <strong>the query and predicted mask as the new support set</strong> and <strong>treats the old support set as the new query image</strong> as Figure 2 (b).</li>
</ul>
<h1 id="3-result">3. Result</h1>
<ul>
<li><p><img src="https://velog.velcdn.com/images/lake_park_0706/post/2682e1f0-f79e-4f60-8436-40ecc13dfe94/image.png" alt=""></p>
</li>
<li><p>Comparision with other model
<img src="https://velog.velcdn.com/images/lake_park_0706/post/848016a3-7ca4-4b9c-9922-eda22f707719/image.png" alt=""></p>
</li>
<li><p>Analysis on PAR
<img src="https://velog.velcdn.com/images/lake_park_0706/post/12bf345c-3808-4c55-9844-aad90382b60c/image.png" alt=""></p>
</li>
<li><p>Result of using weak annotation
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d2a39e9a-3a66-423a-a215-b298cb8410bf/image.png" alt=""></p>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review] Few-Shot Segmentation Propagation with Guided Networks]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Few-Shot-Segmentation-Propagation-with-Guided-Networks</link>
            <guid>https://velog.io/@lake_park_0706/Review-Few-Shot-Segmentation-Propagation-with-Guided-Networks</guid>
            <pubDate>Wed, 18 Jan 2023 12:15:07 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>Semi- and weakly supervised segmentation methods cannot segment for a new input class. Therefore, this paper <strong>attempted to perform segmentation of a new input</strong> given a few support image in the same class. </li>
<li>To perform such problem, this paper addressed three key parts of FSS problems  (1) <strong>how to summarize the sparse, structured support into a task representation</strong> , (2) <strong>how to condition pixelwise inference on the given task representation</strong>, and (3) <strong>how to synthesize segmentation tasks for accuracy and generality</strong></li>
</ul>
<h1 id="2-method">2. Method</h1>
<ul>
<li>The work deal with the problem with the model with two branches, (1) a guide branch for extracting the task representation from the support and (2) an inference branch for segmenting queries given the guidance.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/9824e98a-4728-42fa-a717-60b24b029512/image.png" alt=""></li>
</ul>
<h3 id="21-guidance-from-support-to-task-representation">2.1. Guidance: From Support to Task Representation</h3>
<ul>
<li>There is a problem in early fusion: In compatibility of the support and query representations. The paper address is problem like Figure 3 (b). </li>
<li>In late fusion, first it extract feature from the encoder, map the annotations into masks in the same channel with the feature map. Finally fuse feature map by multiplication. </li>
</ul>
<h3 id="22-guiding-inference">2.2. Guiding Inference</h3>
<ul>
<li><img src="https://velog.velcdn.com/images/lake_park_0706/post/9b4e7dfc-08d9-4246-8a70-d13b70b829c3/image.png" alt=""></li>
</ul>
<h1 id="3-result">3. Result</h1>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/9f4be51e-ebd3-483d-871b-5d299ad393b3/image.png" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review] Prototypical Networks for Few-shot Learning]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Prototypical-Networks-for-Few-shot-Learning</link>
            <guid>https://velog.io/@lake_park_0706/Review-Prototypical-Networks-for-Few-shot-Learning</guid>
            <pubDate>Tue, 17 Jan 2023 06:17:54 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>Traditional approaches of neural networks have problem that need abundant amount of data. To overcome such problem, few-shot learning is proposed which target to perform one-shot classification like human. </li>
<li>The problem of such approach is that <strong>it is easy to happend overfitting</strong>. To address such problem, this paper <strong>proposed prototypical networks</strong>. To model is based on the idea that <strong>there exists an embedding in which points cluster around a single prototype representation for each class</strong>. Specifically, class means are used as prototypes for each class. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/e9b64692-ef2f-4553-b61e-2246b8884033/image.png" alt=""></li>
</ul>
<h1 id="2-method">2. Method</h1>
<h3 id="21-model">2.1 Model</h3>
<ul>
<li><p>In equation (1), it explains how the proposed model calculates the mean vector of embedded support points. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/97963b16-a42a-47de-b3d5-77112bce3948/image.png" alt=""></p>
</li>
<li><p>Therefore, the probability of x is a specific class k is like equation (2)
<img src="https://velog.velcdn.com/images/lake_park_0706/post/9bfeacf0-8404-4d1f-bf93-1558692ef807/image.png" alt=""></p>
</li>
</ul>
<h1 id="3-result">3. Result</h1>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/4a29b32d-5a92-42e7-a75f-78ec192fc8b1/image.png" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review] Sg-one: Similarity guidance network for one-shot semantic segmentation]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Sg-one-Similarity-guidance-network-for-one-shot-semantic-segmentation</link>
            <guid>https://velog.io/@lake_park_0706/Review-Sg-one-Similarity-guidance-network-for-one-shot-semantic-segmentation</guid>
            <pubDate>Wed, 11 Jan 2023 08:45:54 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>Traditional segmentation like Unet, FCN, extras require many loads for labeling tasks. To reduce the budget, one-shot segmentation is applied</li>
<li>The one-shot segmentation is required to recognize new objects according to only one annotated example. </li>
<li>Old-method in one-shot learning segmentation has a pair of networks. One for being trained for extracting the feature of support images and the other for query images. However the weakness of the model are 1) The parameters of using the two parallel networks are redundant, which is prone to overfitting and leading to the waste of computational resources; 2) combining the features of support and query images by mere multiplication is inadequate for guiding the query network to learn high-quality segmentation masks.  </li>
<li>To overcome such weakness, SG-One model is proposed. The main idea of proposed model is to incorporate the similarities between support images and query images. </li>
<li>For extracting similarities, the model used mask averaging pooling method. As a result, consine similiarity between the features related to backgournd will be low otherwise, object will be high. </li>
</ul>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/8dd2a954-9441-4131-bd09-10ed878d0a29/image.png" alt=""></p>
<h1 id="2-method">2. Method</h1>
<h2 id="21-problem-definition">2.1 Problem Definition</h2>
<ul>
<li>There are three kinds of datasets 1) training set 2) support set 3) testing set. Also, there is no intersected classes between training set and support set. Therefore, the purpose of the proposed model is to train the network on the training set, which can predict segmentation mask on testing set with a few reference of the support set. </li>
</ul>
<h2 id="22-proposed-model">2.2. Proposed Model</h2>
<h4 id="221-masked-average-pooling">2.2.1. Masked Average Pooling</h4>
<ul>
<li>This module extracts the object-related represenstitive vector of image from support set. </li>
<li>The proposed model tried to use contextual regions. To use contextual information, first the model extracts the features from image and resizes the feature map as mask of the image with bilinear interpolation. Then, the feacture vector is computed by averaging the pixels within the object regions as eqution (1).
<img src="https://velog.velcdn.com/images/lake_park_0706/post/45fbf108-3d6f-49b7-b975-33739e89d6e9/image.png" alt="">
By this method, the model can extract the feature of object regions while discarding the unuseful information such as background. </li>
</ul>
<h4 id="222-similarity-guidance">2.2.2. Similarity Guidance</h4>
<ul>
<li>This module combines the feature vectors of query images. In the masked average pooling layer, the model extracts the feature vectors from related region. For the query img, the model extract feature vectors and employ the cosine similiarity each other as equation 2.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d4ca735a-0c7b-42fa-af40-3e96433caa0c/image.png" alt=""></li>
<li>As a result the model can obtain the similarity map and it can denote the region of object in the query img. In particular, the paper multiplies the similiarty map to the feacture map of the query images from segmentation brach.</li>
</ul>
<h2 id="23-similarity-guidance-method">2.3. Similarity Guidance Method</h2>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/e4da511c-f789-4409-8d01-0d04e094fc7d/image.png" alt=""></p>
<ul>
<li>Stem means FCN layer.</li>
<li>Similarity Guidance Branch is fed the extracted features of both query and support images. This branch will produce similarity map. In this branch, Conv blocks extracts the features from input images. The feature vectors are used to calculated the closens between the feacture from support image and the feacture at each pixel fo the query images. </li>
<li>Segmentation branch is for pixel-wise classification. The proposed model used conv blocks to obtain features for segmentation. At the last two layer, input are concatenated with similarity map. The paper fuse the generated feature maps with the similarity maps by multiplication at each pixel. Finally, the output will be generated after decoding the feature maps.</li>
</ul>
<h1 id="3-results">3. Results</h1>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/d6f64a81-f317-4be4-919d-385a41c07646/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/ea94ea6f-3c5b-4c24-94d9-ec22bdaacd2a/image.png" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[DeepLab: Semantic Image Segmentation with
Deep Convolutional Nets, Atrous Convolution,
and Fully Connected CRFs (Review)]]></title>
            <link>https://velog.io/@lake_park_0706/DeepLab-Semantic-Image-Segmentation-withDeep-Convolutional-Nets-Atrous-Convolutionand-Fully-Connected-CRFs-Review</link>
            <guid>https://velog.io/@lake_park_0706/DeepLab-Semantic-Image-Segmentation-withDeep-Convolutional-Nets-Atrous-Convolutionand-Fully-Connected-CRFs-Review</guid>
            <pubDate>Sat, 07 Jan 2023 06:28:36 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li>There are three challenges in semantic segmantation with DCNN. (1) reduced feature resolution, (2) existence of objects at multiple scales, and (3) reduced localization accuracy due to DCNN invariance. </li>
<li>The first challenge is caused by max-pooling and down sampling. To address this problem, the paper removed the downsampling operator and upsample the filters. In the other words, atrous convolution is used for recovering feature map.</li>
<li>To deal with second challenge, the model used astrous spatial pyramid pooling</li>
<li>The last challenge is related with the fact that traditioanal classifiers required transformation invariance. This paper used CRF to improve the model&#39;s ability to capture fine features. </li>
</ul>
<h1 id="2-method">2. Method</h1>
<h3 id="21-atrous-convolution-for-dense-feature-extraction-and-field-of-view-enlargement">2.1. Atrous Convolution for Dense feature Extraction and Field-of-View Enlargement</h3>
<ul>
<li>The paper mentioned that using astrous DCNN is more effective for feature resolution
<img src="https://velog.velcdn.com/images/lake_park_0706/post/f4e30336-0e35-44c9-959a-8291c8f6a3dc/image.png" alt=""></li>
</ul>
<h3 id="22-multiscale-image-representations-using-aspp">2.2. Multiscale Image Representations using ASPP</h3>
<ul>
<li>As following Fig 4, the paper have implemented a model which use multiple parallel atrous convolutional layers. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/9925cacd-6040-42ab-8714-e392e2394251/image.png" alt=""></li>
</ul>
<h3 id="23-structured-prediction-with-fully-connected-conditional-random-fields-for-accurate-boundary-recovery">2.3. Structured Prediction with Fully-Connected Conditional Random Fields for Accurate Boundary Recovery</h3>
<ul>
<li>To recover local fine boundary, the model used short-range CRF
<img src="https://velog.velcdn.com/images/lake_park_0706/post/f3242a34-f6da-4561-9704-1213ffa16d5d/image.png" alt=""></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review: A Deep Convolutional
Encoder-Decoder Architecture for Image
Segmentation(SegNet) - incomplete]]></title>
            <link>https://velog.io/@lake_park_0706/Review-A-Deep-ConvolutionalEncoder-Decoder-Architecture-for-ImageSegmentationSegNet-incomplete</link>
            <guid>https://velog.io/@lake_park_0706/Review-A-Deep-ConvolutionalEncoder-Decoder-Architecture-for-ImageSegmentationSegNet-incomplete</guid>
            <pubDate>Mon, 02 Jan 2023 11:07:45 GMT</pubDate>
            <description><![CDATA[<h1 id="1-introduction">1. Introduction</h1>
<ul>
<li>The motiviation of this paper is to solve the problem of max pooling and sub-sampling reduce feature map resolution.</li>
<li>The encoder of SegNet is indentical to CNN of VGG16. In decoder, the proposed model used max-pooling indices from encoder.</li>
</ul>
<h1 id="3-architecture">3. Architecture</h1>
<ul>
<li>The encoder of the model has 13 convolutional layer and each encoder layer has a corresponding decoder layer. Therefore there are 13 decoder layer. The output of final layer will be get through multi-class soft-max classifier and it will calculate probability of each class for a independent pixel
<img src="https://velog.velcdn.com/images/lake_park_0706/post/43c258d2-62c6-4e0d-bd42-e859b79c4174/image.png" alt=""></li>
<li>In encoder, it is easy to loss boundary information of image during max pooling. Therefore, this paper proposed the method to store max-pooling indices for each encoder feature map. </li>
<li>Decoder upsamples its input feature map using max pooling indices.(Figure 3) The final upsamples feature representation is fed to soft-max classifier. As a result, the output of the soft-max classifier will be (number of classess) dimentional output which represent probability for each class. </li>
</ul>
<blockquote>
<p>Reference
<a href="https://arxiv.org/pdf/1511.00561.pdf">https://arxiv.org/pdf/1511.00561.pdf</a></p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review] Multi-Similarity and Attention Guidance for Boosting Few-Shot
Segmentation(MSANet)]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Multi-Similarity-and-Attention-Guidance-for-Boosting-Few-ShotSegmentationMSANet-incomplete</link>
            <guid>https://velog.io/@lake_park_0706/Review-Multi-Similarity-and-Attention-Guidance-for-Boosting-Few-ShotSegmentationMSANet-incomplete</guid>
            <pubDate>Mon, 02 Jan 2023 08:00:44 GMT</pubDate>
            <description><![CDATA[<h1 id="1-motivation">1. Motivation</h1>
<ul>
<li><p>The problem of traditonal supervised CNN is that it needs the number of well-annotated data, the balance of class distribution and sample representation. Moreover, it is not suitable for unseen class data. </p>
</li>
<li><p>Few-shot learning can be a good solution for such problems. The goal of FSS is to segment the target region of selected category in the query image. </p>
</li>
<li><p>There are many attempts to get more guidance from prototype vectors adopting different mechanism( PANet, PFENet, SG-One Net ... )</p>
</li>
<li><p>However, <strong>such approach( PANet, PFENet, SG-One Net ... ) can lose fine information of  an image due to masked average pooling operation.</strong> Therefore, this paper tried to deal with this problem with <strong>Multi-Similarity module</strong> and <strong>Attention module</strong>. </p>
</li>
</ul>
<h1 id="2-method">2. Method</h1>
<ul>
<li>The proposed model has two guiding modules. First, multi similiary module finds a visual correspondence between the support image and query image. On the other hand attention module will make FSS network focus on target object of the query image. </li>
<li>The following image shows the overall structure of proposed model. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d242ca3f-26e1-41fc-a396-c5c1c9025f73/image.png" alt=""></li>
</ul>
<h3 id="21-multi-similarity-module">2.1. Multi-Similarity Module</h3>
<ul>
<li>First, a pair of query image and support image are input to the backborn network( VGG, ResNet ). The last three blocks of these <strong>backborn model will extract feature maps</strong> from support image and query image repectively as following equation 1, 2. <img src="https://velog.velcdn.com/images/lake_park_0706/post/c62fbd75-2919-444a-9d31-bf4443ee7933/image.png" alt=""></li>
<li><strong>To activate related object region,</strong> feature maps are masked with corresponding masks with bi-linear interpolation that interpolates the masks to appropriate channel.<img src="https://velog.velcdn.com/images/lake_park_0706/post/878f5483-4b52-42b3-9a4b-9f808d875d30/image.png" alt=""></li>
<li>To generate a visual correspondence, the paper <strong>compute pixel-wise cosine distance between feature map of support image and query image</strong> as equation 5. Figure 4 shows the overall process of computing this visual correspondance(similarity map)
<img src="https://velog.velcdn.com/images/lake_park_0706/post/c14b4d31-fde6-44c4-bdd3-f674dc0a0b65/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/b9dd4d93-3b30-4afb-b77c-f4a73b65f893/image.png" alt=""></li>
</ul>
<h3 id="22-attention-module">2.2. Attention Module</h3>
<ul>
<li>Due to the limited number of support set image, the paper proposed a lightweight attention module. *<em>This module will extract the class related information from the few support sample images and guide the model to focus on the target region. *</em></li>
<li>The extracted feature from block 2 and 3 are input  to the attention module. Before feeding feature map, those who features are concatenated and reduced dimension. Actual process is as folloing figure. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/e476ced3-a367-4de3-8805-b94b5414a5f2/image.png" alt=""></li>
</ul>
<h1 id="3-result">3. Result</h1>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/f297cbe1-e9e7-423e-a1c3-4ff254f1f29f/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/ba649b79-7a3c-41ee-b5d8-de3c191c0ef3/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/628070b2-da53-46e5-8038-250cf824a668/image.png" alt=""></p>
<blockquote>
<p>Reference </p>
</blockquote>
<ul>
<li>MSANet: Multi-Similarity and Attention Guidance for Boosting Few-Shot
Segmentation</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review: CONDITIONAL NETWORKS
FOR FEW-SHOT SEMANTIC SEGMENTATION]]></title>
            <link>https://velog.io/@lake_park_0706/Review-CONDITIONAL-NETWORKSFOR-FEW-SHOT-SEMANTIC-SEGMENTATION</link>
            <guid>https://velog.io/@lake_park_0706/Review-CONDITIONAL-NETWORKSFOR-FEW-SHOT-SEMANTIC-SEGMENTATION</guid>
            <pubDate>Fri, 30 Dec 2022 09:48:01 GMT</pubDate>
            <description><![CDATA[<h1 id="1-introduction">1. Introduction</h1>
<ul>
<li>This paper proposed co-FCN network which make conditioning branch contain few-shot annotations. Samples for few-shot learning is selected from segmentation datset.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/709da6ab-962a-4eef-9089-e8d0be811e30/image.png" alt=""><h1 id="2-conditional-architecture-and-few-shot-optimization">2. Conditional Architecture and Few-Shot Optimization</h1>
</li>
<li>Few-shot segmentation is required to learn to segment new input with a few annotations. </li>
<li>In this paper, proposed model based on FCN and it align few shot trainng and testing paradigms.</li>
<li>Figure 1 shows overall structure of co-FCN. The segmentation branch is a FCN that segments the query. The conditioning branch takes support sets as input and makes features which are fused with query image. </li>
</ul>
<h1 id="4-discussion">4. Discussion</h1>
<ul>
<li>The proposed model is much faster then tranditional model, because it doesn&#39;t need any optimization at test time. Additionally, it is good to cope with sparse annotations.</li>
</ul>
<blockquote>
<p>Reference</p>
</blockquote>
<ul>
<li>CONDITIONAL NETWORKS FOR FEW-SHOT SEMANTIC SEGMENTATION</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review: One-shot learning for semantic segmentation]]></title>
            <link>https://velog.io/@lake_park_0706/Review-One-shot-learning-for-semantic-segmentation</link>
            <guid>https://velog.io/@lake_park_0706/Review-One-shot-learning-for-semantic-segmentation</guid>
            <pubDate>Thu, 29 Dec 2022 08:50:00 GMT</pubDate>
            <description><![CDATA[<h1 id="1-introduction">1. Introduction</h1>
<ul>
<li>In this paper, it proposed semantic segmentation with one-shot learning which is pixel-level prediction with a single image and it&#39;s mask.</li>
<li>A simple implementation of one-shot learning for segmentation may cause overfitting and hard to optimize. This paper will deal with such problems</li>
<li>This paper proposed two-branched approach to one-shot segmentation. Figure 1 shows overall structure of the branches. First branch takes labeled image as input and produces a vector of parameters as output. Second branch takes these parameters as well as a new image as input and produces a segmentation mask of the image for the new class as output.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/bc45296c-7d38-4349-bc5e-feec5e617da9/image.png" alt=""></li>
</ul>
<h1 id="3-problem-setup">3. Problem Setup</h1>
<ul>
<li>The main purpose of this paper is to learn model f() that, when given a support set and query image, predicts a binary mask for the semantic class. </li>
<li>During training, the model will consume image-mask pairs and at testing, the query images are only annotated for new semantic classes. As a result, there is no same image class for train set and test set.</li>
</ul>
<h1 id="4-proposed-method">4. Proposed Method</h1>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/105f61fc-4674-4958-bf78-cabe3bc10bb6/image.png" alt=""></p>
<h2 id="41-producing-parameters-from-labeled-image">4.1: Producing Parameters from Labeled Image</h2>
<ul>
<li>VGGnet is used for base model to genreate conditioning branch.</li>
<li>label contains only the target object</li>
<li>weight hashing is good for avoiding overfitting<h2 id="42-dense-feature-extraction">4.2: Dense Feature Extraction</h2>
</li>
<li>FCN-32s is used</li>
</ul>
<h2 id="43-training-procedure">4.3: Training Procedure</h2>
<ul>
<li>selects image-label pair and maximize the log likelihood of the ground-truth mask.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/2862143d-4472-4eb3-aee3-d1243082687a/image.png" alt=""></li>
</ul>
<h2 id="44-extension-to-k-shot">4.4: Extension to k-shot</h2>
<p>In k-shot learning, it contains more support sets. </p>
<h1 id="8-conclusion">8. Conclusion</h1>
<p>In this paper, the proposed model learn to learn an ensemble classier and use it to classify pixels. As the result, the model is faster and good performance. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/675942d7-18d1-47b3-8abb-84dbbfe82063/image.png" alt=""></p>
<blockquote>
<p>References
<a href="https://arxiv.org/abs/1709.03410">https://arxiv.org/abs/1709.03410</a></p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[Few Shot Learning]]></title>
            <link>https://velog.io/@lake_park_0706/Few-Shot-Learning</link>
            <guid>https://velog.io/@lake_park_0706/Few-Shot-Learning</guid>
            <pubDate>Wed, 28 Dec 2022 10:29:10 GMT</pubDate>
            <description><![CDATA[<h1 id="1-basic-concept">1. Basic concept</h1>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/a4df33f0-d6f0-4ef8-8594-8f6d369c2707/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/f902a27b-4e84-4c98-aed3-13800beea2ff/image.png" alt=""></p>
<ul>
<li>Human can recognize that the query is pangliln based on difference between four images, but it is chellenging for computer because there are a few images</li>
</ul>
<ul>
<li>traditional purpose of deep learning is recognizing certain class from the image, however in few shot learning, it&#39;s purpose is learning to learn -&gt; learning similarity and differences between objects </li>
<li>few shot learning is kind of meta learning</li>
</ul>
<h2 id="what-is-meta-learning">What is meta learning</h2>
<p> <img src="https://velog.velcdn.com/images/lake_park_0706/post/37f84d52-8bad-400e-bb24-adc8f9cc50cb/image.png" alt=""></p>
<ul>
<li>meta learning is learn to learn. For example, there are query which is unknown and there are 6 support set. Then, you might know the query is otter by comparing query with support set. </li>
</ul>
<h2 id="supervised-learning-vs-few-shot-learning">Supervised learning vs few shot learning</h2>
<h4 id="supervised-learning">supervised learning</h4>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/b4bb0c54-6785-4f9d-8ca2-001fc48db38b/image.png" alt=""></p>
<ul>
<li>test samples are from known classes <h4 id="few-shot-learning">few shot learning</h4>
<img src="https://velog.velcdn.com/images/lake_park_0706/post/aa013b8d-f5dc-4646-90de-2099eac0767e/image.png" alt=""></li>
<li>Query samples are from unknown classes</li>
</ul>
<h2 id="relation-between-accuracy-and-ways">Relation between accuracy and ways</h2>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/101ec35c-ee5e-423b-b479-0a97b56224c5/image.png" alt=""></p>
<h2 id="relation-between-accuracy-and-shots">Relation between accuracy and shots</h2>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/04b7b2db-2211-4ff0-8071-6a8fd9c7d80b/image.png" alt=""></p>
<h1 id="2-siamese-network">2. Siamese Network</h1>
<ul>
<li>there are two ways for training this network<h2 id="21-learning-pairwise-similiarity-scores">2.1: Learning Pairwise Similiarity Scores</h2>
<img src="https://velog.velcdn.com/images/lake_park_0706/post/da534b1d-a4c5-487b-af6f-1844a53cceb4/image.png" alt="">
There are two kind of samples ( Positive samples and negative samples )</li>
</ul>
<h3 id="211-cnn-for-feature-extraction">2.1.1: CNN for Feature Extraction</h3>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/72fda8e7-c63d-4540-98d3-2ba4b01f98fb/image.png" alt=""></p>
<p>First, the model should extract features from sample with CNN(f). f will produce two feature vectors(h1 &amp; h2). Then the difference between two vector(z) will go through dense layers and sigmoid. The output should be 1 if input sample is positive sample. Otherwise, the output should be 0(when negative sample). The fully connected layer will scale the difference between two object 0 to 1.</p>
<p>As you can see, the structure looks like siamese twins. The loss will go through dense layser and CNN for backpropagation
<img src="https://velog.velcdn.com/images/lake_park_0706/post/f044d972-ebf0-475f-96e3-acff09929f8e/image.png" alt="">
(when input is negative sample)</p>
<h3 id="212-one-show-prediction">2.1.2: One-show Prediction</h3>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/45d9523f-d8fd-4529-832e-6e3cd499b927/image.png" alt=""></p>
<h2 id="22-triplet-loss">2.2: Triplet Loss</h2>
<p>Another method for training siamese network
<img src="https://velog.velcdn.com/images/lake_park_0706/post/272a7cd1-653e-4475-b6ac-aac2ec6f52f2/image.png" alt="">
First, choose anchor object. After then choose one positive object and negative object from datset. By calculating feacture vector from these three objects, finally calculate postive distance and negative distance. The positive distance should be small and negative distance big enough.</p>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/3e10de35-df90-4724-b1dd-ba95667e6dc1/image.png" alt=""></p>
<p>Finally, the loss function should be like upper image.</p>
<p>After training siamese network, use the network for one-shot prediction
<img src="https://velog.velcdn.com/images/lake_park_0706/post/9217a397-2131-45ea-99ef-5b4134a04f7e/image.png" alt=""></p>
<h1 id="3-pretraining-and-fine-tuning">3. Pretraining and Fine Tuning</h1>
<h2 id="31-cosine-similarity">3.1: Cosine Similarity</h2>
<p>The cosine similarity means how two vectors are similiar to each other. 
 <img src="https://velog.velcdn.com/images/lake_park_0706/post/db0d28ac-6218-4e4e-bbae-80905a5c6172/image.png" alt=""></p>
<h2 id="32-extracting-feature-vector">3.2: Extracting Feature Vector</h2>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/c4dc0220-0b41-4326-bf9d-3757ed49c3d7/image.png" alt=""></p>
<h2 id="33-making-few-shot-prediction">3.3: Making Few-Shot prediction</h2>
<p>There are three normalized feature vectors, and calculate softmax to choose most similar object.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/3b5f55c8-0c82-427b-8070-0dc672bc6adc/image.png" alt=""></p>
<h2 id="34-fine-tuning">3.4: Fine tuning</h2>
<p>In fine tuning, it updates weight and bias of feature extractor(CNN) based on support set. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/440f14b5-3cd7-40a7-89be-66ee20836362/image.png" alt=""></p>
<h2 id="35-entropy-regularization">3.5: Entropy Regularization</h2>
<p>In few shot learning, there are a few dataset and can cause overfitting. To prevent the case we can sue entropy regularization and it makes good sense. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d4b4bdc3-8c2c-4407-bb9c-1752124ae563/image.png" alt=""></p>
<blockquote>
<p>references</p>
</blockquote>
<ul>
<li><a href="https://www.youtube.com/watch?v=hE7eGew4eeg&amp;t=32s">https://www.youtube.com/watch?v=hE7eGew4eeg&amp;t=32s</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review: Scene Parsing via Integrated Classification Model and Variance-Based
Regularization ( incomplete )]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Scene-Parsing-via-Integrated-Classification-Model-and-Variance-BasedRegularization-incomplete</link>
            <guid>https://velog.io/@lake_park_0706/Review-Scene-Parsing-via-Integrated-Classification-Model-and-Variance-BasedRegularization-incomplete</guid>
            <pubDate>Tue, 27 Dec 2022 09:01:00 GMT</pubDate>
            <description><![CDATA[<h1 id="introduction">Introduction</h1>
<blockquote>
<p>Scene parsing
Scene parsing is to segment and parse an image into different image region associated with semantic catgories.</p>
</blockquote>
<ul>
<li>Most of scene parsing models use DNN to deal with pixel-wised classification problem. However, this method has problem in distingushing the categories with similar appereance. </li>
<li>Therefore, this paper solved that problem from two aspects. 1: proprose an integreated classificiation model for scence parsing to distinguish confusing catgories/ 2: propose variance-based regularization to differentiate the scores of all categories as large as possible</li>
<li>methos is in three steps<ol>
<li>Encoding features from DNN model<ol start="2">
<li>general classification</li>
<li>refining the classifier for refining the scores. -&gt; for differentiating similar categories variance based regularization is used to train the intregrated classification model</li>
</ol>
</li>
</ol>
</li>
</ul>
<figure style="display:block; text-align:center;">
  <img src="https://velog.velcdn.com/images/lake_park_0706/post/59fe13f1-8443-4623-a47e-d84cf7eb1f4c/image.png">
  <figcaption style="text-align:center; font-size:15px; color:#808080">
    => Problem of previous segmentation model
  </figcaption>
</figure>





<blockquote>
<p>References</p>
</blockquote>
<ul>
<li><a href="http://sceneparsing.csail.mit.edu/">http://sceneparsing.csail.mit.edu/</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Review: Two-Stream Convolutional Networks for Action Recognition in Videos]]></title>
            <link>https://velog.io/@lake_park_0706/Review-Two-Stream-Convolutional-Networks-for-Action-Recognition-in-Videos</link>
            <guid>https://velog.io/@lake_park_0706/Review-Two-Stream-Convolutional-Networks-for-Action-Recognition-in-Videos</guid>
            <pubDate>Mon, 19 Dec 2022 10:38:25 GMT</pubDate>
            <description><![CDATA[<h1 id="1-introduction">1. Introduction</h1>
<ul>
<li>In this paper, it tried to use CNN for recognizing human action which containing sptial and temporal information</li>
<li>Architecture is based on two streams(spatial info -&gt; video frames/ temporal info -&gt; optical flow)</li>
</ul>
<h1 id="2-two-stream-architecture-for-video-recognition">2. Two-stream architecture for video recognition</h1>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/52692432-9a8a-473d-a8cf-8d7394271734/image.png" alt=""></p>
<ul>
<li>As shown in Fig1, there are two stream( spatial stream and temporal stream )</li>
<li>Each stream is implemented using CNN and the softmax scored of last fusion( averaging and SVM )</li>
</ul>
<p><strong>Spatial stream CNN</strong> : there are useful clues in static frames</p>
<h1 id="3-optical-flow-cnn">3. Optical Flow CNN</h1>
<ul>
<li>Optical CNN is CNN model about temporal recognition</li>
</ul>
<h3 id="31-cnn-input-configurations">3.1: CNN input configurations</h3>
<h4 id="optical-flow-stacking">Optical flow stacking</h4>
<p> <img src="https://velog.velcdn.com/images/lake_park_0706/post/dd324f9b-f9d8-45ab-bda8-e0cd0ee4fcd8/image.png" alt=""> -&gt; displace vector at point (u,v) in frame t.</p>
<ul>
<li><p>representing motion by stacking the flow channels of L consecutive frames
=&gt; 2L input channel</p>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/ad570af2-fb3e-46bc-8c5e-b05992611b41/image.png" alt=""></p>
</li>
</ul>
<h4 id="trajectory-stacking">Trajectory stacking</h4>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/543a1b94-d3a3-404b-9a34-d53b52eec197/image.png" alt=""></p>
<ul>
<li>(1) : stores displacement</li>
<li>(2) : stores vector samples along the trajactory
<img src="https://velog.velcdn.com/images/lake_park_0706/post/65ee5399-d47a-44a4-9f70-de815ed40adb/image.png" alt=""></li>
</ul>
<h4 id="bi-directional-optical-flow">Bi-directional optical flow</h4>
<ul>
<li>computting additional set of displacement fields in the opposite direction</li>
<li>construct input by stacking forward L/2 frames and -L/2 frames</li>
</ul>
<h4 id="mean-flow-subtraction">Mean flow subtraction</h4>
<ul>
<li>There can be case like camera movement which can cause dominant displacement</li>
<li>for simplify, just substracting mean vector</li>
</ul>
<h1 id="4-multi-task-learning">4. Multi-task learning</h1>
<ul>
<li>it is hard to concatnate two different dataset for video learning</li>
<li>there are two softmax layer ( one for HMDB-51 and one for UCF-101 )</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[GRAF: Generative Radiance Fields
for 3D-Aware Image Synthesis Review]]></title>
            <link>https://velog.io/@lake_park_0706/GRAF-Generative-Radiance-Fieldsfor-3D-Aware-Image-Synthesis-Review</link>
            <guid>https://velog.io/@lake_park_0706/GRAF-Generative-Radiance-Fieldsfor-3D-Aware-Image-Synthesis-Review</guid>
            <pubDate>Fri, 16 Sep 2022 07:46:56 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/e5967bb8-5a22-4b56-8325-10c19e140180/image.png" alt=""></p>
<h1 id="1-abstract--introduction">1. Abstract &amp; Introduction</h1>
<ul>
<li>기존의 GAN은 3D이미지를 구축하는데 한계가 있었다. 이 논문은 그 한계를 radiance field를 활용해 해결했다고 한다.</li>
<li>3D image synthesis는 사진의 pose를 통해 다른 위치에서도 물체를 보는 것과 같이 view를 생성한다. 하지만 현실에서는 물체의 위치와 각도 정보를 구하는 것이 어렵고 다른 논문들은 이를 2D supervision으로만 해결하려고 했다. </li>
<li>따라서 이 논문은 3가지의 목적이 있는데,<ul>
<li><ol>
<li>radiance field를 생성하는 모델을 통해 pose 정보가 없는 이미지에 대해서도 3D aware한 정보를 만들 수 있다.</li>
</ol>
</li>
<li><ol start="2">
<li>patch-based discriminator.</li>
</ol>
</li>
<li><ol start="3">
<li>체계적으로 현실의 데이터에서 실험을 진행한다.</li>
</ol>
</li>
</ul>
</li>
</ul>
<h1 id="3-method">3. Method</h1>
<h2 id="31-neural-radiance-fields">3.1 Neural Radiance Fields</h2>
<ul>
<li>radiance field는 3차원의 이미지를 2차원에서 보는 각도에 따라 RGB의 값을 연속적으로 이어주는 mapping이다. NeRF에서는 3차원의 카메라 위치 정보와, 2차원의 카메라 방향 정보를 feature representation에 사용하였다. 이때 복잡한 현상의 데이터에서도 학습이 잘 이루어지도록 하기 위해 positional encoding을 사용하였는데, 즉 카메라의 위치&amp;방향 정보를 사용하여 이미지의 색과 밀도(투명도)를 MLP로 학습하였다. 이 논문에서는 이 positional encoding이 효과가 있었다는 것을 입증하였고, 각도에 따른 색의 변화는 카메라의 위치 변화에 따른 색의 변화보다 훨씬 매끄럽기 때문에 방향에 따른 정보를 인코딩할때 더 적은 component가 쓰였다고 한다.</li>
<li>euqation (1),(2)는 대략적인 NeRF의 구조를 나타내는데, equation (2)에서 볼 수 있듯이 카메라의 위치와 방향정보를 encoding하고 이를 출력 이미지의 색과 밀도를 학습하는데 쓰이는 것을 볼 수 있다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/cb9f089f-0d48-4365-ac57-e2c90da55375/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/5ad8f0aa-cdb5-4519-8472-f5a5bf1f64b3/image.png" alt=""></li>
</ul>
<h2 id="32-generative-radiance-fields">3.2 Generative Radiance Fields</h2>
<ul>
<li><p>앞의 NeRF의 경우에는 학습을 하려면 이미지의 position과 direction이 필요하다는 단점이 있다. 따라서 이 논문에서는 위치와 방향 정보 없이 image synthesis를 하려고 시도하였다. 이를 위해 GAN의 nenerative&amp;adversarial 구조를 사용하였다.</p>
</li>
<li><p><code>Figure 2</code>는 GRAF의 대략적인 구조를 설명하는 그림이다. generator인 $$G_θ$$는 camera matrix $$K$$, camera pose ξ, 2D sample pattern $$v$$와 shape/apperance code $$z_a, z_s$$을 입력으로 받아 이미지 패치 $$P&#39;$$를 출력으로 한다. 그후 discriminator는 진짜 이미지 패치 $$P$$를 이 출력과 비교한다. 여기서 이미지가 아닌 이미지의 패치로 학습하는 이유는 학습량이 너무 많아지기 때문이라고 한다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/260aa881-a39c-4680-9e19-f353d8373fe2/image.png" alt=""></p>
</li>
</ul>
<h3 id="321-ray-sampling">3.2.1 Ray Sampling:</h3>
<ul>
<li><img src="https://velog.velcdn.com/images/lake_park_0706/post/fdfd2384-01d4-4405-9ffa-79e72cb1e816/image.png" alt=""></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Momentum Contrast for Unsupervised Visual Representation Learning(MoCo) Review]]></title>
            <link>https://velog.io/@lake_park_0706/Momentum-Contrast-for-Unsupervised-Visual-Representation-LearningMoCo-Review</link>
            <guid>https://velog.io/@lake_park_0706/Momentum-Contrast-for-Unsupervised-Visual-Representation-LearningMoCo-Review</guid>
            <pubDate>Wed, 07 Sep 2022 03:01:31 GMT</pubDate>
            <description><![CDATA[<h1 id="1-abstract--introduction">1. Abstract &amp; Introduction</h1>
<ul>
<li>이 논문은 dynamic dictionary(queue)와 contrastive loss를 이용한 이미지에서의 unsupervised learning을 실행하였다. 여기서 unsupervised learning은 dynamic dictionary를 참조할 수 있도록 인코더를 학습하는데 같은 key의 데이터는 가깝게, 반대로 다른 key는 멀도록 학습을 시킨다. 학습은 contrastive loss가 작도록 진행된다.</li>
<li>MoCo는 크고 일관된 dictionary를 만드는 것이 목표인데 이 dictionary는 queue형태이며, 현재의 mini batch의 representation이 enqueue되고, 가장 오래된 representation이 dequeue되는 방식이다. 또한 momentum 방식을 이용해 queue의 일관성을 높였다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/cb3194fa-2e0c-410f-b1d3-9f754718e6b7/image.png" alt=""></li>
<li>MoCo는 pretext task로 discrimination task를 선택했다. </li>
<li>unsupervise learning의 목적은 down-stream 작업에서 높은 성능을 낼 수 있는 pre-train representation들을 학습하는 것이다. 이 논문에서는 7가지 down-stream task를 진행했고 좋은 성능을 보였다고 한다.</li>
</ul>
<blockquote>
<p>What is contrastive loss?</p>
</blockquote>
<ul>
<li><p>서로 유사한 이미지 쌍(positive pair)인 $$x_p, x_q$$가 있다면 이 둘은 가까워지도록 학습이 되어야 한다. 따라서 거리가 멀수록 loss가 크다면 이 loss를 줄이도록 학습을 진행할 것이다. 즉 ($$x_p, x_q$$)loss = $$||x_p- x_q||^2$$</p>
</li>
<li><p>반대로 서로 유사점이 거의 없는 negative pair $$x_n, x_q$$에서는 서로 멀어지도록 학습이 되어야 한다. 이를 위해 margin이라는 개념을 사용하였는데 이는 negative pair가 가져야 하는 최소한의 거리를 뜻한다. 따라서 ($$x_n, x_q$$)loss =$$max(0, m^2-||x_p- x_q||^2)$$, $$m = margin$$</p>
</li>
<li><p>이 둘을 합치면 contrastive loss는 다음과 같다.
$$Loss(x_i, x_j, y)$$ = $$y<em>||x_i- x_j||^2+ (1-y)</em>max(0, m^2-||x_i- x_j||^2)$$
결과적으로 positive pair는 가깝게, negative pair는 최소한 margin의 거리만큼 멀어지도록 학습할 수 있다.</p>
<h1 id="3-method">3. Method</h1>
<h2 id="31-contrastive-learning-as-dictionary-look-up">3.1) Contrastive Learning as Dictionary Look-up</h2>
</li>
<li><p><code>Equation (1)</code>과 같은 Contrastive loss function이 사용되었다고 한다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/0db1decc-18fc-4d0a-bd6b-7c7ebc68e9e2/image.png" alt=""></p>
</li>
<li><p>타우는 temperature hyper-parameter이고 loss funciton의 매개변수로 이미지 뿐만이 아닌 patch나 문맥을 이루고 있는 patch set이 들어갈 수 있다.</p>
</li>
</ul>
<h2 id="32-momentum-contrast">3.2) Momentum Contrast</h2>
<ul>
<li>이 논문에서는 key가 계속 주입되는 dynamic dictionary를 사용했는데 이 키들은 랜덤하게 뽑힌 키들이다.</li>
<li>여기서 두 가지의 가정이 사용되었는데 첫째는 많은 negative sample을 가지고 있는 큰 dictionary를 통해 좋은 feature를 학습할 수 있다는 가정이고, 둘째는 key가 계속 주입되는 상황에서도 dictionary key는 가능한 최대한 일관되어야 한다는 가정이다.</li>
</ul>
<h4 id="dictionary-as-a-queue">Dictionary as a queue</h4>
<ul>
<li>MoCo의 핵심은 dictionary를 queue형태로 만들었다는 것에 있다. queue를 쓰게 되면 인코딩된 키들을 저장해서 학습에 사용할 수 있고, queue의 크기를 조절함에 따라 dictionary의 크기를 유연하게 조절할 수 있다.</li>
<li>queue의 또다른 특징은 오래된 mini-batch 데이터를 순차적으로 제거하여 업데이트를 해준다는 것이다. 이는 새로 들어온 key와 차이가 많은 오래된 key를 내보내는 것이므로, consistency를 유지하는데 중요한 역할을 한다.</li>
</ul>
<h4 id="momentum-update">Momentum update</h4>
<ul>
<li>큰 dictionary를 사용하게 된다면 안의 key를 전부다 back-propagtaion을 해줘야한다. 문제는 key이 개수가 상당히 많다는 점이다. 이를 해결하기 위해 query의 인코더를 그대로 복사해서 key 인코더로 사용하였지만 이는 성능이 매우 좋지 않았다. 논문에서는 이 이유를 query의 값이 매우 빠르게 변하고 그에따라 key인코더의 값도 빠르기 때문이라 생각했고 momentum update를 적용해서 해결하고자 했다. 그 결과 key 인코더의 weight를 천천히 업데이트 하여 consistency를 만족할 수 있었고, momentum의 값이 0.9일 때보다 0.999일 때 더 좋은 성능을 보였다고 한다.</li>
</ul>
<h4 id="relations-to-previous-mechanisms">Relations to previous mechanisms</h4>
<ul>
<li>이 부분에서는 MoCo와 선행 연구되었던 2모델을 비교하였다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d55241ff-6e9f-4b4f-86b1-7f6121c5e2c2/image.png" alt=""></li>
<li>처음 비교한 모델은 end-to-end 모델이다. 이 모델은 미니 배치 내의 샘플을 dicitonary로 사용한다. 이는 큰 dictionary를 사용하고 싶은 경우나, local position과 같은 pretext task를 적용하기 어렵다는 단점이 있다.</li>
<li>그 다음은 momery bank 모델과 비교하였다. 이 모델도 back propagation하는 과정이 없어 dictionary에 많은 데이터를 저장할 수 있다는 장점이 있다. 그러나 dictionary의 representation은 쓰여질 때만 update되는 방식을 가지고 있어 dictionary에 오래전에 업데이트 된 representation도 포함되어 있다는 단점이 있다.</li>
</ul>
<h2 id="33-pretext-task">3.3) Pretext Task</h2>
<ul>
<li>이 논문에서는 instance discrimination task라는 pretext task를 진행하였고, 같은 이미지에서의 augmentation된 이미지 쌍은 positive pair로, 다른 이미지에서의 augmentation된 이미지 쌍은 negative pair로 분류하여 학습하였다고 한다. 미니 배치에서 postive pair이면 인코더에, negative pair이면 momentum 인코터와 queue에 데이터를 넣어주었다고 한다.<h4 id="techinical-details">Techinical details</h4>
</li>
<li>이 논문에서는 인코더로 ResNet을 사용하였고, 이 인코더에서는 L2 norm을 사용하여 벡터를 출력하는데 이 벡터가 query나 key이다. <code>Equation (1)</code>의 temperature값은 0.07로 정해주었다.</li>
</ul>
<h4 id="shuffling-bn">Shuffling BN</h4>
<ul>
<li>이 논문에서 쓰인 인코더($$f_q, f_k$$)는 batch normalization을 포함하고 있다. 그런데 이 논문의 경우 batch nomalization은 모델의 학습을 방해한다고 한다.</li>
<li>논문에서는 이를 해결하기 위해, suffling BN으로 해결했다.</li>
<li>보류</li>
<li>(batch normalization에 대한 추가적인 공부가 필요하다 ㅠㅠ)</li>
</ul>
<blockquote>
<p>참조</p>
</blockquote>
<ul>
<li><a href="https://arxiv.org/abs/1911.05722">https://arxiv.org/abs/1911.05722</a></li>
<li><a href="https://89douner.tistory.com/334">https://89douner.tistory.com/334</a></li>
<li><a href="https://gaussian37.github.io/dl-concept-batchnorm/">https://gaussian37.github.io/dl-concept-batchnorm/</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Unsupervised Feature Learning via Non-Parametric Instance Discrimination(NPID) Review]]></title>
            <link>https://velog.io/@lake_park_0706/Unsupervised-Feature-Learning-via-Non-Parametric-Instance-DiscriminationNPID-Review</link>
            <guid>https://velog.io/@lake_park_0706/Unsupervised-Feature-Learning-via-Non-Parametric-Instance-DiscriminationNPID-Review</guid>
            <pubDate>Fri, 02 Sep 2022 07:35:04 GMT</pubDate>
            <description><![CDATA[<h1 id="1-abstract--introduction">1. Abstract &amp; Introduction</h1>
<ul>
<li><p>이 논문의 주제는 ImageNet의 object recognition에서 나왔다고 한다. 
<code>Figure 1</code>에서 볼 수 있듯이 레오파드에 대한 top-5 classification error를 보면, 레오파드와 비슷하게 생긴 제규어나, 치타와 같은 동물들의 softmax값은 높게 나온다. 반면에 레오파드와 전혀다른 서랍이나 보트는 softmax의 값이 매우 작다. 이를 인공지능 모델이 이미지의 유사성을 학습할 수 있다고 본 것이다. 따라서 논문에서는 이를 이용해서 같은 종류의 이미지는 서로 유사성을 학습하고, 다른 종류의 이미지는 잘 구별하도록 학습하는 시도를 했다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/c2d3d573-2b36-4b17-bee1-c845479a3f8f/image.png" alt=""></p>
</li>
<li><p>하지만 이 실험을 진행하는데 있어서 ImageNet 데이터셋의 class 개수가 너무 많다는 문제가 있었다. 클래스의 개수가 바로 traing set의 개수이기 때문이다. 이를 해결하기 위해 논문에서는 noise-contrastive estimation과 proximal regularization을 사용했다고 한다.</p>
</li>
<li><p>이 논문에서는 파라미터 없이 학습과 테스트를 진행하는 방법을 사용했다. 즉, 각 이미지의 특징들이 memory bank에 저장되고 테스트는 knn을 기본으로 하여 진행한다.</p>
</li>
<li><p>결과적으로 성능이 좋고 나름 가벼운 모델을 만드는데 성공했다고 한다.</p>
</li>
</ul>
<h1 id="3-approach">3. Approach</h1>
<ul>
<li><p>이 논문의 목표는 인간의 개입 없이, $$v = f_θ(x)$$인 함수를 만들어내는 것이다. ($$x$$는 이미지 input, $$v$$는 이미지의 feature를 나타낸다.) 따라서,$$d_θ(x, y) = ||f_θ(x)-f_θ(y)||$$는 x, y의 거리가 가깝면 이는 x, y가 서로 유사점이 많다는 것을 나타낸다.</p>
</li>
<li><p>또한, 하나의 이미지를 하나의 케이스로 정의하여, 각각의 이미지를 구별(혹은 비교)하는 방식으로 모델을 학습하였다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d6b36c4a-eceb-4082-9b39-dfd91e7c2dc6/image.png" alt=""></p>
</li>
</ul>
<h2 id="31-non-parametric-softmax-classifier">3.1) Non-Parametric Softmax Classifier</h2>
<h4 id="parametric-classifier">Parametric Classifier.</h4>
<ul>
<li>n개의 이미지를 학습한다면,n개의 x에 대하여 $$v_i = f_θ(x_i)$$이 성립한다. 이를 통해 x가 i클래스로 구별될 확률은 <code>equation (1)</code>로 나타낼 수 있다. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/c54b0619-a07c-4643-9b4c-5c2a4a48fe6d/image.png" alt=""></li>
<li>그러나 이 방법은 weight를 이용해서 확률를 구하는 방법이기 때문에 처음에 목표했던 다른 이미지들과의 비교를 할 수 없는 방법이다. </li>
</ul>
<h4 id="non-parametric-classifier">Non-parametric Classifier.</h4>
<ul>
<li>위의 문제점을 해결하기 위해 non-parametric classifier를 사용하였는데, <code>Equation (2)</code>처럼 weight($$w$$)대신에 $$v$$를 식에 넣었다. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/6b0ff64d-8703-49ad-958d-9429d95425b3/image.png" alt=""></li>
<li>이를 위해서 CNN이 축출한 이미지의 feature를 L2 normalization을 적용하였고, 결과적으로 $$v_i$$의 크기는 전부 1이 된다. (<code>Figure 2 참조</code>) 또한 $$τ$$는 temperature parameter로, 벡터의 분포가 한 곳으로 집중되는 정도를 조절한다고 한다.</li>
<li>따라서 이를 이용한 학습의 목표는 joint probaility를 최대로 하거나, 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d9812935-b6b9-4229-9109-dc375c572dc3/image.png" alt="">
<code>Euqation (3)</code>을 최소화 하는 방향으로 진행해야한다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/22df6158-1a7a-4d35-b5b9-78aaeb3d1841/image.png" alt=""></li>
</ul>
<h4 id="learning-with-a-memory-bank">Learning with A Memory Bank</h4>
<ul>
<li><p>$$P(i|v)$$를 계산하기 위해서는 모든 이미지의 특징 벡터인 $$v$$가 필요하다. 하지만 이를 계산하기 위해서 모든 이미지의 representation을 매번 계산하는 번거로움을 개선하기 위해 Memory bank라는 개념을 도입하였다.</p>
</li>
<li><p>$$V = {v_j}$$를 memory bank로, $$f_i = f_θ(x_i)$$로 정의하자. 학습동안 $$f_i$$와 $$f_θ(x_i)$$안의 파라미터 $$θ$$는 SGD를 통해 업데이트 된다. 그렇다면 이 때 업데이트 된 $$f_i$$는 $$V$$안에서 대응되는 벡터 $$v_i$$로 치환된다.</p>
</li>
<li><p>이런 방식으로 학습을 진행하면, 이미지의 특징 벡터로 학습을 하기 때문에 weight와 gradient를 저장할 필요가 없고, 큰 데이터에서도 모델이 잘 학습할 수 있다.</p>
</li>
</ul>
<h2 id="32-noise-contrastive-estimation">3.2) Noise-Contrastive Estimation</h2>
<ul>
<li><p><code>Equation (2)</code>처럼 softmax를 계산하게 된다면, 엄청나게 많은 데이터 셋에 대해서 학습을 하기 어렵다는 단점이 있다. 이를 해결하기 위해 Noise-Contrastive Estimation을 사용했다고 한다.
(이 아래의 자세한 설명은 정확히 이해하지는 못했다 ㅠㅠ)</p>
</li>
<li><p>일단 noise distribution이 $$1/n$$이라는 가정과, noise sample이 data sample보다 m개 만큼 더 있다는 가정을 한다. 그렇다면 $$v$$ 특징을 가진 sample $$i$$가 distribution에 있을 확률은 <code>Equation (6)</code>와 같고, 이 논문의 모델 학습 목표는  negative log-posterior distribution of data and noise sample을 최소화 하는 것이므로 이는 <code>Equation (7)</code>을 최소화 시키는 것과 같다. 이때 $$v$$는 $$x_i$$에 대응되는 feature를 나타내고, $$v&#39;$$는 다른 이미지의 특징을 나타낸다. 이 $$v$$, $$v&#39;$$은 memory bank V에 포함되어 있는 벡터이다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/f360cf66-44f1-4f80-bfe9-5e68d0313602/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/6bcf733f-634d-462a-a593-ff2e8eb76d34/image.png" alt=""></p>
</li>
<li><p><code>Equation 4</code>의 Z을 구하는 것도 계산량이 많기 때문에 이를 줄여주는 작업을 했다. 바로 Monte Carlo approximation을 사용하였는데 {$$j_k$$}는 데이터의 랜덤 표본을 의미한다고 한다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/7ad9dd5f-6d4b-47b5-bbdc-7292d410a373/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/351e4e2a-1ac3-4771-aadd-b5b5679e5952/image.png" alt=""></p>
</li>
</ul>
<h2 id="33-proximal-regularization">3.3) Proximal Regularization</h2>
<ul>
<li>이 논문의 학습 방식은 하나의 클래스에 여러가지 데이터셋이 있는 것이 아닌 각각의 데이터 셋을 하나의 클래스로 보는 방식이다. 이 때문에 학습할때 학습과정에서 많이 불안정하고 이를 개선하기 위해 proximal regularization을 도입했다. </li>
<li>proximal regularization을 도입한 loss function은 <code>Euqation (9)</code>과 같은데, 이 함수는 기존의 loss에 현재 iteration t의 memory bank와 이전 iteration t-1의 memory bank의 차이를 더해주겠다는 의미이다. 이 proximal regularization의 값은 시간이 갈 수록 점점 줄어들 것이다. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/43e7feb8-72a0-4cce-9595-c97d8dad37b5/image.png" alt=""></li>
<li><code>Equation(10)</code>은 이 regularization을 도입한 식이고 <code>Figure 3</code>을 보면 이 방법을 통해 학습 그래프가 진동하는 정도를 많이 개선한 것을 관찰할 수 있다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/265544d2-4ac8-4f89-a2d5-0bf6ba1ef545/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/0cb8cb2f-d556-4b6e-9a89-fd1211461065/image.png" alt=""></li>
</ul>
<h2 id="34-weighted-k-nearest-neighbor-classifier">3.4) Weighted k-Nearest Neighbor Classifier</h2>
<ul>
<li>이 부분은 test 이미지를 넣었을 때 이미지의 클래스를 정할 것인지에 대해 설명한 부분이다. 일단 test용 이미지가 들어오면 이 이미지의 feature를 계산한다. 이 feature를 통해 cosine similarity를 구할 수 있는데 이때 memory bank에서 유사도가 높은 k개의 벡터를 뽑는다. 그 후 k개의 벡터에서 weighted voting을 통해 test 이미지의 클래스를 결정하는 방식이다.</li>
</ul>
<blockquote>
<p>참조</p>
</blockquote>
<ul>
<li><a href="https://arxiv.org/abs/1805.01978">https://arxiv.org/abs/1805.01978</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[SimCLR review]]></title>
            <link>https://velog.io/@lake_park_0706/SimCLR-review</link>
            <guid>https://velog.io/@lake_park_0706/SimCLR-review</guid>
            <pubDate>Mon, 29 Aug 2022 12:58:29 GMT</pubDate>
            <description><![CDATA[<h1 id="1-abstract--introduction">1. Abstract &amp; Introduction</h1>
<blockquote>
<p>What is Constrative Learning?</p>
</blockquote>
<ul>
<li><p>Constrative learning은 라벨링이 되지 않은 데이서셋에서 스스로 input과 label을 만들어 pretext task를 수행하는 self supervised learning 중 하나이다. </p>
</li>
<li><p>Constrative learning은 같은 이미지에서 나온 이미지 조각의 represenation은 서로 가까워지도록, 다른 이미지에서 나온 이미지 조각의 representation은 서로 멀어지도록 학습을 진행한다. 그림을 보면 같은 이미지에서 나온 이미지 조각은 positive pairs로, 다른 이미지에서 나온 이미지 조각은 negative pairs로 분류하여 학습하는 것을 관찰할 수 있다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/97d5a495-ec85-48c1-9aab-1d644845dc3b/image.png" alt=""></p>
</li>
<li><p>이 논문에서는 이런 contrastive learning의 성능을 높이기 위한 4가지 부분을 설명한다.</p>
<ul>
<li>여러 개의 data augmentation </li>
<li>learnable nonlinear transformation</li>
<li>contrastive cross entropy loss</li>
<li>larger batch size &amp; longer training</li>
</ul>
</li>
<li><p>이렇게 하여 다음과 같이 좋은 성능을 내었다고 한다.<br><img src="https://velog.velcdn.com/images/lake_park_0706/post/3424e785-ba22-478b-998a-6fa059245428/image.png" alt=""></p>
</li>
</ul>
<h1 id="2-method">2. Method</h1>
<h2 id="21-the-contrastive-learning-framework">2.1) The Contrastive Learning Framework</h2>
<p><img src="https://velog.velcdn.com/images/lake_park_0706/post/39d5cedc-7ca6-4345-be6a-b1f672c410e8/image.png" alt=""></p>
<ul>
<li><p>첫째로, stochastic data augmentation module은 input $$x$$를 2개의 이미지($$x_i$$, $$x_j$$)로 augmentation한다. 물론 이 두 이미지 조각은 둘다 $$x$$에서 나왔으므로 positive pair이다. 논문에서는 random cropping, random color distortion, random Gaussian blur이 3가지 augmentation을 실험했다.</p>
</li>
<li><p>$$x_i$$와 $$x_j$$ 위에 있는 $$f(.)$$은 input의 representation을 뽑아내는 base encoder이고 논문에서는 이 인코더로 resnet을 사용했고, averaget pooling까지 진행해주었다고 한다.</p>
</li>
<li><p>$$g(.)$$은 constrative loss가 적용되는 단계인데, 이 단계에서는 1개의 hidden layer가 있는 MLP와 relu함수를 사용했다고 한다.</p>
</li>
<li><p>Loss Function</p>
<ul>
<li>이 논문에서는 따로 negative pair를 정해주지 않았다. 대신, N개의 데이터에서 2개의 이미지 조각으로 transformation을 하고, 2N개의 데이터 중에서 2(N-1)개의 조각을 negative pair처럼 사용하였다.</li>
<li>결과적으로 positive pair (i, j)에 대한 loss function은 다음과 같다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d801945f-ff99-456d-ad6f-0150e70578f9/image.png" alt="">
sim 함수는 cosing similarity로 두 이미지가 얼마나 유사한지 계산한다. (필자는 이런 loss function을 사용해서 같은 이미지에서 나온 이미지 조각은 가깝게, 아닌 조각은 멀게 학습하는 것으로 이해했다)</li>
</ul>
</li>
</ul>
<h2 id="22-training-with-large-batch-size">2.2) Training with Large Batch Size</h2>
<ul>
<li>이 논문에서는 representation을 memory bank에 저장하는 것이 아닌, 배치 크기를 256애서 8192까지 다양하게 하여 학습을 진행하였다고 한다. 이 학습을 안정화 시키기 위하여, LARS optimizer를 사용했다.</li>
</ul>
<h1 id="3-data-augmentation-for-contrastive-representation-learning">3. Data Augmentation for Contrastive Representation Learning</h1>
<h2 id="31-composition-of-data-augmentation-operation-is-crucial-for-learning-good-representations">3.1) Composition of data augmentation operation is crucial for learning good representations</h2>
<ul>
<li><p>이 논문에서는 data augmentation의 성능을 비교하기 위해서 다음의 방법들을 사용하여 비교를 했다. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/bc7bb79a-21f5-4436-ad3e-1a1976b21f25/image.png" alt=""></p>
</li>
<li><p>(이 부분은 제대로 이해해 했는지는 모르지만) 논문에서는 ImageNet의 데이터를 사용하였고, 문제는 이 데이터셋의 이미지크기가 일정하지 않은 것이었다 이를 해결하기 위해, 일단 이미지를 crop &amp; reseizing을 해주고 난 후, 이를 모델에 넣어주었다. 이때 모델에서는 augmentation을 실행하게 되는데 branch의 한 쪽 부분만 추가적인 augmentation을 해주는 것이다. 이는 모델의 성능을 떨어뜨리지만 목표는 augmention의 종류별 성능을 비교하는 것이니 그럼에도 불구하고 이렇게 실험을 진행하였다고 한다.</p>
</li>
<li><p>2가지의 방법을 결합하여 augmentation을 진행하였고, 그 결과를 비교하여 표로 나타낸 것이 다음 그림이다. 그림에서 볼 수 있듯이 color와 crop의 방법을 적용한 것이 가장 성능이 좋았다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/066e4175-04f3-4b2e-a03e-6acce3504561/image.png" alt=""></p>
</li>
<li><p>저 위의 두 방법이 성능이 좋은 이유는 이미지를 crop만 하게 되면 Figure 6.(a)처럼 crop된 사진들의 색 분포가 비슷할 수 있다. 논문에서는 이를 color distortion을 적용해서 이미지 색의 다양성을 늘리고 학습 성능을 올리는 것으로 해석하고 있다. 실제로 Figure 6.(b)를 보면 색의 분포가 다양해진 것을 관찰할 수 있다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/c526db1a-c629-42d1-a7bf-9e54dcebd748/image.png" alt=""></p>
</li>
</ul>
<h2 id="32-contrastive-learning-needs-stronger-data-augmentation-than-superivsed-learning">3.2) Contrastive learning needs stronger data augmentation than superivsed learning</h2>
<ul>
<li><p>color distortion의 강도에 따른 모델의 성능을 조사해 보았다. 놀랍게도, distortion의 강도가 높아질수록 SimCLR의 성능은 높아졌다. 반면에 supervised learing의 성능은 오히려 떨어지는 것을 확인할 수 있다. 이를 통해 supervised learning에 도움이 되지 않는 augmentation도 self-supervised learning에는 좋은 영향을 끼칠 수 있다는 것을 알 수 있다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/b22bf769-6726-459e-8bba-c2d9b06e7534/image.png" alt=""></p>
<h1 id="4-architecture-for-encoder-and-head">4. Architecture for Encoder and Head</h1>
<h2 id="41--unsupervised-contrastive-learning-benefits-from-bigger-models">4.1)  Unsupervised contrastive learning benefits from bigger models</h2>
<ul>
<li>모델의 용량, 파라미터가 많을 수록 성능이 높아진다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/ebb94035-ced2-4c2c-afaa-d9b8d1ef0865/image.png" alt=""></li>
</ul>
<h2 id="42-a-nonlinear-projection-head-improves-the-representation-quality-of-the-layer-before-it">4.2) A nonlinear projection head improves the representation quality of the layer before it</h2>
<ul>
<li>이 부분은 Figure 2에서 projection에 해당하는 g(h)에 대해서 설명하였다. g함수는 projection함수인데 이 projection이 linear할 때와 non-linear할때, 없을 때를 비교하여 Figure 8에 정리하였다. Figure 8에서 보면 알 수 있듯이 non-linear projection을 적용했을 때 가장 성능이 좋은 것을 볼 수 있다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/7d74671b-f213-4532-935c-9371c60b0aad/image.png" alt=""></li>
</ul>
</li>
<li><p>또한, projection전의 hidden layer에서의 성능이 그 이후 projection을 적용한 layer보다 성능이 좋았는데, 이는 hidden layer가 더 좋은 representation을 포함하는 것을 뜻한다. 논문에서는 g 함수는 transform에 대해서 변함이 없게 학습이 되어야하고, 이로 인해 downstream tas에 유용한 정보가 이 과정에서 삭제된 것으로 추측했다.</p>
</li>
<li><p>이 추측이 맞는지 확인해보기 위해 실험을 진행했고, Table 3에서 보면 이 추측이 맞다고 판단할 수 있다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/39948480-e140-4f20-8e71-075a886946d3/image.png" alt=""></p>
</li>
</ul>
<h1 id="5-loss-function-and-batch-size">5. Loss Function and Batch Size</h1>
<h2 id="51-normalized-cross-entropy-loss-with-adjustable">5.1) Normalized cross entropy loss with adjustable</h2>
<ul>
<li>이 논문에서는 NT-Xent loss를 사용하였고, 왜 이 loss를 사용하였는지 설명하는 부분이다. NT-Logistic, MarginTriplet loss와 비교하였고, NT-Xent loss가 가장 성능이 좋은 것으로 나타났다. 이는 NT-Xent loss의 $$l_2$$ normalization과 temperature를 잘 조절했기 때문이다.(이 부분에 대해서 부연 설명이 있었지만 잘 이해하지 못했다...ㅠㅠ)</li>
<li><code>Table 4</code>에서는 NT-Xent loss를 다른 loss function과 비교하였고, <code>Table 5</code>에서는 $$l_2$$ normalization과 temperature에 따른 모델의 성능을 정리하였다.
<img src="https://velog.velcdn.com/images/lake_park_0706/post/3a7f5355-a0e7-4dbb-b85c-4d0d0145a706/image.png" alt="">
<img src="https://velog.velcdn.com/images/lake_park_0706/post/d4190a74-14b4-413a-b43d-6d3e45d29cf7/image.png" alt=""></li>
</ul>
<h2 id="52-contrastive-learning-benefits-from-larger-batch-sizes-and-longer-training">5.2) Contrastive learning benefits from larger batch sizes and longer training</h2>
<ul>
<li>이 부분은 배치의 크기에 따른 모델의 성능을 정리한 부분이다. 제목에서 유추할 수 있듯이 배치크기에 따라 모델의 성능이 향상되는 것을 관찰할 수 있었으며 이를 <code>Figure 9</code>에 정리하였다. 
<img src="https://velog.velcdn.com/images/lake_park_0706/post/132873ab-cac8-4724-9764-e48d9d206e3a/image.png" alt=""></li>
</ul>
<blockquote>
<p>참조</p>
</blockquote>
<ul>
<li><a href="https://daeun-computer-uneasy.tistory.com/37">https://daeun-computer-uneasy.tistory.com/37</a></li>
<li><a href="https://hongl.tistory.com/87">https://hongl.tistory.com/87</a></li>
<li><a href="https://cool24151.tistory.com/78">https://cool24151.tistory.com/78</a></li>
</ul>
]]></description>
        </item>
    </channel>
</rss>