<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andrew Bui on Medium]]></title>
        <description><![CDATA[Stories by Andrew Bui on Medium]]></description>
        <link>https://medium.com/@trongan93?source=rss-5b07d49a38be------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*DW9zTtTZvrtFOMNZpF7ssw.jpeg</url>
            <title>Stories by Andrew Bui on Medium</title>
            <link>https://medium.com/@trongan93?source=rss-5b07d49a38be------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 05:53:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@trongan93/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The overview of video coding technique]]></title>
            <link>https://medium.com/data-science/the-overview-of-video-coding-technique-f650aed6c6a4?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/f650aed6c6a4</guid>
            <category><![CDATA[image-compression]]></category>
            <category><![CDATA[video-coding]]></category>
            <category><![CDATA[video-compression]]></category>
            <category><![CDATA[overview]]></category>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Thu, 22 Jul 2021 06:40:32 GMT</pubDate>
            <atom:updated>2021-07-30T10:56:32.682Z</atom:updated>
            <content:encoded><![CDATA[<h4>Keywords — video coding, video compression, image compression</h4><p>Video coding is a technology applied to compresses and decompresses a digital video signal. In video compression, a raw video, which is recorded by a camera, is processed. Through compression processing, the video size is significantly reduced. To evaluate the efficiency of the compression process, the compression ratio (CR) value is selected. The higher the CR value, the better the efficiency of the compression process. Besides, the equally important process is decompressing the video data. Decompression is performed on the result of compression. In order to evaluate the quality of this decompression process, the peak signal-to-noise ratio (PSNR) values were selected. This metric represents a comparison between raw video and decompressed video. The PSNR index is proportional to the quality of the decompressed video. This article examines and evaluates video compression technologies in detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*8wNW25m0SQS1F3R-9oyIrw.png" /><figcaption>Figure 1. The overview flowchart of video coding technique</figcaption></figure><p>Figure 1 is an overview flowchart of video coding technique. In various video coding techniques, some compression algorithms (discrete cosine transform (DCT) / inverse discrete cosine transform (IDCT); quantization (Q) / inverse quantization (IQ)<em>;</em> motion estimation (ME) / motion compensation (MC); entropy coding (EC)) are shared by most video coding standards.</p><p>Following the architecture in Figure 1, this article reviews each compression function, which are transformation functions (DCT/IDCT and other related algorithms), quantization functions (Q/IQ), entropy coding functions (Run — length, Huffman coding, and other related methods).</p><h3>1. Transformation functions</h3><p>The transformations function is used to convert the images/frame data from the spatial domain into the frequency domain. This thesis focuses on the newest and populated technologies that have been discussed for five years. Thus, H.264 and HEVC are selected to be deeply analyzed. In video coding technique in general and H.264, HEVC in particular, the transform basis functions are derived from the DCT [1].</p><p><strong>Definition:</strong> Discrete Cosine Transform is a technique applied to image pixels in the spatial domain in order to transform them into a frequency domain in which redundancy can be identified [2].</p><p>In video compression, the frame is divided into blocks that have the size from 4*4 to 64*64. An image compression technique — JPEG [3] divides the image into blocks 8*8. After that, the two-dimensional Discrete Cosine Transform (DCT) is applied to each of these 8×8 blocks. Equation (1) is the DCT function.</p><p>In video decompression, the Inverse Discrete Cosine Transform (IDCT) is applied to the DCT coefficient blocks. Equation (2) is the IDCT function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*VywYwsHv90MJVETNNm46ZQ.png" /></figure><p>where f_k and F_k are respectively the pixel value and the DCT coefficient, is block index, and</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/167/1*VTQkwo-bsuHKwEsWjytwXA.png" /></figure><p>The uncompressed/raw as well as lossless compression digital image requires high memory and bandwidth. DCT significantly reduces the amount of memory and bandwidth. Figure 2 is an example of DCT coefficients.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*BdCEhKzMQsm24ODiAdc-Qw.png" /><figcaption>Figure 2. Example of DCT coefficients [4]</figcaption></figure><p>In Figure 2, the left image — clearly A letter — is the pixel values — ; the right image — blurred image — is the DCT coefficient — .</p><p>In video coding, H.264, HEVC standards, DCT is applied on each frame. In video intra-coding, DCT is applied to pixel values. Besides, in inter coding, DCT is calculated on residual values. Moreover, the IDCT is reverse the DCT coefficient to image pixel values. In Figure 8, the DCT function is used on each block of frame pixel value; the IDCT is applied after the IQ function.</p><h3>2. Quantization function</h3><p><strong>Definition:</strong> Quantization is the inevitable result of representing a value as a number with a fixed number of decimal places [5].</p><p>In video coding, from the DCT coefficient, the quantization scale code is divided element-wise by the quantization matrix and rounds each resultant element.<strong><em> </em></strong>The quantization parameter ( ) determines the step size for associating the transformed coefficients — — with a finite set of steps. In video coding, the value is directly proportional to the CR and inversely proportional to the PSNR value. With DC value — the value with zero frequency in both dimensions, equations (3) and (4) are the quantization, and inverse quantization formulas are applied to a transformed signal. On the other hand, equations (5) and (6) are the quantization formulas for intra and inter-coding with AC values — the remaining values with non-zero frequencies. Equation (7) is the inverse quantization formula used on the standards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*zqOe4IUUcbxNKD6qCqPstA.png" /></figure><p>where <em>delta </em>is the quantization parameter, F_k_(x,y) is the DCT transformed signal, and is the block index. In video coding, DC is the value x=y=0, AC are the values (x,y) member of {(0,1),…,(n,n)} and n is the block size.</p><p>Figure 3 shows an example of the DCT/Q/IQ/IDCT flow applied on a grey image. The original image is divided into 8x8 blocks. Each block is coded through one-by-one steps: the first step is the transformation by the DCT; then, the DCT coefficient is quantized by the Q function. The Figure bottom blocks are reconstructed by IQ and IDCT functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*nnoTpkhsBAZQON2PBMJyXA.png" /><figcaption>Figure 3. Example of DCT and Q flow [6]</figcaption></figure><p>In video coding, the flow in Figure 3 is applied on each frame that is intra coding process. Besides, for the inter coding process, the motion estimation process is applied on the P frame.</p><h3>3. Motion estimation and Motion Compensation</h3><p>This subsection presents the review of motion estimation (ME) and motion compensation (MC) functions, which are the most important parts of inter coding. Video coding uses motion to encode one frame in terms of another. The motion estimation uses the concept of block motion estimation technique, which encodes the frame data by modified forms of other frames. Figure 4 shows the motion estimation concept. The concept goal is finding the best match between regions in the two frames.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*iqPodrQhhK2kALZk50OHVQ.png" /><figcaption>Figure 4. Motion estimation’s concept [7]</figcaption></figure><p>The input of motion estimation is macroblocks and search areas. The ME performs block motion estimation that computes motion vectors using search algorithms.</p><p>For ME, the current frame (I_t ) in the video sequence is divided into non-overlapping blocks of pixels. For each block in the current frame, the best-matched block within a search window (S) of size in the previous frame (I_t-1) is determined, where is the maximum allowed displacement. The position difference between a template block in the current frame and the best-matched block in the previous frame is called the motion vector (MV).</p><p>The most simple and basic search method is using the full search (FS) algorithm. FS consists of processing all the pixels in the search range to find the best block matching via cost function. In H.264 and HEVC, SAD is selected because it uses fewer resources than the others cost functions while also having low, and therefore acceptable, distortion [8][9]. Equation (8) considers a template block at position (x,y) in the current frame and the candidate block at position (x+u^, y+v^) in the previous frame (I_t-1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*ogaVq0fpKCumtYFuPAwgsg.png" /></figure><p>where g_t(.) is a pixel value in the current frame I_t, and g_t-1(.) is a pixel value in the previous frame I_t-1.</p><p>The motion vector (MV) in (u,v) is defined as equation (9).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*ltD4vW2Q9tQj6EdtvahklQ.png" /></figure><h3>4. Entropy coding</h3><p><strong>Definition:</strong> Entropy encoding is a lossless data compression scheme independent of the specific characteristics of the medium. Entropy coding creates and assigns a unique prefix code to each unique symbol in the input [10].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*WvTupPkxrKvQQlOJyVYlpw.png" /><figcaption>Figure 5. Entropy coding in Image/Video compression [10]</figcaption></figure><p>Figure 5 shows the Entropy coding in the image/video compression process, which is the last step in the encoder and the first step in the decoder. The Entropy coding is executed on Quantization results from each macroblock. Thus, entropy encoding is an important step that makes a significant impact on CR and PSNR values.</p><h3>References:</h3><p>[1] D. R. Bull, “Video Coding Standards,” in <em>Communicating Pictures</em>, Elsevier, 2014, pp. 411–449.</p><p>[2] B. (Ed. ). (2006). D. C. T. (DCT) B.-E. of M. (pp. 203–205). S. U. https://doi.org/10. 1007/.-387–30038–4_61 Furht, “Discrete Cosine Transform (DCT) BT — Encyclopedia of Multimedia,” B. Furht, Ed. Boston, MA: Springer US, 2006, pp. 203–205.</p><p>[3] I.-T. R. T.81, “ISO/IEC 10918–1: Information technology — Digital compression and coding of continuous-tone still images— requirements and guidelines.” p. 186, 1994, Accessed: Jan. 30, 2021. [Online]. Available: https://www.iso.org/standard/18902.html.</p><p>[4] “File:Letter-a-8x8.png — Wikimedia Commons.” https://commons.wikimedia.org/wiki/File:Letter-a-8x8.png (accessed Jul. 12, 2021).</p><p>[5] R. A. Cottis, “Electrochemical noise for corrosion monitoring,” <em>Tech. Corros. Monit.</em>, pp. 86–110, Jan. 2008, doi: 10.1533/9781845694050.1.86.</p><p>[6] D. R. Bull, “An Introduction to Video Coding,” vol. 5, pp. 3–26, Jan. 2014, doi: 10.1016/B978–0–12–420149–1.00001–6.</p><p>[7] M. Wolf, “Networks and Multiprocessors,” <em>Comput. as Components</em>, pp. 409–457, Jan. 2012, doi: 10.1016/B978–0–12–388436–7.00008–8.</p><p>[8] J. Zheng, L. U. Chao, G. U. O. Jiefeng, D. Chen, and G. U. O. Donghui, “A hardware-efficient block matching algorithm and its hardware design for variable block size motion estimation in ultra-high-definition video encoding,” <em>ACM Trans. Des. Autom. Electron. Syst.</em>, vol. 24, no. 2, pp. 1–21, Jan. 2019, doi: 10.1145/3290408.</p><p>[9] M. Nagaraju, S. K. Gupta, V. Bhadauria, and D. Shukla, “Design and Implementation of an Efficient Mixed Parallel-Pipeline SAD Architecture for HEVC Motion Estimation,” in <em>Lecture Notes in Electrical Engineering</em>, 2021, vol. 683, pp. 605–621, doi: 10.1007/978–981–15–6840–4_50.</p><p>[10] Z.-M. Lu and S.-Z. Guo, “Introduction,” in <em>Lossless Information Hiding in Images</em>, Syngress, 2017, pp. 1–68.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f650aed6c6a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/the-overview-of-video-coding-technique-f650aed6c6a4">The overview of video coding technique</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Detectron2 to segments aircraft from satellite images]]></title>
            <link>https://trongan93.medium.com/using-detectron2-to-segments-aircraft-from-satellite-images-5a8ac1a0d35e?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a8ac1a0d35e</guid>
            <category><![CDATA[segmentation]]></category>
            <category><![CDATA[aircraft]]></category>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[satellite-imagery]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Wed, 14 Apr 2021 08:14:15 GMT</pubDate>
            <atom:updated>2021-04-26T05:17:23.844Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using Detectron2 to segment aircraft from satellite imagery</h3><p>With the rapid development of satellite technology, object tracking using high-resolution images plays a vital role in science and technology on remote sensing. This article presents methods for identifying aircraft from satellite images. Moreover, the source code and step-by-step instructions of the implementation are also showed in this article.</p><p>Detectron2 [1] is an open-source library based on PyTorch that is developed by the Facebook team. Additionally, Rare Planes [2] is a satellite dataset that segments airplanes from many high-resolution satellite images. In this article, I would like to present how to use Detectron2 to segment planes on a satellite image.</p><h3>1. Dataset</h3><p>In this section, we first prepare the airplane dataset. Rare Plane is introduced via paper “RarePlanes: Synthetic Data Takes Flight” [3]. The Rare Plane dataset using the Faster R-CNN model has recorded the mAP value at 73.32 and 54.86 for real and synthetic data, respectively. With model Mask R-CNN, the mAP values are recorded at 73.67 (real) and 56.28 (synthetic). Therefore, Rare Plane is selected to implement in this article.</p><blockquote><strong><em>How to download the Rare Plane dataset?</em></strong></blockquote><p>The original guide is published at <a href="https://github.com/aireveries/RarePlanes">https://github.com/aireveries/RarePlanes</a>. Following the guideline, the dataset will be download to the local server. I tried to set up without using Docker, and I waste time setting up <a href="https://github.com/CosmiQ/solaris">Solaris</a>. Thus, to save time, I highly recommend using the Docker published by the Rare Planes project.</p><pre>docker pull aireverie/rareplanes:latest</pre><p>To run the docker image, you can follow the below command:</p><pre>docker run -p 8888:8888 --name trongan_rareplane -it aireverie/rareplanes</pre><p>In the docker running image, you can run the python code as well as Jupyter notebook. If you prefer to use the Jupyter notebook, you can start the Jupyter notebook server by command:</p><pre>jupyter notebook --ip 0.0.0.0 --port 8888  --no-browser --allow-root</pre><p>Download all the data using the below command line. Both real and synthetic datasets account for over 500 GB of data. Thus, this command will take a while.</p><pre>python download_data.py --dataset_type real synthetic --split train test</pre><p>More detailed of how to download the dataset, following the readme file in this resolution: <a href="https://github.com/aireveries/RarePlanes/blob/master/datasets/README.md">https://github.com/aireveries/RarePlanes/blob/master/datasets/README.md</a></p><p>When done the downloading, the dataset&#39;s structure is the same as the image below — Figure 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MulIK0bFVrrsdfPgYV0uZg.png" /><figcaption>Figure 1. Dataset structure</figcaption></figure><h3>2. Using Detectron2 to segment aircraft from Rareplane dataset</h3><p>This section uses Detectron2 to detect an aircraft split into two sub-sections: “Prepare a coding environment” and “Implement Detectron2 and RarePlane dataset”.</p><p><strong>2.1. Prepare a coding environment</strong></p><p>The first step is to install the PyTorch (skip if your computer/server is already installed). My system is Ubuntu Server 18.04. Thus, I process the installation follow commands:</p><ul><li>Install Cuda 11 (skip this step if your computer has installed it)</li></ul><pre># Add NVIDIA package repositories<br>wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin<br>sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600<br>sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub<br>sudo add-apt-repository &quot;deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /&quot;<br>sudo apt-get update<br><br>wget <a href="http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb"><strong>http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb</strong></a><br><br>sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb<br>sudo apt-get update<br><br>wget <a href="https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libnvinfer7_7.1.3-1"><strong>https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libnvinfer7_7.1.3-1</strong></a>+cuda11.0_amd64.deb<br>sudo apt install ./libnvinfer7_7.1.3-1+cuda11.0_amd64.deb<br>sudo apt-get update<br><br># Install development and runtime libraries (~4GB)<br>sudo apt-get install --no-install-recommends \<br>    cuda-11-0 \<br>    libcudnn8=8.0.4.30-1+cuda11.0  \<br>    libcudnn8-dev=8.0.4.30-1+cuda11.0<br><br># Reboot. Check that GPUs are visible using the command: nvidia-smi<br><br># Install TensorRT. Requires that libcudnn8 is installed above.<br>sudo apt-get install -y --no-install-recommends libnvinfer7=7.1.3-1+cuda11.0 \<br>    libnvinfer-dev=7.1.3-1+cuda11.0 \<br>    libnvinfer-plugin7=7.1.3-1+cuda11.0</pre><ul><li>Install PyTorch</li></ul><pre># CUDA 11.0<br>pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html</pre><p><strong>2.2. Implement Detectron2 and RarePlane dataset</strong></p><p>Detectron2 is Facebook AI Research’s next-generation software system that implements state-of-the-art object detection algorithms. It is a ground-up rewrite of the previous version, Detectron, and it originates from maskrcnn-benchmark [4]. Therefore, cloning the Detectron to your computer is the first step in implementation. You can clone the original Detectron2 from Facebook AI Research at [4] or from my forked repository at [5].</p><p>The commands for [4] and [5] listen to below:</p><pre># Command for [4]<br>git clone <a href="https://github.com/facebookresearch/detectron2.git">https://github.com/facebookresearch/detectron2.git</a><br># Command for [5]<br>git clone <a href="https://github.com/trongan93/detectron2.git">https://github.com/trongan93/detectron2.git</a></pre><p>Continue, let&#39;s start to implement</p><blockquote>Import Lirary</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4936a3ec753c18f658b2d0c3d0afcfb9/href">https://medium.com/media/4936a3ec753c18f658b2d0c3d0afcfb9/href</a></iframe><blockquote>Check the dataset</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2beb33daa9684ef4ed1b1f13899e24a/href">https://medium.com/media/f2beb33daa9684ef4ed1b1f13899e24a/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*HWM5dDe-bWxQsYhvYdFLzg.png" /></figure><blockquote>Then, we create a detectron2 config and a detectron2 DefaultPredictor to run inference on this image.</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1cc9ca1b87c1a49542de8ca9ea7b5adc/href">https://medium.com/media/1cc9ca1b87c1a49542de8ca9ea7b5adc/href</a></iframe><blockquote>Train on a custom dataset</blockquote><p>Register the Rareplanes dataset to detectron2.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a0f3c872de7296aef9b6e3e85db905a5/href">https://medium.com/media/a0f3c872de7296aef9b6e3e85db905a5/href</a></iframe><p>To verify the data loading is correct, let’s visualize the annotations of randomly selected samples in the training set:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f65c88bfae6e6c4e59b51ba30c93a874/href">https://medium.com/media/f65c88bfae6e6c4e59b51ba30c93a874/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*dLuIHkRPLSW2Y-Ag95eNIQ.png" /></figure><blockquote>Train!</blockquote><p>Now, let’s fine-tune a COCO — pre-trained R50-FPN Mask R-CNN model on the Rare Plane dataset.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/200ef5a2e8ee126e7e8b869f1d1795ec/href">https://medium.com/media/200ef5a2e8ee126e7e8b869f1d1795ec/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*Rw2v0C1MvJthZBuzLkNJOw.png" /><figcaption>Training process</figcaption></figure><blockquote><strong>Inference &amp; evaluation using the trained model</strong></blockquote><p>The inference should use the config with parameters that are used in training.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2194bb92f78e8dd8f296539d81adbcdb/href">https://medium.com/media/2194bb92f78e8dd8f296539d81adbcdb/href</a></iframe><p>Then, we randomly select several samples to visualize the prediction results.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/abfa6a76f70c7d6a9278e38e780e08f6/href">https://medium.com/media/abfa6a76f70c7d6a9278e38e780e08f6/href</a></iframe><p>The full simulation results are presented in the next section. The simulation results section also shows the result of the training/evaluation on the plane dataset&#39;s real case. For the Real data case, the dataset path is changed from “/mnt/d/RarePlanes/datasets/synthetic” to “/mnt/d/RarePlanes/datasets/real”. The image folder in the real dataset case is “/mnt/d/RarePlanes/datasets/real/train/PS-RGB_tiled”.</p><h3>3. Simulation Results</h3><p>This section shows the simulation of aircraft segmentation split into two sub-section. The first one is the simulation with Synthetic data, and the other is the results with Real data.</p><p><strong><em>3.1. Record results on Rareplane’s Synthetic data</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y4rfmlP7z2pqcKQlyWFpfQ.png" /><figcaption>Test image 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Ysrd0FejAyoEHJKZE1lenA.png" /><figcaption>The segmented of the Test image 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ASEgeUiJRbCH2M98A3l_Yw.png" /><figcaption>Test image 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*bucVzKkAF-QrtTE9paoWeg.png" /><figcaption>The segmented of the Test image 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvz6pfqpgq2BYj621rP9OQ.png" /><figcaption>Test image 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*kNWNWMEG_U2HQrXR-6-M3g.png" /><figcaption>The segmented of the Test image 3</figcaption></figure><p><strong><em>3.1. Record results on Rareplane’s Real data</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*5-M-ucrNhrex9nz-FoFP3g.png" /><figcaption>Test image 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*z_WZunq5DsdqWhPBAjI7Iw.png" /><figcaption>The segmented of the Test image 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*aac00ryvecE9dkGwldVsvw.png" /><figcaption>Test image 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Cj-tH2mdxHo2a-Ba2Vgnjw.png" /><figcaption>The segmented of the Test image 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*-DB2KoehSPCyoGKejVX3WA.png" /><figcaption>Test image 6</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*tkv-y17oPUGOonpTeNug_A.png" /><figcaption>The segmented of the Test image 6</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*h4VWts0tBftXk7Re-s1OoQ.png" /><figcaption>Test image 7</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*3F1_30d5Q30mH8NOeMqosA.png" /><figcaption>The segmented of the Test image 7</figcaption></figure><p><strong><em>Error Simulation:</em></strong></p><p>When testing on the Rare Plane dataset’s REAL case, segmentation errors are recorded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*XELBFs7JptA6jWSdFZSnow.png" /><figcaption>Test image 8</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*MBQ2OGZqsC6YjeBRLaNy-A.png" /><figcaption>The segmented of the Test image 8 <strong>(ERROR — NOT work)</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Jq7Zp8QuFeWNH2CjnWYCVg.png" /><figcaption>Test image 9</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*vq3fIKiqvz9kmPxbDXUQIw.png" /><figcaption>The segmented of the Test image 9 <strong>(ERROR — NOT work)</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*SQsVHBbjTSXtOjVMvdDTaQ.png" /><figcaption>Test image 10</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*U2TsDmJPBaGaudtT8Mi45w.png" /><figcaption>The segmented of the Test image 10 <strong>(ERROR — NOT work)</strong></figcaption></figure><p>Test images 8, 9, and 10 are the error results of segmentation aircraft. Test image 8 is an error because of unbalancing between object and background. The mistake (Test image 9) is predicted to be due to the incomplete structure of important aircraft features. Finally, Test image 10 is false-segmented by a telescopic bridge, not an aircraft.</p><h3><strong>Conclusion</strong></h3><p>This article presents a method to segment aircraft from satellite images. Most of the test cases are worked well. However, the errors of segmentation are recorded. We are working to solve this problem as well as improve the technology for small object segmentation. Follow me on Medium or my publications to receive more ideas and improvement soon.</p><p><strong>References:</strong><br>[1] <a href="https://ai.facebook.com/blog/-detectron2-a-pytorch-based-modular-object-detection-library-/">https://ai.facebook.com/blog/-detectron2-a-pytorch-based-modular-object-detection-library-/</a><br>[2] <a href="https://aireverie.com/rareplanes">https://aireverie.com/rareplanes</a><br>[3] RarePlanes: Synthetic Data Takes Flight, <a href="https://arxiv.org/abs/2006.02963">https://arxiv.org/abs/2006.02963</a><br>[4] <a href="https://github.com/facebookresearch/detectron2">https://github.com/facebookresearch/detectron2</a><br>[5] <a href="https://github.com/trongan93/detectron2">https://github.com/trongan93/detectron2</a></p><pre>Acknowledgments</pre><p>Thanks to my current working Lab — ViP Lab, National Chi Nan University, Taiwan. Also, thanks to CosmiQ Works and AI. Reverie for proposed the Rare Plane dataset.</p><p>I want to thank your interest in this article that is a straightforward implementation. Follow me on medium to receive more articles (guideline, step by step implement) or novel research publication papers <a href="https://scholar.google.com/citations?user=eIJKsPYAAAAJ&amp;hl=en">https://scholar.google.com/citations?user=eIJKsPYAAAAJ&amp;hl=en</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a8ac1a0d35e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Landslide scaling prediction from satellite image]]></title>
            <link>https://medium.com/data-science/landslide-scaling-prediction-from-satellite-image-5358ccda7978?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/5358ccda7978</guid>
            <category><![CDATA[debris-flow]]></category>
            <category><![CDATA[remote-sensing]]></category>
            <category><![CDATA[satellite-imagery]]></category>
            <category><![CDATA[landslide]]></category>
            <category><![CDATA[image-processing]]></category>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Wed, 21 Oct 2020 17:13:34 GMT</pubDate>
            <atom:updated>2020-10-22T07:11:49.604Z</atom:updated>
            <content:encoded><![CDATA[<p>Landslide is a natural disaster defined as a mass of rock, debris, or earth down a slope. Landslides are denoted by the down-slope movement of soil and rock under the direct influence of gravity. The term “landslide” encompasses five modes of slope movement: falls, topples, slides, spreads, and flows [1][2][3].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NSkFOcr8w2JEriQ570aGDw.jpeg" /><figcaption>Figure 1. Landslide attacks to a town in Philippine — Image by <a href="https://pixabay.com/users/12019-12019/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=79691">David Mark</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=79691">Pixabay</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wy-5CLP1YQGpZjS4NhOseA.jpeg" /><figcaption>Figure 2. Landslide events — Image by <a href="https://pixabay.com/users/hans-2/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1837745">Hans Braxmeier</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1837745">Pixabay</a></figcaption></figure><p>In recent years, satellite technology and remote sensing technology are developing fast. The application of satellite remote sensing to capture the Earth is rapidly increasing in number and image quality. It plays a significant role in the Earth’s surface monitoring.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/0*-o504r5qzrYnEdWD.gif" /><figcaption>Figure 3. Landslide region from satellite image — image source from [4]</figcaption></figure><p>Our primary target is to understand and implement the methodology to detect landslide from satellite images in this paper. From landslide regions detected at different times, a landslide scaling (landslide is developing or reducing) is presented. This article is an explanation version of my public paper under the title “Deep learning for landslide recognition in satellite architecture.” The details of How to do and implements the second section of my paper is presented. Besides, I also share step by step source code of my publication. I hope I can bring a solution from a research paper to implementation in the real world. With this purpose, please share my article or refer to my publication if you are going to publish a research paper.</p><p>T. A. Bui, P. J. Lee, K. Y. Lum, C. Loh, and K. Tan, <strong>“Deep Learning for Landslide Recognition in Satellite Architecture,”</strong> <em>IEEE Access</em>, vol. 8, pp. 143665–143678, 2020, doi: <a href="https://doi.org/10.1109/ACCESS.2020.3014305">10.1109/ACCESS.2020.3014305</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*x63-vmNhsKsQ2W2t.jpg" /><figcaption>Figure 4. Deep Learning for Landslide Recognition in Satellite Architecture — Graphic Abstract [4]</figcaption></figure><p>Figure 4 shows a short process of landslide detection by the combination between a CNN model and an H-BEMD algorithm is introduced. From satellite images captured at different times (September 15, 2013, and September 18, 2014), we can announce landslide is more significantly changed and easy to detect landslide scaling (landslide direction).</p><h3><strong>1. Landslide region detection by H-BEMD (Hue — Bi-Dimensional Empirical Mode Decomposition)</strong></h3><p>Hue — Bi-dimensional empirical mode decomposition (H-BEMD) is an algorithm introduced in paper [4].</p><h4><strong>1.1. Why using a Hue channel in satellite images to detect objects?</strong></h4><p>HSV separates to luminance from chrominance, also known as image intensity. Satellite images are governed by weather, especially the lighting conditions for each shot are different. Figure 5 shows RGB satellite images of the same location under other lighting conditions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*J4ca_sr_MuE9KsuC.gif" /><figcaption>Figure 5. RGB, Histogram, and Hue channel [4]</figcaption></figure><p>Although the histogram values between three images (a,d,g) are different, the hue channels are the same. Therefore, the hue image channel is selected to detect landslide objects in satellite images.</p><p>To convert the RGB image to the Hue channel image, OpenCV is a good and easy way. Basically, OpenCV changes RGB to HSV channel by 8bit/value (np.uint8 — from 0 to 255). However, the Hue value is presented by a circle (from 0 to 360 degrees). Thus, the bellow code shows the methodology to change RGB to HSV with a full value range. In this case, an unsigned integer 16 bit is applied to Full Hue values.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ced2d3725ab2da38e4722529c3c9f732/href">https://medium.com/media/ced2d3725ab2da38e4722529c3c9f732/href</a></iframe><h4><strong>1.2.</strong> <strong>H-BEMD flowchart and source code</strong></h4><p>In this part, I will present the detailed H-BEMD algorithm. Firstly, figure 6 shows the process of how to get a transformed image by H-BEMD.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*y1r5gtraUDhkp957.gif" /><figcaption>Figure 6. H-BEMD flowchart [4]</figcaption></figure><p><strong><em>What is H-BEMD?</em></strong><br><em>H-BEMD is an improved version of the BEMD algorithm. Original BEMD [5] is applied to a Grey image from RGB, which has a value range (in 8 bit/value) from 0 to 255. However, to apply on the Hue channel, BEMD doesn’t get corrected results (landslide region) because the main important key points in BEMD is detecting extrema of an image signal. Therefore, Sin and Cosin value of Hue is applied to Hue value. Then, the extrema of sin and cosine are detected. Finally, arctan2 is used to combine extrema sin and cosine. It is an extremum value of the Hue channel.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7273ee7935a03fead87d873dd6cccd2/href">https://medium.com/media/b7273ee7935a03fead87d873dd6cccd2/href</a></iframe><p>Continue, I present the detail of how H-BEMD work to get <em>imfs_cos_hue </em>and <em>imf_sin_hue</em>.</p><p>What is the detail of H-BEMD?</p><p><em>The sin(hue) and cos(hue) values are denoted by θ and φ, respectively. H-BEMD adaptively decomposes sine and cosine of hue image (θ and φ ) through H-BEMD sifting process as flow:</em></p><ul><li><strong>Step 1: </strong>Detect the extrema (both maxima and minima) points of θ by a morphological algorithm.</li><li><strong>Step 2: </strong>Connect the maxima and minima points of θ, respectively, with a Radial Basis Functions (RBFs) [23] to generate the new 2D ‘envelope.’</li><li><strong>Step 3: </strong>Normalize the 2D ‘envelop’ as presented in section 2.2.2.</li><li><strong>Step 3: </strong>Determine the local mean mθ by averaging the two envelopes.</li><li><strong>Step 4: </strong>Subtract out the mean from the image: ϑi=θ−mθ ;</li><li><strong>Step 5:</strong> Follow step 1 to 4 on φ, ωi=φ−mφ</li><li><strong>Step 6: </strong>Repeat the sifting process with θ=ϑi and φ=ωi and i:=i+1</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f1cb6f3df2c174e5c63a31d7c8bad3fa/href">https://medium.com/media/f1cb6f3df2c174e5c63a31d7c8bad3fa/href</a></iframe><p>Figure 7 is the result of the above source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*FawPBVm-J82zZM1GZ9k2Vw.png" /><figcaption>Figure 7. Landslide region detection by H-BEMD [4]</figcaption></figure><h3><strong>2. Landslide regions segmentation</strong></h3><p>Firstly, we focus on the short review of the Hue channel. Figure 8 shows the architecture of Hue value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*huKg5WBh59F5Lg4d.gif" /><figcaption>Figure 8. Hue channel [4]</figcaption></figure><p>This article introduces to define a landslide region by value range between 330° to 90°. The detailed of python code to define landslide is:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f1a6ab9a8986c4e1f7e1778ff8af76d7/href">https://medium.com/media/f1a6ab9a8986c4e1f7e1778ff8af76d7/href</a></iframe><h3><strong>3. Landslide size and direction detection</strong></h3><p>Two satellite images captured at different times are used to show the testing flowchart in this section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*cljL3aEwjYi8_JLU.gif" /><figcaption>Figure 9. Landslide object from the satellite image. (a) Jure landslide in Nepal was captured on September 15, 2013 — time t1. (b) Jure landslide in Nepal, captured on September 18, 2014 — time t2 [4]</figcaption></figure><p>Figure 10 is the H-BEMD result of Figure 9.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*E2Zb3y9UHcC56Sji.gif" /><figcaption>Figure 10. H-BEMD results [4]</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*puT2HbAo-IzbwCwG.gif" /><figcaption>Figure 11. Landslide labeling of Figure 10 [4]</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*CnduY-p6-YJwUcm5.gif" /><figcaption>Figure 12. Landslide region location. [4]</figcaption></figure><p>From Figure 12, a centroid point of each landslide region is defined. Figure 13 and below source code show the centroid point detailed and how to get centroid point in python code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36b14266d20a60f6d5379e7ba0928c8c/href">https://medium.com/media/36b14266d20a60f6d5379e7ba0928c8c/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*h9yvvq7Jd2jRwWIK.gif" /><figcaption>Figure 13. The centroid of the landslide region. [4]</figcaption></figure><p>The direction of the landslide scaling is defined by a green point and redpoint. Detailed source code below. Figure 14 shows the results of the source code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f90068433e549a9e067f6c0d226f9a9/href">https://medium.com/media/7f90068433e549a9e067f6c0d226f9a9/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*tzOyFzeR8C9DZMid.gif" /><figcaption>Figure 14. Landslide direction[4]</figcaption></figure><p>Based on landslide direction, we can easily define what region is dangerous and easily affected by its impact. From that will accurately forecast people living in the affected areas.</p><p>I hoped this article helpful to you and made a short view of applying satellite data to life.</p><p><strong>References:</strong><br>[1] <a href="https://www.usgs.gov/faqs/what-a-landslide-and-what-causes-one">https://www.usgs.gov/faqs/what-a-landslide-and-what-causes-one</a><br>[2] <a href="https://www.taiwannews.com.tw/en/news/1238060">https://www.taiwannews.com.tw/en/news/1238060</a><br>[3] <a href="https://vov.vn/en/society/massive-landslides-bury-residents-and-houses-in-lai-chau-377950.vov">https://vov.vn/en/society/massive-landslides-bury-residents-and-houses-in-lai-chau-377950.vov</a><br>[4] T. A. Bui, P. J. Lee, K. Y. Lum, C. Loh, and K. Tan, “Deep Learning for Landslide Recognition in Satellite Architecture,” <em>IEEE Access</em>, vol. 8, pp. 143665–143678, 2020, doi: <a href="https://doi.org/10.1109/ACCESS.2020.3014305">10.1109/ACCESS.2020.3014305</a>.<br>[5] J. C. Nunes, Y. Bouaoune, E. Delechelle, O. Niang and P. Bunel, “Image analysis by bidimensional empirical mode decomposition,” <em>Image Vis. Comput.</em>, vol. 21, no. 12, pp. 1019–1026, Nov. 2003.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5358ccda7978" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/landslide-scaling-prediction-from-satellite-image-5358ccda7978">Landslide scaling prediction from satellite image</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nhận diện tàu thuyền dựa trên hình ảnh vệ tinh trên mô hình CNN]]></title>
            <link>https://trongan93.medium.com/nh%E1%BA%ADn-di%E1%BB%87n-t%C3%A0u-thuy%E1%BB%81n-d%E1%BB%B1a-tr%C3%AAn-h%C3%ACnh-%E1%BA%A3nh-v%E1%BB%87-tinh-tr%C3%AAn-m%C3%B4-h%C3%ACnh-cnn-a4b550100157?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4b550100157</guid>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Fri, 12 Jun 2020 12:26:01 GMT</pubDate>
            <atom:updated>2020-06-13T02:10:30.515Z</atom:updated>
            <content:encoded><![CDATA[<h3>Nhận diện tàu thuyền dựa trên hình ảnh vệ tinh với mô hình CNN</h3><p>Trong bài viết này, mình sẽ trình bày về việc nhận diện các tàu thuyền dựa trên hình ảnh vệ tinh.</p><p>Thứ nhất là dataset. Đây là yếu tố quan trọng nhất trong bài toán nhận diện hình ảnh dựa trên CNN. Hình ảnh vệ tinh thì quan trọng nhất chính là độ phân giải của hình ảnh. Có rất nhiều hình ảnh vệ tinh được cung cấp miễn phí và cập nhật hằng ngày, tuy nhiên độ phân giải hình ảnh rất thấp (ví dụ là Landsat 8 - với độ phân giải 30m/pixel), thì không thể sử dụng để nhận diện các tàu thuyền được. Planet thì có độ phân giải cao, sử dụng tốt cho việc nhận diện tàu thuyền nhưng mức phí để sử dụng cũng cao theo. Mình sẽ trình bày cụ thể về các loại hình ảnh vệ tinh trong một bài viết riêng. Trong bài viết này, mình sử dụng bộ dataset &quot;<a href="https://www.kaggle.com/rhammell/ships-in-satellite-imagery">Ships in Satellite Imagery</a>&quot;, bộ dataset này được tổng hợp từ nhiều vệ tinh thương mại có độ phân giải cao, nên có thể dễ dàng sử dụng cho mục đích trong bài viết này.</p><p>Các bạn có thể download từ Kaggle theo đường link <a href="https://www.kaggle.com/rhammell/ships-in-satellite-imagery">https://www.kaggle.com/rhammell/ships-in-satellite-imagery</a> hoặc download trực tiếp từ website của mình <a href="http://vipnas.buitrongan.com:5000/sharing/y0psROlPG">http://vipnas.buitrongan.com:5000/sharing/y0psROlPG</a></p><p>Dataset đã sẵn sàng, giờ chúng ta bắt đầu cho quá trình train bộ dữ liệu này trước.</p><p>Môi trường mình sử dụng để thực hiện (cập nhật 12 tháng 6 2019):<br>- Ubuntu Server 20.04<br>- Cuda 10.2<br>- Tensorflow 2.2.0<br>Vì hiện tại, bản Tensorflow mới nhất chưa hỗ trợ tốt trên Ubuntu 20.04 nên bạn cần phải cấu hình thủ công một số phần. Các bạn có thể tham khảo hướng dẫn cài đặt của mình trên Ubuntu 20.04 tại <a href="https://medium.com/@trongan93/tensorflow-2-2-0-on-ubuntu-server-20-04-3aa431c851bc">https://medium.com/@trongan93/tensorflow-2-2-0-on-ubuntu-server-20-04-3aa431c851bc</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f39987e96051c4dfcc39fc46830b00ea/href">https://medium.com/media/f39987e96051c4dfcc39fc46830b00ea/href</a></iframe><p>Sau khi import các thư viện cần thiết, chúng ta tiến hành import và test bộ dữ liệu training cũng như dữ liệu mẫu.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/402e3a473ed75413bf51891eb3006b2c/href">https://medium.com/media/402e3a473ed75413bf51891eb3006b2c/href</a></iframe><p>Hình đầu tiên trong bộ dataset được thể hiện theo hình bên dưới trên 3 channels khác nhau là R,G,B.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*XrbfPMqPuEigFR66cabc6Q.png" /><figcaption>Hình ảnh mẫu của thuyền</figcaption></figure><p>Bước tiếp theo, chúng ta cần chuẩn hóa bộ dữ liệu.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5288c6cbb883501208556b6a21f888a/href">https://medium.com/media/b5288c6cbb883501208556b6a21f888a/href</a></iframe><p>Sau khi chuẩn hóa bộ dữ liệu, chúng ta tiến hành training cho bộ dữ liệu trên. Vì hiện tại, mình sử dụng Tensorflow 2.2.0, cho đến thời điểm hiện tại, mình cần phẩn config GPUs memory trên các server training multi-gpus.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c03cdf11399881b0768b3a8787ecd2bf/href">https://medium.com/media/c03cdf11399881b0768b3a8787ecd2bf/href</a></iframe><p>Mình tiến hành xây dựng Model CNN, trong bài này, mình sử dụng một mô hình CNN đơn giản với 3 Convolution Layer. Các bạn có thể sử dụng ResNet, GoogleNet, MobileNet... để training.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63b61c8e553a9c071da7fa013fcd0c6c/href">https://medium.com/media/63b61c8e553a9c071da7fa013fcd0c6c/href</a></iframe><p>Sau khi định nghĩa xong model, chúng ta tiến hành training.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/167918f87fa305f7af8cf24a2e2aeb91/href">https://medium.com/media/167918f87fa305f7af8cf24a2e2aeb91/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*kmiW13Dm186nqj5eNt7p_Q.png" /></figure><p>Trong lúc quá trình training thực hiện, chúng ta chọn một hình ảnh ví dụ để thực hiện quá trình classification.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/55ad751cdd9001abf57a627024b544cb/href">https://medium.com/media/55ad751cdd9001abf57a627024b544cb/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*aRswm4izJbU7szBPVGgKRA.png" /></figure><p>Sau khi đợi để hoàn thành quá trình training, chúng ta chuyển qua quá trình sử dụng model đã training để nhận diện hình ảnh. Trước tiên chúng ta chia nhỏ hình lớn thành các hình nhỏ có kích thước 80*80 pixel. Chúng ta sẽ tiến hành nhận dện các đối tượng dựa trên các hình nhỏ này.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ae362ca77f92554ba163e058d4ad9d1/href">https://medium.com/media/7ae362ca77f92554ba163e058d4ad9d1/href</a></iframe><p>Cuối cùng chúng ta sẽ sử dụng model đã được training để tìm ra chính xác các vị trí hình nào có chứa các tàu thuyền.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e2588110efd7d491365ee7b37685da2/href">https://medium.com/media/7e2588110efd7d491365ee7b37685da2/href</a></iframe><p>Hình bên dưới là 3 ví dụ về việc nhận diện các thuyền sau khi scan với các hình ảnh đã cắt với kích thước 80x80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*I-sUkni8NEZa8LjtzpfMsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*jsRlXv7EGNOHDlqPBM1wvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*hH-nCzJpbJpWjGFsV0jpNA.png" /></figure><p>Từ các vị trí của các hình ảnh đã được cắt, chúng ta tiến hành xác định vị trí của các block trong hình test. Sau đó tiến hành khoanh vùng các vị trí này lại.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e38be54eb64cfb10a302c32893c4353/href">https://medium.com/media/7e38be54eb64cfb10a302c32893c4353/href</a></iframe><p>Kết quả ghi nhận được sẽ hiển thị như sau:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*-fzpTxqRG_pI3cN2B12XYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*nCmVXbxJuWZ0eBwybid2XA.png" /></figure><p>Bài viết ngắn, hy vọng giúp cho các bạn giải trí và cũng là một homework nhỏ cho các bạn tìm tòi trong 2 ngày cuối tuần sắp tới.</p><p>Full code, các bạn clone tại git của mình nhé: <a href="https://github.com/trongan93/ncnu-ai-course/blob/master/W15-ShipDetection/ship-classification.ipynb">https://github.com/trongan93/ncnu-ai-course/blob/master/W15-ShipDetection/ship-classification.ipynb</a></p><p><strong>Trong-An Bui<br></strong><a href="http://buitrongan.com/"><strong>buitrongan.com</strong></a></p><p>References:</p><p>https://www.kaggle.com/rhammell/ships-in-satellite-imagery</p><p>https://www.kaggle.com/byrachonok/keras-for-search-ships-in-satellite-image/notebook</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4b550100157" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tensorflow 2.2.0 on Ubuntu Server 20.04]]></title>
            <link>https://trongan93.medium.com/tensorflow-2-2-0-on-ubuntu-server-20-04-3aa431c851bc?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/3aa431c851bc</guid>
            <category><![CDATA[ubuntu-20-04]]></category>
            <category><![CDATA[tensorflow-installation]]></category>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Fri, 29 May 2020 09:53:01 GMT</pubDate>
            <atom:updated>2020-05-29T09:53:01.825Z</atom:updated>
            <content:encoded><![CDATA[<p>Currently, Ubuntu released version 20.04. But the Tensorflow still keep support on version 18.04. Thus, we will get a lot of error in problem when installing Tensorflow version 2.2.0 on Ubuntu 20.04.</p><p>In this article, I short introduce how to set up Tensorflow on Ubuntu 20.04 (updated on May 29th, 2020)</p><p>First, we focused on the guideline from the TensorFlow webpage (accessed: May 29th, 2020) at <a href="https://www.tensorflow.org/install/gpu">https://www.tensorflow.org/install/gpu</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*D0cpS8288Ru3pbc9oIHgqQ.png" /></figure><p>But this guideline support for Ubuntu 18.04. The difference is the default GCC version on Ubuntu version 20.04 is 9. Opposite, on 18.04, the GCC version is 8.</p><p>Besides, the default of the Python version on 20.04 is 3.8. But, Tensorflow support with Python 3.7. Therefore, in the <strong><em>first step</em></strong>, we recommend using Conda to create an environment with Python 3.7.</p><pre>conda create -n myenv python=3.7</pre><p>After that, activate the myenv to use python 3.7.</p><pre>conda activate myenv</pre><p>The <strong><em>second step</em></strong><em> </em>is to install GCC version 8. But, we can not change all to GCC version 8, because the process of setup driver, we should to use GCC version 9. So, I present my process to install:</p><pre>sudo apt -y install build-essential<br>sudo apt -y install gcc-8 g++-8 gcc-9 g++-9</pre><pre>sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8 --slave /usr/bin/g++ g++ /usr/bin/g++-8<br>sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 --slave /usr/bin/g++ g++ /usr/bin/g++-9</pre><pre>sudo update-alternatives --config gcc</pre><pre>There are 2 choices for the alternative gcc (providing /usr/bin/gcc).<br><br>  Selection    Path            Priority   Status<br>------------------------------------------------------------<br>* 0            /usr/bin/gcc-9   9         auto mode<br>  1            /usr/bin/gcc-8   8         manual mode<br>  2            /usr/bin/gcc-9   9         manual mode<br><br>Press &lt;enter&gt; to keep the current choice[*], or type selection number: 0<br>update-alternatives: using /usr/bin/gcc-9 to provide /usr/bin/gcc (gcc) in auto mode</pre><p><strong><em>Step 3:</em></strong> Use the default GCC version (V.9) on Ubuntu 20.04 to do:</p><pre># Add NVIDIA package repositories<br>wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.243-1_amd64.deb<br>sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub<br>sudo dpkg -i cuda-repo-ubuntu1804_10.1.243-1_amd64.deb<br>sudo apt-get update<br>wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb<br>sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb<br>sudo apt-get update</pre><pre># Install NVIDIA driver<br>sudo apt-get install --no-install-recommends nvidia-driver-430<br># Reboot. Check that GPUs are visible using the command: nvidia-smi</pre><p>After reboot your computer or server, we can see the GPUs via nvidia-smi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*OFwS_XBT-0Zh6VKRsbTDKQ.png" /></figure><p><strong>Step 4:</strong> we should change GCC to version 8 to continue.</p><pre>sudo update-alternatives --config gcc<br><br>There are 2 choices for the alternative gcc (providing /usr/bin/gcc).<br><br>  Selection    Path            Priority   Status<br>------------------------------------------------------------<br>* 0            /usr/bin/gcc-9   9         auto mode<br>  1            /usr/bin/gcc-8   8         manual mode<br>  2            /usr/bin/gcc-9   9         manual mode<br><br>Press &lt;enter&gt; to keep the current choice[*], or type selection number: 1<br>update-alternatives: using /usr/bin/gcc-8 to provide /usr/bin/gcc (gcc) in manual mode<br><br>gcc --version<br>gcc (Ubuntu 8.4.0-3ubuntu2) 8.4.0</pre><p>Continue install Cuda and CuDNN with GCC 8</p><pre># Install development and runtime libraries (~4GB)<br>sudo apt-get install --no-install-recommends \<br>    cuda-10-1 \<br>    libcudnn7=7.6.4.38-1+cuda10.1  \<br>    libcudnn7-dev=7.6.4.38-1+cuda10.1</pre><pre># Install TensorRT. Requires that libcudnn7 is installed above.<br>sudo apt-get install -y --no-install-recommends libnvinfer6=6.0.1-1+cuda10.1 \<br>    libnvinfer-dev=6.0.1-1+cuda10.1 \<br>    libnvinfer-plugin6=6.0.1-1+cuda10.1</pre><p><strong>Final step: </strong>Install tensorflow</p><pre>pip install --upgrade tensorflow</pre><p><strong>Testing installation</strong></p><pre>python -c &quot;import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fGrTpjwO6qE_n8d6TMX6g.png" /></figure><p>If you want to use Keras, let import via TensorFlow as tensorflow.keras</p><p><em>I hope this article can help you.</em></p><p><strong><em>Trong-An Bui</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3aa431c851bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep Learning and Patterns Recognition — Nhận dạng các Hình mẫu thông qua mô hình Deep Learning (2)]]></title>
            <link>https://trongan93.medium.com/deep-learning-and-patterns-recognition-nh%E1%BA%ADn-d%E1%BA%A1ng-c%C3%A1c-h%C3%ACnh-m%E1%BA%ABu-th%C3%B4ng-qua-m%C3%B4-h%C3%ACnh-deep-learning-2-eeeec4f1657a?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeeec4f1657a</guid>
            <category><![CDATA[trí-thông-minh-nhân-tạo]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[học-máy]]></category>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Mon, 09 Mar 2020 15:24:35 GMT</pubDate>
            <atom:updated>2020-03-09T15:24:35.675Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deep Learning and Patterns Recognition — Nhận dạng các Hình mẫu thông qua mô hình Deep Learning (2)</h3><p>Đây là bài thứ 2 trong chuỗi bài viết về AI nói chung và các thuật toán về Deep Learning nói riêng. Các bài viết của mình được trình bày hoàn toàn bằng tiếng Việt dựa trên những kiến thức mà mình tổng hợp được cũng như các kinh nghiệm của bản thân trong quá trình nghiên cứu và thực hiện các dự án về AI.</p><h3>Chủ đề 2: Cách hoạt động của Trí thông minh nhân tạo (Artificial Intelligence — AI), Máy học (Machine Learning — ML) và Mô hình học sâu (Deep Learning — DL).</h3><p>Trong chủ đề trước, mình đã trình bày về những giới thiệu cơ bản về AI, Machine Learning và Deep Learning. Các bạn có thể xem lại bài viết trong series của mình:<br><em>Chủ đề 1: </em><a href="https://medium.com/@trongan93/deep-learning-and-patterns-recognition-nh%E1%BA%ADn-d%E1%BA%A1ng-c%C3%A1c-h%C3%ACnh-m%E1%BA%ABu-th%C3%B4ng-qua-m%C3%B4-h%C3%ACnh-deep-learning-1-12d0f73ae6fe"><strong><em>Giới thiệu về Trí thông minh nhân tạo (Artificial Intelligence — AI), Máy học (Machine Learning — ML) và Mô hình học sâu (Deep Learning — DL).</em></strong></a></p><p>Trong chủ đề thứ 2 này, mình sẽ tập trung trình bày đến các bạn cách hoạt động của một ứng dụng được gọi là AI. Cách xây dựng một ứng dụng AI ngay từ đầu và cả cách làm thế nào để một ứng dụng của bạn thành một ứng dụng AI. Cách trình bày của mình cũng sẽ xoay quanh một mục tiêu chính trong chuỗi bài viết này là Nhận dạng các hình mẫu (Patterns Recognition). Vì vậy mình sẽ trình bày việc xây dựng một ứng dụng AI cho bài toán nhận diện và cách triển khai các bài toán nhận diện không AI thành một ứng dụng AI.</p><h3>1. Ứng dụng AI hoạt động như thế nào</h3><p>Đầu tiên để hiểu rõ về tính đúng đắn trong AI, có một nguyên tắc chung mà chúng ta phải cùng nhau thống nhất đó là không có gì là tuyệt đối cả. Đây không phải là quy tắc do mình đặt ra mà đó là quy luật chung cho tất cả các vấn đề trong cuộc sống. Chẳng có gì là tuyệt đối, nghe có vẻ như khác triết lý nhưng đây là yếu tố then chốt trong các ứng dụng AI.</p><p>Mình lấy một ví dụ mà mình đã gặp, mình có một người bạn, từ nhỏ đến lớn chủ yếu sống ở Sài Gòn và chưa đi đến các vùng nông thôn. Một hôm, bạn ấy có dịp đi đến vùng nông thôn, thấy <em>con bò và có màu trắng</em>, bạn ấy nói với mình đây không phải là con bò. Mình có hỏi lại bạn ấy chắc chứ, bạn ấy chần chừ, 90% không phải là con bò. Như vậy, đối tượng bạn ấy gặp chỉ có 10% là con bò. Sau khi tìm hiểu nguyên nhân thì mình mới biết trong tất cả các sách báo mà từ trước giờ bạn ấy đọc, thì con bò luôn luôn là màu vàng, bạn ấy chưa bao giờ thấy con bò nào có màu trắng. Các bạn nghĩ như thế nào về ví dụ này của mình, đây là một ví dụ thực sự của mình 100%. Trường hợp này đã xảy ra đối với chính não bộ của con người, thế khi áp dụng vào AI thì như thế nào, trong bài viết này chúng ta cùng tìm hiểu sâu hơn về cách thức mà AI hoạt động để phân tích rõ hơn.</p><p><em>Bạn nghĩ gì từ bức ảnh sau đây?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vjg6yijDtx4bFpyKgrhCLA.png" /><figcaption>Source Image: lionbridge.ai</figcaption></figure><p>Bức ảnh trên thể hiện về quy trình vận hành của một ứng dụng AI. Và đây cũng chính là quy trình xây dựng nên một ứng dụng AI. Mình sẽ trình bày lần lượt quy trình này.</p><p><strong>Bước chuẩn bị: </strong>Đây là công việc không được thể hiện trong sơ đồ bên trên, nhưng đây chính là bước quan trọng nhất trong quá trình xây dựng ứng dụng AI. Tại sao lại như vậy?</p><p>Một châm ngôn cực kỳ quan trọng được nhiều nhà nghiên cứu và triển khai ứng dụng đưa ra đó là &quot;Garbage in, garbage out&quot;. Vai trò của bước xây dựng và chuẩn bị dữ liệu là cực kỳ quan trọng, dù quá trình bạn thực hiện có tốt đến đâu đi chăng nữa thì bộ dữ liệu của bạn không chuẩn hoặc quá sai thì kết quả của bạn nhận lại sẽ tương ứng với nó. Nếu bạn muốn có một kết quả thật tốt, độ chính xác thật cao, thì bắt buộc bạn phải chuẩn bị một bộ dữ liệu thật chuẩn. Hiện tại có rất nhiều bộ dữ liệu chuẩn được công bố và sử dụng rộng rãi. Nếu cho những bạn mới bắt đầu thì mình thấy có 2 bộ dữ liệu không thể bỏ qua là bộ dữ liệu MNIST và ImageNet. MINIST là một bộ dữ liệu tập hợp các chữ số được viết tay, các chữ số từ 0 đến 9 giúp cho AI có thể nhận diện được các chữ số một cách chính xác thông qua hình ảnh. ImageNet là một bộ dữ liệu về các đối tượng trong cuộc sống hằng ngày, bao gồm con vật, đồ vật,... Khi các bạn bắt đầu vào việc học cũng như làm các ứng dụng cơ bản, chắc chắn các bạn sẽ cùng mình thực hiện trên 2 bộ dữ liệu này.</p><p>Mình có thực hiện một dự án, đối tượng mình muốn dự đoán gần như không có một bộ dữ liệu chuẩn nào, team của mình mất gần 6 tháng để tìm kiếm và chuẩn hóa bộ dữ liệu tốt nhất. Phần này mình trình bày về tính quan trọng của dữ liệu để các bạn có thể hình dung và chuẩn bị thật tốt trong quá trình xây dựng ứng dụng AI của các bạn.</p><p>Trước khi bắt đầu cho quá trình training, thông thường từ bộ dữ liệu, chúng ta chia thành 3 bộ dữ liệu con. Tương ứng với sơ đồ bên trên, chúng ta cần 1 bộ dữ liệu cho quá trình TRAINING; một bộ dữ liệu cho quá trình VALIDATION (bộ này có thể chứa một số mẫu trùng với bộ dữ liệu ở quá trình TRAINING); bộ dữ liệu cuối cùng, chỉ cần một số lượng case ít để kiểm tra lại kết quả của quá trình TRAINING và VALIDATION.</p><p><strong>Giai đoạn 1:</strong> <strong>TRAINING</strong>, mình sử dụng nguyên văn cụm từ này. Đây là quá trình chính để làm cho máy có thể &quot;hiểu&quot; được bộ dữ liệu. Đây là quá trình quan trọng thứ hai trong việc xây dựng ứng dụng AI. Machine Learning hay Deep Learning, cốt lõi đều nằm trong giai đoạn này.</p><p>Đầu tiên, chúng ta sẽ gán một “biến số ngẫu nhiên”. Hiểu ngắn gọn đây là một số hiện cho độ chính xác của dữ liệu. Số này là một con số ngẫu nhiên và không cố định, nó phụ thuộc vào nhiều yếu tố và nhiều bộ dữ liệu khác nhau. Trong trường hợp này, chúng ta cùng phân thích trên cùng một bộ dữ liệu, cứ thực hiện xong một vòng lặp thì chúng ta hoàn thành một lần training (training step). Sau mỗi lần training chúng ta lại điều chỉnh lại “ biến số ngẫu nhiên” với mục đích là làm sao để tìm ra con số có độ chính xác cao nhất. Vậy chúng ta cần thực hiện bao nhiêu lần lặp như thế, trong trường hợp nào cần training nhiều, trong trường hợp nào training ít là có kết quả tốt. Mình sẽ trình bày rõ hơn về các yếu tố quyết định này trong các bài sau. Mình tạm dừng ở đây để các bạn có thể hình dung một cách ngắn gọn nhất về quá trình training.</p><p><strong>Giai đoạn 2:</strong> VALIDATION. Mình vẫn tiếp tục giữ nguyên cụm từ nguyên gốc này. Đây là quá trình nhằm kiểm tra lại các hệ số cũng như kết quả của vòng lặp TRAINING. Giá trị về “biến số ngẫu nhiên&quot; sẽ tốt hơn, gần đúng với giá trị của biến số thể hiện tính chính xác nhất. Tuy nhiên, chỉ mới thực hiện xong một bước TRAINING, chắc chắn sẽ có các sai sót về kết quả. Các sự sai sót này, sẽ được ghi nhận và trả kết quả sai sót này lại cho quá trình TRAINING tiếp theo.</p><p>Quá trình TRAINING và VALIDATION được lặp lại theo số lần cố định do người phát triển quy định cho AI. Hoặc có thể để AI tự thực hiện vòng lặp này, cho đến khi có được kết quả chính xác nhất có thể.</p><p><strong>Giai đoạn 3: TESTING. </strong>Đây là giai đoạn cuối cùng trong việc xây dựng một ứng dụng AI. Sau khi ứng dụng đã vượt qua được quá trình TRAINING và VALIDATION. Chúng ta ghi nhận được “biến ngẫu nhiên&quot; có giá trình mô tả cho sự chính xác cao nhất. Chúng ta tiến hành việc kiểm tra thông qua các dữ liệu testing. Bộ dữ liệu này là bộ dữ liệu mới (fresh), chưa được AI đào tạo hay VALIDATION. Chúng ta có thể manual test để kiểm tra tính chính xác của ứng dụng AI vừa được tạo ra.</p><h3><strong><em>2. VÍ DỤ HOT TREND</em></strong></h3><p>Mình sẽ lấy một hình ảnh và thực hiện xem giai đoạn TRAINING này, chúng ta nên làm gì. Chắc nhiều người trong chúng ta sẽ không mấy xa lạ với bức ảnh sau đây.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*HpAKBbElZMNVgUKq.jpg" /><figcaption>Image credits: Gấu Mèo Bắc Mỹ</figcaption></figure><p>Bức ảnh này được chụp ở Việt Nam, đang làm sôi nổi nhiều group cũng như Fanpage. Bức ảnh này quan tâm đến mức nhiều group nước ngoài, nhiều bài báo phân tích bức ảnh này. Theo bạn trong bức ảnh là chó hay mèo? Nếu bạn nói là chó thì không giống với hình dáng với những con chó thường thấy, nhưng nếu là mèo thì khuôn mặt lại không phải là một khuôn mặt của con mèo. Hình dáng giống mèo và khuôn mặt giống chó. Tại sao bạn lại vừa có những suy nghĩ như trên???????</p><p>Hãy cùng review lại quá trình bên trên để trả lời câu hỏi này cho bản thân bạn nhé. Mình mong qua bài viết ngắn này, các bạn sẽ hiểu được nguyên tắc của một ứng dụng AI hoạt động.</p><p><strong>Andrew Bui</strong><br>First Published: March 9st, 2020.</p><p>Copy right: Đây là những bài viết mang phong cách phát biểu và hiểu biết của cá nhân mình giành cho tất cả những ai hứng thú trong lĩnh vực này, vì một cộng đồng tôn trọng bản quyền, nếu các bạn chia sẻ hoạc sử dụng lại dữ liệu hay trích dẫn từ các bài viết của mình, mong các bạn trích dẫn nguồn cụ thể.</p><p>P/s: Bài tiếp theo, mình sẽ viết về Classification và Clustering. 2 thuật ngữ này nếu dịch ra Tiếng Việt thì có ý nghĩa tương đương nhau, nhưng trong bài toán về AI thì đây lại là 2 khái niệm khác nhau ở rất nhiều mặt.</p><p>Cảm ơn các bạn đã quan tâm và đồng hành với mình trong chuỗi bài viết này.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eeeec4f1657a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep Learning and Patterns Recognition — Nhận dạng các Hình mẫu thông qua mô hình Deep Learning (1)]]></title>
            <link>https://trongan93.medium.com/deep-learning-and-patterns-recognition-nh%E1%BA%ADn-d%E1%BA%A1ng-c%C3%A1c-h%C3%ACnh-m%E1%BA%ABu-th%C3%B4ng-qua-m%C3%B4-h%C3%ACnh-deep-learning-1-12d0f73ae6fe?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/12d0f73ae6fe</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[trí-thông-minh-nhân-tạo]]></category>
            <category><![CDATA[học-máy]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Sun, 01 Mar 2020 08:15:18 GMT</pubDate>
            <atom:updated>2020-03-01T08:20:16.738Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deep Learning and Patterns Recognition — Nhận dạng các Hình mẫu thông qua mô hình Deep Learning (1)</h3><p>Đây là chuỗi bài viết của mình về việc áp dụng Deep Learning vào xử lý việc nhận dạng các đối tượng và hình mẫu thông qua mô hình Deep Learning. Các thuật ngữ phổ biến bằng Tiếng Anh như Artificial Intelligence — AI, Machine Learning — ML, Deep Learning-DL hoặc những cụm từ phổ biến khác thì mình sẽ viết trực tiếp bằng Tiếng Anh. Mình mong muốn cách này sẽ giúp các bạn có thể dễ dàng tìm hiểu thêm hoặc sẽ không quá xa lạ trong học tập hoặc thực hiện các dự án.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kw0BJGR5l6XKUkMf.png" /><figcaption>Source: <a href="https://pjreddie.com/darknet/yolo/">https://pjreddie.com/darknet/yolo/</a></figcaption></figure><p>Chuỗi bài viết này trình bày một cách rõ ràng từ cơ bản đến nâng cao về việc công nghệ AI và ứng dụng của Machine Learning và Deep Learning để xử lý các bài toán trong cuộc sống thực tiễn. Các nội dung mình trình bày có cả lý thuyết do mình đúc kết được trong quá trình tìm hiểu của bản thân, các kinh nghiệm thông qua các dự án thực tiễn mà mình đang thực hiên.</p><p>Mình có tìm hiểu thì hiện tại, chưa có những tài liệu về Tiếng Việt thực sự đầy đủ cho lĩnh vực này. Mình mong thông qua chuỗi bài viết của mình, các bạn sẽ có những kiến thức cơ bản nhất và có thể áp dụng nó thông qua các vấn đề cụ thể của cuộc sống.</p><h4>Chủ đề 1: Giới thiệu về Trí thông minh nhân tạo (Artificial Intelligence — AI), Máy học (Machine Learning — ML) và Mô hình học sâu (Deep Learning — DL).</h4><h4>1. Úng dụng của AI trong cuộc sống hằng ngày</h4><p>Hằng ngày chúng ta đang sử dụng rất nhiều các ứng dụng và thành quả của AI, từ những hoạt động bình thường cho đến các nghiên cứu mang tính chất khoa học lơn. Phần này trình bày một số ứng dụng của AI trong đời sống xung quanh chúng ta hằng ngày.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*CMdPPS_pgelYkpEAM7NU5w.png" /><figcaption>Ứng dụng của AI trong lĩnh vực giao thông vận tải</figcaption></figure><p>Trong <strong>lĩnh vực giao thông</strong>, AI đang được ứng dụng với quy mô phát triển rất nhanh. Các dòng xe ô tô hỗ trợ công việc cảnh báo sai làn đường, nhận diện và gợi ý các thông tin biển báo cho tài xế đang là một phần tất yếu trong sự phát triển của nền công nghiệp sản xuất ô tô. Các dự án về xe tự lái không còn quá xa lạ khi có rất nhiều hãng xe tên tuổi đã thực hiện. Không còn là những dự án nghiên cứu, xe tự lái đang thử nghiệm trong giao thông thực tế, các robot tự vận động, tự di chuyển đã có mặt ở rất nhiều các nhà máy, các kho hàng lớn tại các kho hàng của Amazon hoặc Alibaba. Điều này, minh chứng cho chúng ta thấy, lĩnh vực này, AI đang đóng một phần quan trọng và còn phát triển hơn nữa trong tương lai với việc kết hợp với ngành Tự động hoá.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*xxeZ2q8ZtYQ7s68_94s-sg.png" /><figcaption>AI trong lĩnh vực y tế</figcaption></figure><p>Với AI trong <strong>lĩnh vực chăm sóc sức khoẻ</strong>, việc chẩn đoán các triệu chứng lâm sàn sẽ trở nên chuẩn xác hơn với lượng dữ liệu lớn về các triệu chứng bệnh. Các ứng dụng AI sẽ giúp bác sỹ đưa ra những quyết định đúng đắn hơn dựa trên những triệu chứng và thông tin dự đoán từ các AI. Thuốc và việc sử dụng thuốc đúng cách cũng là một trong những vấn đề AI đang giải quyết, với lượng dữ liệu thuốc vô cùng lớn, thì các ứng dụng của AI có thể đưa ra các gợi ý cho bác sỹ về việc sử dụng thuốc. Ngoài ra, AI cũng đóng góp trong việc làm một kênh theo dõi bệnh nhân, giúp bác sỹ có thể các thông tin chính xác nhất dựa trên lượng dữ liệu tiền sử bệnh, quá trình sinh hoạt của bệnh nhân. AI đóng một vai trò quan trọng trong việc làm một cầu nối giữa bác sỹ và bệnh nhân.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*y7bwBmncTgU7fxQ0FTt1OA.png" /><figcaption>AI trong lĩnh vực tài chính</figcaption></figure><p>Một lĩnh vực nữa AI cũng đang đóng vai trò quan trọng đó chính là <strong>lĩnh vực tài chính</strong>. Dựa trên các số liệu tài chính, các ứng dụng AI sẽ phân tích và đưa ra cho người dùng các giải pháp và gợi ý để có thể cân bằng các giao dịch tài chính. Với AI, thì dữ liệu đóng một vai trò quan trọng, AI sẽ giúp cho các tổ chức tín dụng phòng chống được các gian lận trong quá trình hoạt động. Xa hơn, AI có thể đưa ra các đề xuất và gợi ý trong việc đầu tư tài chính dựa trên tình hình thị trường và các thông tin mà AI thu thập được.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*it5kFPhuTmECXeCuhtsCMg.png" /></figure><p>Chắc sẽ không quá lạ khi nhắc đến các ứng dụng trợ lý ảo của Apple, Google hay Microsoft. AI cho <strong>hỗ trợ cá nhân</strong> đang càng ngày càng phổ biến. “Hey Siri, play music”. “Hey Google, open Map and bring me back home.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*ysB9ive7Q-c1Fv4fNIOpqw.png" /></figure><p>Xa hơn một xíu là AI trong <strong>lĩnh vực không gian</strong>. Việc triển khai AI trong các robot để thực hiện các nhiệm vụ khám phá không gian đang được thực hiện, các robot khám phá mặt trăng hay các hành tinh khác giúp con người trong việc khám phá và nhận được rất nhiều kết quả mà giới hạn của con người vẫn chưa thực hiện được. Một ứng dụng khác của AI chính là khai thác lượng hình ảnh và dữ liệu vô cùng lớn của trái đất được ghi nhận được từ các vệ tinh đang hoạt động xung quanh bề mặt trái đất, lượng dự liệu to lớn được ghi nhận hàng giờ này, được AI phân tính và đưa ra những dự đoán chính xác cho con người. Khi nhắc đến lĩnh vực này dường như rất xa xôi nhưng hiện tại, mình cũng đang nghiên cứu sâu trong lĩnh vực này. AI trong việc khai thác dữ liệu vệ tinh cũng như nghiên cứu triển khai và đưa vào hoạt động các vệ tinh thông minh. Mình sẽ viết rõ hơn các đề tài này trong một chủ đề khác. Các bạn có thể xem thêm trong các bài viết của mình, cũng có một số bài viết về việc nghiên cứu vệ tinh và ứng dụng của nó trong cuộc sống hằng ngày.</p><h3>2. AI là gì?</h3><p>Phần trên chúng ta đã theo dõi về các ứng dụng của AI trong cuộc sống hằng ngày, phần này mình sẽ phân tích rõ hơn về AI. AI là gì và tại sao có thể áp dụng AI trong nhiều lĩnh vực của đời sống như thế.</p><p>AI là gì?</p><blockquote><strong><em>“The science and engineering of making intelligent machines, especially intelligent computer programs” định nghĩa bởi </em></strong><em>John McCarthy, ông là nhà khoa học người Mỹ và được xem là người sinh ra khái niệm và hệ thống trí thông minh nhân tạo.</em></blockquote><p>Tạm dịch nguyên văn khái niệm trên thì AI là một ngành khoa học và kỹ thuật chế tạo ra các máy móc thông minh, đặc biệt là các chương trình máy tính thông minh.</p><p>AI được thực hiện bằng cách nghiên cứu về cách mà não bộ con người<strong> suy nghĩ</strong>; làm thế nào con người có thể <strong>học</strong>, đưa ra các <strong>quyết định và thực hiện</strong> việc giải quyết các vấn đề. Dựa trên các cách này, AI sẽ thực hiện được áp dụng tương tự để giúp các máy móc có thể học, đưa ra các quyết định và giải quyết các vấn đề cụ thể.</p><p>Nghiên cứu và phát triển các ứng dụng AI bao gồm các vấn đề chính như: Làm cho máy móc có thể hiểu biết được các vấn đề; lý luận và giải quyết được các vấn đề cụ thể; nhận thức, học tập và lên kế hoạch cho các vấn đề; từ đó có thể giải quyết thông các hành động củ thể.</p><h3>3. Lịch sử của AI</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aqJRGFByYV5wxIA7W6ugbQ.png" /><figcaption>Source Image: Innovation Observatory</figcaption></figure><p>Lược đồ trên thể hiện lịch sử phát triển của AI. Với một thời gian phát triển dài, nhưng chỉ được phổ biến và tạo thành hot-trend trong thời gian vài năm gần đây có nhiều lý do.</p><p>Trong thời gian gần đây, mô hình của AI chính xác và được tối ưu hơn, các hệ thống phần cứng được phát triển nhanh và mạnh, đủ điều kiện để triển khai các ứng dụng về Deep Learning cũng là điều kiện tiên quyết.</p><p>Một yếu tố khác là chi phí để triển khai các ứng dụng của AI đã giảm đi đáng kể khi có rất nhiều các công ty phần cứng tham gia và cải thiện khả năng hoạt động. Bên cạnh đó, là nhiều thư viện mã nguồn mở để xây dựng các ứng dụng AI càng ngày càng phổ biến, điển hình trong số đó như Tensorflow, Cafe, Keras… giúp việc phát triển các ứng dụng AI giảm thời gian đi rất nhiều lần, làm giảm chi phí triển khai các ứng dụng.</p><h3>4. Phân biệt các khái niệm</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*QnG--3i-Rq1FNWk-2CKttA.png" /></figure><p>Chúng ta rất dễ rối khi nghe rất nhiều về các khái niệm và các thuật ngữ liên quan đến chủ đề này. Trong phần này, chúng ta cùng nhau tìm hiểu và phân biệt rõ ràng các khái niệm này.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*b3JEpgOb5B1c4fInppgoYA.png" /></figure><p>Mình sẽ giải thích một cách ngắn gọn và đơn giản nhất để hiểu rõ ràng nhất về 3 khái niệm là AI, Machine Learning và Deep Learning.</p><ul><li>AI: là các ứng dụng làm cho máy móc có thể suy nghĩ, ra quyết định và thực hiện các hành động thông minh giống như con người.</li><li>Machine Learning: Làm cách nào để máy móc có thể đưa ra các quyết định? Cũng giống như con người, máy móc cần được học để đưa ra các quyết định.</li><li>Deep Learning: Học theo cách nào là tốt nhất? Con người của chúng ta học như thế nào thông qua não bộ của chúng ta. Các cách học cụ thể này được gọi là Deep Learning.</li></ul><p>Mình sẽ dừng các khái niệm tại đây, bài tiếp theo mình sẽ trình bày rõ hơn về việc làm thế nào một hệ thống AI hoạt động, cũng như Machine Learning hoạt động như thế nào, Deep Learning tối ưu quá trình học như thế nào mới là hiệu quả.</p><p><strong>Andrew Bui</strong><br> First Published: March 1st, 2020.</p><p>Copy right: Đây là những bài viết mang phong cách phát biểu và hiểu biết của cá nhân mình giành cho tất cả những ai hứng thú trong lĩnh vực này, vì một cộng đồng tôn trọng bản quyền, nếu các bạn chia sẻ hoạc sử dụng lại dữ liệu hay trích dẫn từ các bài viết của mình, mong các bạn trích dẫn nguồn cụ thể.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12d0f73ae6fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vệ tinh (Satellite)]]></title>
            <link>https://trongan93.medium.com/v%E1%BB%87-tinh-satellite-fa683afca098?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa683afca098</guid>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Sun, 05 May 2019 09:48:13 GMT</pubDate>
            <atom:updated>2019-05-06T07:08:39.622Z</atom:updated>
            <content:encoded><![CDATA[<p>Vệ tinh (satellite) là một trạm không gian được thiết kế để quay quanh trái đất theo một quỹ đạo nhất định và là một trạm chuyển tiếp tín hiệu vô tuyến (radio signal) từ xa với mục đích mở rộng phạm vi liên lạc trên toàn thế giới.<br><em>Ref: “Chapter 7 — Radio/Wireless: The Invisible Cables of Modern Electronics” in Electronics Explained (Second Edition), Pages 159–194, 2018</em></p><h3>Satellite Data Comunication</h3><p>Ref: HARVEY M. DEITEL, BARBARA DEITEL, in <a href="https://www.sciencedirect.com/book/9780122090059">An Introduction to Information Processing</a>, 1986</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/0*TkNZd6ZXXMoXi1MW.jpg" /></figure><h4>Sự truyền dẫn thông tin vệ tinh (Satellite Tranmission)</h4><p>Sự truyền dẫn thông tin vệ tinh (satellite tranmission) sử dụng sóng microwave. Chúng được phát đi từ các vệ tinh trên các quỹ đạo có khoảng cách 22300 miles (gần 36000 km) trên bề mặt trái đất. Ở độ cao này, cả trái đất và vệ tinh đều chuyển động với một tốc độ lớn, nhưng vệ tinh vẫn luôn được giữ tại cùng một điểm so với trái đất. Đây được gọi là quỹ đạo địa tĩnh (geostationary orbit).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/0*KMrQzYwTSmPuTvjM.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/0*VbgckQdFh6Uf3O5A.jpg" /></figure><p>Các máy phát và thu sóng khổng lồ được nhắm trực tiếp vào các vệ tinh để cho phép truyền dẫn trực diện (ligh-of-sight tranmission). Vệ tinh làm cho việc truyền dẫn thông tin trên toàn thế giới một cách dễ dàng, giồng như việc trao đổi thông tin với người hàng xóm kế bên.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/0*DPN2_Vx0hjuZYv2y.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/0*QmZPgGej8BlxDWFS.jpg" /></figure><h4>Mạng vệ tinh (satellite network)</h4><p>Ref: Ram Gopal Lakshmi Narayanan, Oliver C. Ibe, in <a href="https://www.sciencedirect.com/book/9781785480225">Wireless Public Safety Networks 1</a>, 2015</p><p>Mạng vệ tinh cung cấp một sức mạnh cho sự bảo vệ và kết nối toàn cầu, bổ sung cho các nỗ lực cứu trợ thiên tai.<br>Hình ảnh vệ tinh được xác định các ảnh hưởng của thiên tai, từ đó hỗ trợ quá trình phục hồi lâu dài các ảnh hưởng này.<br>Điện thoại vệ tinh sử dụng được ở tất cả các nơi trên thế giới. Tuy không thể hiệu quả hơn so với các giải pháp điện thoại kết nối thông thường (2G/3G/4G…) nhưng điện thoại vệ tinh lại là giải pháp tốt nhất cho việc khắc phục các thảm hoạ.</p><p>Cơ sở hạ tầng không dây qua vệ tinh cho trường hợp khẩn cấp (WISECOM) sử dụng mạng vệ tinh làm xương sống và kết nối các mạng không dây hiện tại với các hệ thống điện thoại cố định [BER 07]. WISECOM bao gồm ba thành phần, đó là Thiết bị đầu cuối truy cập WISECOM (WAT), Vận chuyển WISECOM và Máy chủ WISECOM (WS). Mạng WISECOM cung cấp thông tin liên lạc giữa các thành viên trong phi hành đoàn và liên lạc giữa người sống với người sống sót. Nó đòi hỏi cơ sở hạ tầng lớn để vận hành và quản lý mạng.</p><p>Các vệ tinh Quỹ đạo Trái đất không đồng bộ (GEO) ở độ cao 35.786 km so với mực nước biển ở quỹ đạo xích đạo và chúng quay quanh Trái đất với tốc độ tương đương khi Trái đất quay theo trục của nó. Điều này cho phép vệ tinh duy trì ở một vị trí tương đối cố định và cho phép liên lạc từ Trái đất với cơ sở hạ tầng đơn giản hóa. Hạn chế của vệ tinh GEO là nó có thời gian khứ hồi (round trip time) rất cao và không phù hợp với các ứng dụng điều khiển độ trễ. Vệ tinh quỹ đạo trung bình (MEO) hoạt động ở 8.000 km và cho phép các ứng dụng yêu cầu độ trễ thấp [BLU 13].</p><h4>Ảnh hưởng đến môi trường không gian</h4><p>Thông thường việc đánh giá tác động của vệ tinh đối với môi trường khôngg gian là rất nhỏ. Vệ tinh không gây ra các bức xạ tần số làm ảnh hưởng đến môi trường. Trong thiết kế vệ tinh, yếu tố phần cứng đóng vai trò quan trọng quyết định đến ảnh hưởng của vệ tinh đối với môi trường, thông thường chúng sẽ không thể tạo ra một lượng khí thải đối với môi trường. Tần số dao động từ vài trăm megeherts đến vài chục gigahertz, và cường độ từ trường thường nằm trong khoảng từ một volt trên một mét vuông đến hàng chục volt trên một mét vuông trong tầm nhìn của thiết bị truyền.</p><h3>Ứng dụng thực tế của Công nghệ Vệ tinh</h3><h4>Truyền hình vệ tinh (Satellite TV technically)</h4><p>Kỹ thuật truyền hình vệ tinh cũng chính là TV OTA hoặc radio, nhưng thay vì các tín hiệu đến từ một hay nhiều đài truyền hình cục bộ (local) trên tháp phát sóng, tín hiệu bắt nguồn từ một vệ tinh địa tĩnh 22.300 dặm quỹ đạo xung quanh đường xích đạo (hình bên dưới). Các bộ phát đáp vệ tinh hoạt động trong băng tần Ku với tần số 10,951414 GHz. Hệ thống này được gọi là vệ tinh phát sóng trực tiếp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/0*9J_77lkKklCecGW4.jpg" /></figure><p>Công ty truyền hình vệ tinh nhận tín hiệu TV giống như các công ty truyền hình cáp và kết hợp tất cả lại ở một đầu cuối của trạm Trái đất, nơi tất cả được thu thập và truyền lên tới vệ tinh trên một đường truyền trong phạm vi 14–14.5 GHz (xem Hình dưới). Các tín hiệu sau đó được khuếch đại trong vệ tinh và phát lại trên đường xuống với tần số 10,95–12,12 GHz. Một ăng ten có mức tăng cao tập trung các tín hiệu về Hoa Kỳ hoặc quốc gia quan tâm khác.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/0*SR7OcJuClcaDNdJF.jpg" /></figure><p>Ở trên trái đất, các thuê bao truyền hình vệ tinh có một máy thu và ăng ten đặc biệt. Chúng được minh họa trong hình bên dưới.</p><p>Ăng-ten thường là một đĩa nhỏ hoặc ăng-ten phản xạ parabol có đường kính khoảng 18 in. Ăng-ten thường là một cái sừng nhỏ. Ngoài ra bên trong cụm ăng-ten là bộ khuếch đại nhiễu thấp (LNA) để tăng tín hiệu nhỏ từ vệ tinh. Sau đó, nó được gửi đến một bộ trộn cùng với tín hiệu dao động cục bộ để chuyển đổi tín hiệu xuống dải 950–2100 MHz. Tín hiệu này sau đó được định tuyến bằng một cáp đồng trục (coax) đến máy thu vệ tinh. Tổ hợp LNA / mixer tại anten được gọi là bộ chuyển đổi khối có độ ồn thấp. Việc xử lý tín hiệu thu này tại ăng-ten là cần thiết vì tần số băng tần Ku 10,95–12.75 GHz rất cao, chúng sẽ bị suy giảm quá nhiều bởi cáp đồng trục (coax) ăng-ten đến máy thu. Vì vậy, chuyển đổi xuống tần số thấp hơn cho phép cáp đồng trục được sử dụng cho máy thu.</p><blockquote>Hiện tại, mình cũng đang tham gia một đề tài nghiên cứu về việc mã hoá các tín hiệu Video ghi nhận được từ camera của vệ tinh, nên mình sẽ trình bày rõ một xíu về các cấu trúc và cách mã hoá và ghi nhận tin hiệu video trong phần tiếp theo. Ngoài ra, mình sẽ trình bày về các thuật toán mã hoá để tối ưu đường truyền vệ tinh trong một bài viết khác trên trang của mình<em>.</em></blockquote><p>Bộ thu vệ tinh giống như hộp cáp ở chỗ nó được sử dụng để chọn kênh mong muốn và giải điều chế cho TV. Các tín hiệu vệ tinh là tất cả đều là tín hiệu kỹ thuật số và được truyền trong các gói 147 byte long. (Một máy thu vệ tinh được hiển thị trong Hình bên dưới). Thuật toán giải nén video MPEG-2 được sử dụng. Các tín hiệu được phục hồi sau đó được gửi đến bộ thu DTV, thường là qua cổng HDMI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/0*bDV6vf-Qvy-_gyiM.jpg" /></figure><blockquote><em>Ngoài việc cải thiện và nghiên cứu về cấu trúc vật lý, nhiều nhà nghiên cứu cũng đang áp dụng các thuật toán mã hoá Video tiên tiến hơn với chất lượng hình ảnh cao và thời gian truyền tín hiệu tốt hơn.</em></blockquote><h4>Cảm biến hình ảnh vệ tinh (Imagery remote sensing)</h4><p>Ref: Ran, Lingyan; Zhang, Yanning; Wei, Wei; Zhang, Qilin (2017). <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5677443">“A Hyperspectral Image Classification Framework with Spatial Pixel Pair Features”</a>.</p><p>(Remote sensing) Viễn thám là việc thu thập thông tin về một vật thể hoặc hiện tượng mà không tiếp xúc vật lý với vật thể và do đó trái ngược với quan sát tại chỗ, đặc biệt là Trái đất. Viễn thám được sử dụng trong nhiều lĩnh vực, bao gồm địa lý, khảo sát đất đai và hầu hết các ngành Khoa học Trái đất (ví dụ, thủy văn, sinh thái học, khí tượng học, hải dương học, glaciology, địa chất); nó cũng có các ứng dụng quân sự, tình báo, thương mại, kinh tế, kế hoạch và nhân đạo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0l2GLKoN2m2qc-TO.jpg" /></figure><blockquote><em>Hiện tại, có rất nhiều loại sensor khác nhau được triển khai trên các vệ tinh. Trong đó, các sensor về chụp ảnh trái đất, chụp ảnh không gian, chụp ảnh vệ tinh có một số lượng quan trọng. Hiện tại, mình đang thực hiện một công trình nghiên cứu việc thiết kế, triển khai cũng như khai thác lượng dữ liệu thu thập từ các sensor này. Đây cũng là một trong những chủ đề nghiên cứu đang rất được quan tâm.</em></blockquote><h3>Thiết kế Vệ tinh</h3><h4>Mô phỏng và tối ưu hoá thiết kế vệ tinh</h4><p>Ref: <a href="https://www.sciencedirect.com/science/article/pii/B9780128126721000023">Multidisciplinary Design Optimization of a Micro/Nano Satellite System</a> trong <a href="https://www.sciencedirect.com/book/9780128126721">Space Microsystems and Micro/nano Satellites</a>, 2018</p><p>Không giống với việc thiết kế phần cứng hay lập trình trên những thiết bị điện tử thông thường. Việc thiết kế và triển khai vệ tinh rất khó và có chi phí thực hiện rất cao, việc hiệu chỉnh hay sữa chữa vệ tinh khi đang hoạt động được xem là một nhiệm vụ bất khả thi. Vì vậy trong ngành công nghiệp này, việc mô phỏng và tối ưu hoá thiết kế và chức năng đóng vai trò hết sức quan trọng.</p><h4>Đĩa thu-phát tín hiệu (Satellite Dish)</h4><p>Ref: Thomas Norman CPP, PSP, CSC, in <a href="https://www.sciencedirect.com/book/9780128000229">Integrated Security Systems Design (Second Edition)</a>, 2014</p><p>Đĩa vệ tinh truyền dẫn thông tin được lắp đặt giống như một địa điểm cố định hoặc cũng có thể là một điểm di động để ghi nhận thông tin từ (đường truyền lên) hoặc gửi thông tin (thông qua đường truyền xuống) với các trạm thu phát sóng thông tin mặt đất.<br>Vào mùa thu năm 1945, một sĩ quan điện tử của Không quân Hoàng gia và là thành viên của Hiệp hội liên hành tinh Anh, Arthur C. Clarke [tác giả nổi tiếng năm 2001: A Space Odyssey (1968)], đã viết một bài báo ngắn đặt ra rằng nếu quỹ đạo của vệ tinh được định vị trực tiếp trên đường xích đạo thì có thể được cấu hình sao cho nó quay với tốc độ chính xác như tốc độ quay của trái đất. Sau đó nó sẽ xuất hiện trên không gian tại một vị trí bất động trên quỹ đạo giống như một vị trí cố định trên trái đất. Điều này sẽ cho phép truyền thông tin liên tục đến và đi từ vệ tinh.</p><h4>Pin vệ tinh (Satellite Cells)</h4><p>Ref: Reuss, in <a href="https://www.sciencedirect.com/referencework/9780128012383">Reference Module in Biomedical Sciences</a>, 2014</p><p>Nghiên cứu và triển khai pin năng lượng mặt trời trên vệ tinh đóng vai trò quan trọng vì quyết định năng lượng cần thiết để vệ tinh có thể hoạt động. Nghiên cứu này đòi hỏi sự liên kết chặt chẽ của ngành vật lý và vật liệu. Việc lựa chọn và phát triển các loại pin có độ hồi phục năng lượng cao là rất quan trọng.</p><h3>Tóm tắt</h3><p>Bài viết này trình bày một cách đơn giản và ngắn gọn những kiến thức cơ bản nhất của vệ tinh, từ định nghĩa, cấu trúc, cách hoạt động cho đến một số ứng dụng đơn giản nhất như truyền dẫn thông tin, ghi nhận hình ảnh, tích hợp các sensor cảm biến.</p><p>Tuỳ vào mục đích và yêu cầu khác nhau, mà các nhà nghiên cứu có thể thiết kế ra nhiều loại vệ tinh khác nhau có thể đáp ứng được các mục đích sử dụng của con người.</p><p><em>Originally published at </em><a href="http://share.buitrongan.com/2019/05/05/ve-tinh-satellite/"><em>http://share.buitrongan.com</em></a><em> on May 5, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa683afca098" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sơ lược về việc nghiên cứu và phát triển các ứng dụng từ dữ liệu Vệ tinh]]></title>
            <link>https://trongan93.medium.com/s%C6%A1-l%C6%B0%E1%BB%A3c-v%E1%BB%81-vi%E1%BB%87c-nghi%C3%AAn-c%E1%BB%A9u-v%C3%A0-ph%C3%A1t-tri%E1%BB%83n-c%C3%A1c-%E1%BB%A9ng-d%E1%BB%A5ng-t%E1%BB%AB-d%E1%BB%AF-li%E1%BB%87u-v%E1%BB%87-tinh-6954346ff6f9?source=rss-5b07d49a38be------2</link>
            <guid isPermaLink="false">https://medium.com/p/6954346ff6f9</guid>
            <dc:creator><![CDATA[Andrew Bui]]></dc:creator>
            <pubDate>Mon, 05 Nov 2018 07:07:16 GMT</pubDate>
            <atom:updated>2019-08-31T07:29:44.835Z</atom:updated>
            <content:encoded><![CDATA[<p>C</p><p>Nghiên cứu và xây dựng các ứng dụng về việc xử lý dữ liệu từ vệ tinh không phải là một chủ đề mới mẻ trên thế giới, tuy nghiên khi mình research thông tin bằng Tiếng Việt và một số thông tin về chủ đề này tại Việt Nam thì có rất ít (giường như là không có bất kỳ một bài viết chi tiết nào) về chủ đề này. Nên mình xin được mở một chủ đề về việc nghiên cứu, các công nghệ, khả năng ứng dụng xa hơn một xíu là tiềm năng của nền công nghiệp này trên blog cá nhân của mình.</p><p>Nhân tiện bài viết này, mình cũng giới thiệu một xíu về lý do tại sao mình lại bắt đầu cho bài viết về chủ đề này. Hiện tại, mình đang là nghiên cứu sinh tại ViP Lab — Thuộc trường Đại học Quốc Gia Chinan, Đài Loan. Các dự án chính của lab mình bao gồm các ứng dụng Trí thông minh nhân tạo (Artificial Inteligent), Xử lý Dữ liệu ảnh với độ phân giải lớn (Image Processing/Computer Vision), Mã hoá dữ liệu Video và Hình ảnh (Video/Image Coding, Lập trình Nhúng (Embeded development), Robotics… Bên cạnh đó, một trong những dự án trọng điểm mà Lab mình đang thực hiện là nghiên cứu về xử lý dữ liệu trên Vệ tinh, các ứng dụng từ việc khai phá các dữ liệu từ vệ tinh. Các công trình nghiên cứu của Lab mình hiện đã được triển khai trong chương trình nghiên cứu Formosat-5, với một số vệ tinh hiện tại đã được nằm trong quỹ đạo và hoạt động thực tế trên không gian. Hiện tại, bên lab mình đang nghiên cứu các cấu trúc và ứng dụng tiếp theo trong chương trình Formosat-7 với nhiều ứng dụng tiên tiến hơn kết hợp với AI với mục tiêu 3 năm tới sẽ đưa những vệ tinh đầu tiên trong chương trình này lên không gian. Mình giới thiệu sơ qua như thế để các bạn có cái nhìn khách quan hơn trong các bài viết và chia sẻ của mình trong lĩnh vực này là hoàn toàn dựa theo kiến thức và những kết quả của bản thân trong quá trình nghiên cứu. Mình hy vọng thông qua chuỗi bài viết này, các bạn có thể tiếp cận lĩnh vực nghiên cứu và ứng dụng này một cách hiệu quả nhất. Lĩnh vực này tuy mới nhưng không phải là quá viễn vông.</p><p>Đầu tiên về lịch sử nghiên cứu không gian, phần này chung chung, các bạn có thể “google search” để tìm hiểu thêm hoặc cũng nghe đâu lâu đời lắm rồi. Về 2 cường quốc về nghiên cứu lĩnh vực này, có thể nói ngay đến Liên Xô Cũ (Nga bây giờ) và Mỹ. Trong giai đoạn hiện tại, thì có rất nhiều những quốc gia khác tham gia nghiên cứu lĩnh vực này và có những vệ tinh trên không gian. Việt Nam mình hiện tại cũng đã có vệ tinh trên quỹ đạo để phục vụ nhiều mục đích khác nhau. Nhưng vẫn chưa có vệ tinh nào mang tính ứng dụng do Việt Nam tự nghiên cứu và phát triển cả (Tính đến thời điểm hiện tại mình viết bài này).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*uelHeXHmXLXUFu4cKRpVsA.png" /></figure><p>Hiểu một cách đơn giản nhất, vệ tinh là một vật thể bay xung quanh vật thể khác theo một quỹ đạo nhất định. Ví dụ: Trái đất là vệ tinh của mặt trời, vì trái đất xoay quanh mặt trời theo một quỹ đạo nhất định. Trái đất được xem là vệ tinh tự nhiên. Còn các vệ tinh mà chúng ta tiến hành nghiên cứu là vệ tinh nhân tạo, đây là các vệ tinh do con người tạo ra, bay xung quanh trái đất hoặc các hành tinh khác, để thực hiện nhiều mục đích khác nhau.</p><p><strong>Phân loại vệ tinh</strong></p><p>Có nhiều cách để chia thành nhiều loại vệ tinh khác nhau, tuy nhiên trong bài viết này, dựa trên mục đích sử dụng, mình chia thành các loại chính như sau:</p><ul><li>Vệ tinh thời tiết: mục đích phục vụ cho việc kiểm tra các biến đổi về thời tiết trên trái đất.</li><li>Vệ tinh thông tin: dùng để kết nối thông tin với nhau. Như các vệ tinh về truyền tải tín hiệu di động, internet…</li><li>Vệ tinh vô tuyến: truyền tải các tín hiệu truyền hình từ điểm này đến các điểm khác.</li><li>Vệ tinh nghiên cứu: phục vụ cho vấn đề nghiên cứu dựa trên các dữ liệu thu thập được.</li><li>Vệ tinh định hướng: giúp xác định toạ độ và phương hướng. Đơn giản nhất là hệ thống GPS.</li><li>Vệ tinh quan sát trái đất: điểm mạnh của vệ tinh này chính là các camera với độ phân giải cao có thể quan sát sự thay đổi từ bề mặt trái đất.</li><li>Vệ tinh Quân đội: phục vụ cho các nhiệm vụ của Quân đội và thường mang tính bảo mật dữ liệu cao.</li><li>Còn nhiều loại vệ tinh với nhiều mục đích khác nhau, tuỳ thuộc vào đối tượng muốn khai thác và dữ liệu cần thu thập.</li></ul><p><strong>Nghiên cứu và phát triển vệ tinh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*xSsAK0Tp67MPw0JuczO4UQ.png" /></figure><p>Đầu tiên hãy quan sát về bản đồ các nước phát triển vệ tinh trên thế giới. Việt Nam là nước có màu xanh nhạt, nghĩa là nằm trong những nước đã có vệ tinh nhưng được phát triển và triển khai bởi nước khác. Những nước có màu xanh đậm và đỏ là những nước đã nghiên cứu và phát triển các vệ tinh độc lập.</p><p>Hiện tại mình đang tham gia vào dự án Formosat-7, đây là một dự án nghiên cứu không gian độc lập. Để đạt được mục tiêu cuối cùng, có rất nhiều lĩnh vực cần nghiên cứu như nghiên cứu và phát triển về thông tin liên lạc giữa vệ tinh và trái đất và giữa các vệ tinh với nhau, nghiên cứu trong vấn đề bảo mật và mã hoá thông tin từ vệ tinh, nghiên cứu các thuật toán khai thác dữ liệu, đến việc tối quan trọng là phát triển/thiết kế phần cứng cho vệ tinh, tuổi thọ vệ tinh… rất nhiều công nghệ cần được triển khai.</p><p>Việc phát triển vệ tinh là công việc tốn rất nhiều thời gian, công sức và đặc biệt là kinh phí.</p><p><strong>Khai thác dữ liệu vệ tinh</strong></p><p>Như mình đã trình bày bên trên, việc nghiên cứu và phát triển vệ tinh cực kỳ tốn kém, tuy nhiên đối với kiến thức và yếu tố con người Việt Nam thì đây là một việc có thể thực hiện được. Tuy nhiên ở giai đoạn này, để đầu tư thực hiện là một việc vô cùng khó. Nhưng việc khai thác và sử dụng dữ liệu vệ tinh là việc chúng ta có thể thực hiện ngay từ bây giờ.</p><p>Dữ liệu từ vệ tinh thì có rất nhiều loại: dữ liệu thời tiết, dữ liệu toạ độ, dữ liệu hình ảnh… Dữ liệu về toạ độ hay hệ thống GPS là cái chúng ta có thể thấy đã khai thác dễ dàng và thành công nhất. Các ứng dụng hiện nay, đa phần đều tích hợp hệ thống toạ độ và chỉ đường (mà Google Map đang là tiên phong). Vậy còn các dữ liệu khác thì sao.</p><p>Một dữ liệu có tính thực tế trong khai thác không kém phần quan trọng là dữ liệu về hình ảnh. Và ứng dụng từ nó là vô cùng bao la.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*BxXHChoPNcdHIEc8.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*xfxovi1fy0DCvDjb.png" /></figure><p>Dữ liệu hình ảnh từ vệ tinh với scale và zoom khác nhau.</p><p><strong>Dữ liệu hình ảnh vệ tinh</strong></p><p>Dữ liệu hình ảnh từ vệ tinh được chia thành 3 loại dữ liệu hình ảnh chính:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*av-eh_9eWS0x6B_8.png" /></figure><p><em>Panchromatic</em>: đây là dữ liệu hình ảnh trắng-đen. Được chụp từ các camera trắng đen có độ nét cao từ vệ tinh xuống bề mặt trái đất.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*LJK2OlYhc4GMosvW.png" /></figure><p><em>Multispectral</em>: Đây là loại hình ảnh màu đầu tiên được ghi nhận. Được tạo nên từ khung màu RGB. Khung màu cấu tạo từ ba màu chính là đỏ, xanh lá, xanh dương.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*n8R_0dkjJADJ02Ik.png" /></figure><p>Hyperspectral: được phát triển dựa trên <em>Multispectral </em>với băng tần rộng hơn và có giá trị về độ sáng của bức ảnh.</p><p>Nếu các bạn muốn tìm hiểu rõ hơn và 3 loại dữ liệu hình ảnh này thì các bạn có thể Research thêm hoặc cùng mình thảo luận thông qua các comment trong bài viết.</p><p><strong>Phát triển ứng dụng từ Dữ liệu Hình ảnh vệ tinh</strong></p><p>Việc khai thác dữ liệu từ vệ tinh rất bao la. Tuỳ vào ý tưởng mà chúng ta sẽ tiến hành việc khai thác và triển khai các dữ liệu khác nhau. Trong phần này, mình chỉ đưa ra một số ví dụ về việc khai thác các dữ liệu này thành các ứng dụng cụ thể.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*6WI7B-gK8YQnYmpu.png" /></figure><p>Đơn giản chỉ là việc cung cấp các dữ liệu từ vệ tinh cho việc xác định các vị trí cụ thể, các đối tượng lân cận mà không cần phải áp dụng quá nhiều các phương pháp phân tích dữ liệu. Điển hình là ứng dụng Google Earth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*PpiVD6MtxFYXjMKW.png" /></figure><p>Ứng dụng xác định các máy bay trong sân bay, trên bầu trời… Ứng dụng này, ngoài việc ghi nhận các dữ liệu hình ảnh từ vệ tinh, còn phải xây dựng các hệ thống nhận diện và xử lý dữ liệu thích hợp cho từng mục đích.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*_w-myuwlsvYzRerx.png" /></figure><p>Việc xác định vị trí, số lượng, quản lý bãi xe, kho hàng có quy mô lớn thông qua hình ảnh vệ tinh tiết kiệm đáng kể chi phí trong vận hành.</p><p>Bên trên chỉ là một vài ứng dụng nhỏ, tuỳ vào nhu cầu và hướng phát triển, chúng ta có thể khai thác và xây dựng nhiều ứng dụng khác nhau.</p><p>Tóm lại bài viết, mình đã trình bày một số tổng quan về việc phát triển Vệ tinh nhân tạo, và các ứng dụng thực hiện từ dữ liệu này. Đây không phải là một chủ để hay hướng phát triển xa vời mà sẽ sớm thôi, trong tương lai ngắn, ứng dụng này sẽ phát triển mạnh với lượng dữ liệu hình ảnh từ vệ tinh đang ngày một nhiều và phát triển.</p><p>Cảm ơn các bạn đã giành thời gian cho bài viết của mình. Trong phần tới, mình sẽ tiến hành giới thiệu cho các bạn các thư viện dữ liệu vệ tinh mở mà chúng ta có thể khai thác để nghiên cứu và phát triển các ứng dụng.</p><p>Nếu các bạn có bất kỳ góp ý nào hãy email hoặc để lại tin nhắn cho mình. Bài viết được thực hiện theo văn phong viết cá nhân, nếu các bạn thấy hay và chia sẻ bài viết, vui lòng để lại nguồn cụ thể. Xin cảm ơn và hẹn các bạn trong bài viết tiếp theo.</p><p>Trong-An Bui (Bùi Trọng Ân)</p><p>Nguồn tham khảo:</p><ol><li>Satellite — <a href="https://en.wikipedia.org/wiki/Satellite">https://en.wikipedia.org/wiki/Satellite</a></li><li>AI Applications for Satellite Imagery and Satellite Data — <a href="https://www.techemergence.com/ai-applications-for-satellite-imagery-and-data/">https://www.techemergence.com/ai-applications-for-satellite-imagery-and-data/</a></li><li>Transforming Satellite Imagery Classification with Deep Learning — <a href="https://www.gislounge.com/transforming-satellite-imagery-classification-deep-learning/">https://www.gislounge.com/transforming-satellite-imagery-classification-deep-learning/</a></li></ol><p><em>Originally published at </em><a href="http://share.buitrongan.com/2018/11/05/vetinh-tongquan-ungdung-satellite/"><em>http://share.buitrongan.com</em></a><em> on November 5, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6954346ff6f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>