<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Posts on Simplestory</title><link>https://simplestory.github.io/en/posts/</link><description>Recent content in Posts on Simplestory</description><generator>Hugo</generator><language>en-us</language><copyright>Simplestory</copyright><lastBuildDate>Sat, 17 Aug 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://simplestory.github.io/en/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>DDIM</title><link>https://simplestory.github.io/en/posts/20240817_d9d0d187039bec56d5fc1024c51a882c/</link><pubDate>Sat, 17 Aug 2024 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20240817_d9d0d187039bec56d5fc1024c51a882c/</guid><description>Denoising Diffusion Implicit Models</description></item><item><title>DDPM</title><link>https://simplestory.github.io/en/posts/20240817_60a1868ea6b6f7b05126264f9d212a9c/</link><pubDate>Sat, 17 Aug 2024 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20240817_60a1868ea6b6f7b05126264f9d212a9c/</guid><description>Denoising Diffusion Probabilistic Models</description></item><item><title>LDM</title><link>https://simplestory.github.io/en/posts/20240817_86b1d339bba4e0c154df43f21e99fe50/</link><pubDate>Sat, 17 Aug 2024 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20240817_86b1d339bba4e0c154df43f21e99fe50/</guid><description>Latent Diffusion Models</description></item><item><title>GAN</title><link>https://simplestory.github.io/en/posts/20240811_787700a547309b9912534d7c3540b79b/</link><pubDate>Sun, 11 Aug 2024 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20240811_787700a547309b9912534d7c3540b79b/</guid><description>Generative Adversarial Network</description></item><item><title>VAE</title><link>https://simplestory.github.io/en/posts/20240811_a9423d60164f001a6715546c56c77154/</link><pubDate>Sun, 11 Aug 2024 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20240811_a9423d60164f001a6715546c56c77154/</guid><description>Varitional Autoencoder</description></item><item><title>VQ-GAN</title><link>https://simplestory.github.io/en/posts/20240811_f09978b03d9ad93516b6003551892ddc/</link><pubDate>Sun, 11 Aug 2024 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20240811_f09978b03d9ad93516b6003551892ddc/</guid><description>Vector Quantized Generative Adversarial Network</description></item><item><title>VQ-VAE</title><link>https://simplestory.github.io/en/posts/20240811_520db3fb8aba368d31c1f3e5e9fbd8ba/</link><pubDate>Sun, 11 Aug 2024 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20240811_520db3fb8aba368d31c1f3e5e9fbd8ba/</guid><description>Vector Quantised Variational AutoEncoder</description></item><item><title>LSS</title><link>https://simplestory.github.io/en/posts/20230624_593a3023b826e242be5651751b69d09e/</link><pubDate>Sat, 24 Jun 2023 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20230624_593a3023b826e242be5651751b69d09e/</guid><description>Lift, Splat, Shoot</description></item><item><title>MonoRCNN</title><link>https://simplestory.github.io/en/posts/20230623_f25271ca7acc8b883a6ebeba1a0b263d/</link><pubDate>Fri, 23 Jun 2023 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20230623_f25271ca7acc8b883a6ebeba1a0b263d/</guid><description>&lt;p&gt;Monocular 3D detection is an important and challenging task in the autonomous driving field; the current difficulty is how to accurately predict the depth of objects. MonoRCNN uses geometric relations to decouple the depth estimation problem into the object&amp;rsquo;s real height and its projected height in the image.&lt;/p&gt;
&lt;p&gt;The authors impose two conditions on the use of this model:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The model only predicts the heading angle of the object, that is, the yaw angle&lt;/li&gt;
&lt;li&gt;The camera intrinsics are known during both training and inference&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="architecture"&gt;Architecture&lt;/h2&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://simplestory-blog-img.oss-cn-guangzhou.aliyuncs.com/in_posts/20230623/monorcnn_architecture.png" title="monorcnn_architecture"&gt;&lt;/p&gt;</description></item><item><title>YOLOStereo3D</title><link>https://simplestory.github.io/en/posts/20230623_e5106aece831780fe8decad391998e6a/</link><pubDate>Fri, 23 Jun 2023 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20230623_e5106aece831780fe8decad391998e6a/</guid><description>&lt;p&gt;A lightweight stereo matching module is introduced into the 2D real-time object detection framework yolo to achieve efficient 3D object detection. The rough structure is shown below:&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://simplestory-blog-img.oss-cn-guangzhou.aliyuncs.com/in_posts/20230623/yolostereo3d_architecture.png" title="yolostereo3d_architecture"&gt;&lt;/p&gt;
&lt;h2 id="anchors"&gt;Anchors&lt;/h2&gt;
&lt;p&gt;For 3D object detection, the original yolo anchors designed for 2D objects need to be redesigned. The authors use 12 parameters to represent an anchor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;$[x_{2d}, y_{2d}, w_{2d}, h_{2d}]$, representing the 2D object box&lt;/li&gt;
&lt;li&gt;$[c_x, c_y, z]$ represents the position of the 3D object center in the left image&lt;/li&gt;
&lt;li&gt;$[w_{3d}, h_{3d}, l_{3d}]$ represents the width, height and length of the 3D object box&lt;/li&gt;
&lt;li&gt;$[sin(2\alpha), cos(2\alpha)]$ to estimate the angle of the object&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here the authors found that $[sin\alpha, cos\alpha]$ and $[sin(\alpha+\pi), cos(\alpha+\pi)]$ may produce identical rectangular boxes, so they use $[sin(2\alpha), cos(2\alpha)]$ to represent the angle of the object, and additionally add a classification branch to predict whether $\vert\alpha\vert \gt \frac{\pi}{2}$, which also indicates whether the object is facing the camera.&lt;/p&gt;</description></item><item><title>VoxelNet and SECOND</title><link>https://simplestory.github.io/en/posts/20230305_f73b955eec390396d75e03ababcc4909/</link><pubDate>Sun, 05 Mar 2023 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20230305_f73b955eec390396d75e03ababcc4909/</guid><description>&lt;p&gt;Point clouds are sparse in distribution, irregular in structure and unordered geometrically, so applying convolution operations directly on point clouds may make the generated features deviate greatly from their original representation.&lt;/p&gt;
&lt;h1 id="voxelnet"&gt;VoxelNet&lt;/h1&gt;
&lt;p&gt;This model voxelizes the point cloud and then uses 3D convolution to obtain features. Specifically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The point cloud space is divided equally into a voxel grid of size $v_D$, $v_H$, $v_W$, and at most $T$ points are randomly kept within each cell (extras are removed, fewer are left as they are).&lt;/li&gt;
&lt;li&gt;A VFE layer (voxel feature encoding layer) is applied to each voxel cell to extract voxel features, which are merged into a 4D tensor.&lt;/li&gt;
&lt;li&gt;3D convolution is applied to the tensor obtained above to extract features further, and then an RPN structure is used to obtain the results&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As shown below:&lt;/p&gt;</description></item><item><title>Stereo RCNN</title><link>https://simplestory.github.io/en/posts/20230127_2a9bce23520b48c68e00a87aa00aa611/</link><pubDate>Fri, 27 Jan 2023 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20230127_2a9bce23520b48c68e00a87aa00aa611/</guid><description>&lt;blockquote&gt;
&lt;p&gt;This network performs 3D object detection using stereo vision, and belongs to the image-based result-lifting methods in 3D detection, which decompose 3D detection into two parts: 2D object detection and depth estimation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Stereo RCNN extends Faster RCNN, as shown below:&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://simplestory-blog-img.oss-cn-guangzhou.aliyuncs.com/in_posts/20230127/stereo_rcnn_arch.png" title="stereo_rcnn_architecture"&gt;&lt;/p&gt;
&lt;h2 id="backbone"&gt;Backbone&lt;/h2&gt;
&lt;p&gt;The authors use ResNet-101 combined with FPN, with shared weights. This backbone processes the left and right images at the same time, and the results are then merged as the input of Stereo RPN.&lt;/p&gt;</description></item><item><title>OTA</title><link>https://simplestory.github.io/en/posts/20221006_1087bec7ef12911010976d203f36fd7f/</link><pubDate>Thu, 06 Oct 2022 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20221006_1087bec7ef12911010976d203f36fd7f/</guid><description>The label assignment problem in object detection</description></item><item><title>The PointNet Series</title><link>https://simplestory.github.io/en/posts/20210807_1c4ff5cd7d69cb58295eab75872ba2fd/</link><pubDate>Sat, 07 Aug 2021 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20210807_1c4ff5cd7d69cb58295eab75872ba2fd/</guid><description>&lt;blockquote&gt;
&lt;p&gt;PointNet, PointNet++ and Frustum PointNet. The commonly used 3D point cloud object detection.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="pointnet"&gt;PointNet&lt;/h2&gt;
&lt;p&gt;PointNet applies deep learning directly to point cloud data. Point cloud data is a subset of the points in Euclidean space, and has three properties: disorder, the spatial relationship between points, and invariance.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Disorder. Point cloud data is a set and is insensitive to the order of the data, which requires the model to be invariant to different permutations of the data. There are several approaches. The first is to sort the point cloud by some rule, but for high-dimensional space it is very hard to find a stable sorting rule. Another is to treat it as a sequence and train it with an RNN, but this approach struggles to handle input elements of extremely large length (thousands to tens of thousands, as in a point cloud). Finally the authors use a symmetric function to aggregate the information of each point: $f(\lbrace x_1,x_2,\cdots,x_n\rbrace)\approx g(h(x_1),h(h(x_2),\cdots,h(x_n))$, where the left side of the equation is the goal and the right side is the designed symmetric function. From this we can see that each point in the point cloud is processed separately with $h$ and then passed into the symmetric function $g$. In the paper the authors choose $h$ to be an MLP and $g$ to be max pooling.&lt;/li&gt;
&lt;li&gt;The spatial relationship between points. An object usually consists of point clouds in a specific space, and there are spatial relationships between points; PointNet exploits these relationships by concatenating global features with local features.&lt;/li&gt;
&lt;li&gt;Invariance. The object represented by point cloud data should be invariant to some spatial transformations (rigid transformations). PointNet aligns the point cloud data before extracting features to guarantee invariance. The alignment is achieved by training a small network (T-Net) to obtain a transformation matrix and multiplying it with the input point cloud data. This operation can be seen as adjusting the spatial points; intuitively it rotates them into an orientation that is favorable for classification or segmentation (a rigid transformation). In the actual implementation a related loss function is also added to make the transformation matrix approximately orthogonal, so as to reduce the loss of point cloud information. (Regularization: $L_{reg}=\lVert I-AA^T\rVert_F^2$, that is, an L2 loss)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The rough structure of PointNet is as follows:&lt;/p&gt;</description></item><item><title>Multi-View 3D Object Detection Network</title><link>https://simplestory.github.io/en/posts/20210806_8e5f2ccbcaba22801139e42b929ed820/</link><pubDate>Fri, 06 Aug 2021 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20210806_8e5f2ccbcaba22801139e42b929ed820/</guid><description>MV3D</description></item><item><title>SORT and DeepSORT</title><link>https://simplestory.github.io/en/posts/20210805_59094eb979620e0e11f92ffaa71cf228/</link><pubDate>Thu, 05 Aug 2021 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20210805_59094eb979620e0e11f92ffaa71cf228/</guid><description>&lt;blockquote&gt;
&lt;p&gt;The multi-object tracking frameworks commonly used in industry at present.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="sort"&gt;SORT&lt;/h2&gt;
&lt;p&gt;This algorithm is based on an object detection network (Faster Rcnn) and makes use of the Kalman filter and the Hungarian algorithm (or the KM algorithm), greatly improving the speed of multi-object tracking. The rough pipeline is as follows:&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://simplestory-blog-img.oss-cn-guangzhou.aliyuncs.com/in_posts/20210805/SORT.png" title="SORT"&gt;&lt;/p&gt;
&lt;p&gt;The object detection algorithm obtains the object boxes Detections of the current frame, the Kalman filter obtains the Tracks of the current frame, and IOU matching is performed between the Detections and the Tracks. The final results fall into three categories:&lt;/p&gt;</description></item><item><title>Dynamic Head</title><link>https://simplestory.github.io/en/posts/20210804_697dd2d087a31ba4aab4ff575bde80be/</link><pubDate>Wed, 04 Aug 2021 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20210804_697dd2d087a31ba4aab4ff575bde80be/</guid><description>Dynamic network head</description></item><item><title>Dynamic Convolution and Dynamic ReLU</title><link>https://simplestory.github.io/en/posts/20210803_2d8c6e5a2f995c3808422afc8967c85e/</link><pubDate>Tue, 03 Aug 2021 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20210803_2d8c6e5a2f995c3808422afc8967c85e/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Make it dynamic.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="dynamic-convolution"&gt;Dynamic Convolution&lt;/h2&gt;
&lt;p&gt;Ordinary static convolution applies the same kernel to all input images, whereas dynamic convolution adapts to different images and processes them with more suitable convolution parameters, which increases the expressive power of the model without increasing network depth or width.&lt;/p&gt;
&lt;p&gt;Dynamic convolution dynamically aggregates multiple parallel convolution kernels according to attention. The attention dynamically adjusts the weight of each kernel according to the input, thereby producing an adaptive dynamic convolution. Because the attention is a function of the input, dynamic convolution is no longer a linear function. Superimposing kernels in a nonlinear way through attention gives stronger representational power. The rough structure is as follows:&lt;/p&gt;</description></item><item><title>CRF and Its Application in Segmentation</title><link>https://simplestory.github.io/en/posts/20210516_5df2f4dc23f490c5d68321fa51cabc59/</link><pubDate>Sun, 16 May 2021 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20210516_5df2f4dc23f490c5d68321fa51cabc59/</guid><description>Conditional random field</description></item><item><title>Basic Networks for Image Segmentation</title><link>https://simplestory.github.io/en/posts/20210430_b30ab79aff271e301dde9ca18c2e8085/</link><pubDate>Fri, 30 Apr 2021 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20210430_b30ab79aff271e301dde9ca18c2e8085/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Image segmentation is pixel-level classification of an image, and mainly includes semantic segmentation and instance segmentation. Semantic segmentation only requires segmentation at the pixel level, while instance segmentation additionally requires separating different individuals on top of semantic segmentation. This post briefly introduces several basic semantic segmentation networks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="fcn"&gt;FCN&lt;/h3&gt;
&lt;p&gt;FCN (Full Convolution Network) is a classic image segmentation network whose main structure is an encoder-decoder, where the encoder extracts image feature information and the decoder interprets the extracted features. FCN replaces the fully connected layers in the network with convolution layers, so that 2D feature maps are obtained; these are then upsampled through deconvolution (transposed convolution), and finally a softmax layer produces the mask for each class. It can also handle input images of different sizes. The rough structure is shown below.&lt;/p&gt;</description></item><item><title>Object Detection</title><link>https://simplestory.github.io/en/posts/20201120_0595a0de31914bca4c526fb50d30b2dd/</link><pubDate>Fri, 20 Nov 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20201120_0595a0de31914bca4c526fb50d30b2dd/</guid><description>Object Detection in 20 Years</description></item><item><title>Anchor free--Centernet</title><link>https://simplestory.github.io/en/posts/20201025_93f382c06f3476ad1f59351e0d99f842/</link><pubDate>Sun, 25 Oct 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20201025_93f382c06f3476ad1f59351e0d99f842/</guid><description>Objects as Points</description></item><item><title>Some Common Loss Functions</title><link>https://simplestory.github.io/en/posts/20201018_25c3043509dadf35f8ecc40adf5a369c/</link><pubDate>Sun, 18 Oct 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20201018_25c3043509dadf35f8ecc40adf5a369c/</guid><description>some loss function</description></item><item><title>The Efficient Model Family</title><link>https://simplestory.github.io/en/posts/20201003_fc3691951ecd38cc130a442bcc0566ed/</link><pubDate>Sat, 03 Oct 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20201003_fc3691951ecd38cc130a442bcc0566ed/</guid><description>EfficientX basic family</description></item><item><title>Several Kinds of IOU Loss</title><link>https://simplestory.github.io/en/posts/20200926_ffb198e96e96a613e471e2f2eb1ae86c/</link><pubDate>Sat, 26 Sep 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20200926_ffb198e96e96a613e471e2f2eb1ae86c/</guid><description>&lt;blockquote&gt;
&lt;p&gt;IoU is an important metric in object detection; it measures how good a predicted box is by computing the ratio of the intersection to the union of the predicted box and the ground truth box. But the usual bounding box adjustment function generally adopts the L2 norm, that is, the loss is computed in an MSE manner, and some studies have shown that this is not the optimal optimization function, hence the IOU loss functions.&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>MobileNetV2</title><link>https://simplestory.github.io/en/posts/20200426_02a6a4457d33491491495f7fe2b383d1/</link><pubDate>Sun, 26 Apr 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20200426_02a6a4457d33491491495f7fe2b383d1/</guid><description>Inverted Residuals and Linear Bottlenecks</description></item><item><title>Mask RCNN</title><link>https://simplestory.github.io/en/posts/20200210_ba14ebd4efe67efd08cdc6410e758633/</link><pubDate>Mon, 10 Feb 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20200210_ba14ebd4efe67efd08cdc6410e758633/</guid><description>without bells and whistles</description></item><item><title>YOLO_v3</title><link>https://simplestory.github.io/en/posts/20200115_1789a504337212c61f0b46c458695b7c/</link><pubDate>Fri, 17 Jan 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20200115_1789a504337212c61f0b46c458695b7c/</guid><description>An Incremental Improvement</description></item><item><title>YOLO_v2 and YOLO9000</title><link>https://simplestory.github.io/en/posts/20200110_aa4020065e766e48007d2b3ae229757d/</link><pubDate>Fri, 10 Jan 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20200110_aa4020065e766e48007d2b3ae229757d/</guid><description>Better, Faster, Stronger</description></item><item><title>YOLO_v1</title><link>https://simplestory.github.io/en/posts/20200101_83ba412c3f5a7a54968bf73cc917cd13/</link><pubDate>Wed, 01 Jan 2020 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20200101_83ba412c3f5a7a54968bf73cc917cd13/</guid><description>You Only Look Once</description></item><item><title>SSD</title><link>https://simplestory.github.io/en/posts/20191003_34df20bab5e85dc75bfc94ef569cced9/</link><pubDate>Thu, 03 Oct 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20191003_34df20bab5e85dc75bfc94ef569cced9/</guid><description>Single Shot MultiBox Detector</description></item><item><title>Faster RCNN</title><link>https://simplestory.github.io/en/posts/20190922_5e8040095d43e97ccedd09771f9eab38/</link><pubDate>Sun, 22 Sep 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190922_5e8040095d43e97ccedd09771f9eab38/</guid><description>An object detection algorithm</description></item><item><title>Fast RCNN</title><link>https://simplestory.github.io/en/posts/20190921_817fe11366b1149fdc44a5a4c92685c4/</link><pubDate>Sat, 21 Sep 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190921_817fe11366b1149fdc44a5a4c92685c4/</guid><description>A classic object detection algorithm</description></item><item><title>RCNN</title><link>https://simplestory.github.io/en/posts/20190919_13243638926ee79bc7810c80a460408c/</link><pubDate>Thu, 19 Sep 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190919_13243638926ee79bc7810c80a460408c/</guid><description>A classic object detection algorithm</description></item><item><title>ResNet</title><link>https://simplestory.github.io/en/posts/20190910_cefb8aa8290a0b4cfddf3f88bf5a2a3c/</link><pubDate>Tue, 10 Sep 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190910_cefb8aa8290a0b4cfddf3f88bf5a2a3c/</guid><description>&lt;blockquote&gt;
&lt;p&gt;First of all, happy Teachers&amp;rsquo; Day to all teachers, and thank you for your spirit of giving roses to others with a lingering fragrance on your hands. Then, after almost a month, I have rolled back to update the blog again; before that I was busy with joining the company, hoping to fit into the company&amp;rsquo;s development work as soon as possible, so I was &amp;ldquo;busy&amp;rdquo; for a month. Next let us continue with the introduction of classic image recognition network models. In previous posts we already introduced the AlexNet and VGG networks, both of which pushed the depth of neural networks of that time to the extreme, and subsequent neural network models basically performed no better. This is because as the network gets deeper, during error backpropagation the weights of the earlier network layers basically do not get updated and stay around some fixed value. In 2015, Kaiming He proposed a shortcut connection that propagates the error to the earlier network layers, greatly improving network performance. Below is a brief analysis of the ResNet network.&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>Telling Apart Several Normalization Algorithms</title><link>https://simplestory.github.io/en/posts/20190811_58bd041ca5bf7b009cdc8d07392dc061/</link><pubDate>Sun, 11 Aug 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190811_58bd041ca5bf7b009cdc8d07392dc061/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Neural networks already have several normalization algorithms. They all look very similar and basically share a unified form. This post refers to the Zhihu column SIGAI&amp;rsquo;s article on normalization algorithms; the link is at the bottom of the post.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="the-basic-problem"&gt;The basic problem&lt;/h2&gt;
&lt;p&gt;When using a neural network to learn from a dataset, because the sources of the data may differ considerably, the values of different attributes may also span very different ranges; all of this causes errors in how the data is treated and leads to poor learning by the network. To solve this problem we normalize the data, that is, we regularize data whose value ranges vary widely into the same scale, which is beneficial for the network&amp;rsquo;s learning. Up to now normalization has many variants, the common ones being Batch Normalization (BN), Layer Normalization (LN), Instance Normalization (IN) and Group Normalization (GN). In fact their processing is similar (subtract the mean, divide by the standard deviation, then apply a linear mapping); the difference lies in the dimension along which the statistics are computed. The concrete formula is as follows:&lt;/p&gt;</description></item><item><title>VGG</title><link>https://simplestory.github.io/en/posts/20190730_1036fd1af9bc59d1a811b4e2ab23d60c/</link><pubDate>Tue, 30 Jul 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190730_1036fd1af9bc59d1a811b4e2ab23d60c/</guid><description>A classic convolutional neural network</description></item><item><title>AlexNet</title><link>https://simplestory.github.io/en/posts/20190722_cdebdc3cc4ecd47a04cff48d03a688d3/</link><pubDate>Mon, 22 Jul 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190722_cdebdc3cc4ecd47a04cff48d03a688d3/</guid><description>A classic convolutional neural network</description></item><item><title>LightGBM Model</title><link>https://simplestory.github.io/en/posts/20190324_161af8745042398050ad585874c3eec3/</link><pubDate>Sun, 24 Mar 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190324_161af8745042398050ad585874c3eec3/</guid><description>A Highly Efficient Gradient Boosting Decision Tree</description></item><item><title>Xgboost Model</title><link>https://simplestory.github.io/en/posts/20190317_8fc39e31f30337e40756914df1f8b607/</link><pubDate>Sun, 17 Mar 2019 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20190317_8fc39e31f30337e40756914df1f8b607/</guid><description>A Scalabe Tree Boosting Systeam</description></item><item><title>Deep Learning Optimization</title><link>https://simplestory.github.io/en/posts/20181103_7b202c9a380844d1b8ae2c4f5ee3461f/</link><pubDate>Sat, 03 Nov 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20181103_7b202c9a380844d1b8ae2c4f5ee3461f/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Optimization is a very difficult problem; usually one has to carefully design an objective function and related constraints, and also make sure the problem to be optimized is a convex function, but most real-world problems are non-convex. For non-convex optimization problems there are some basic optimization methods: SGD, Momentum, AdaGrad, RMSProp, Adam and so on&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="stochastic-gradient-descent-sgd"&gt;Stochastic Gradient Descent (SGD)&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;// stochastic gradient descent&lt;/p&gt;
&lt;p&gt;Given the dataset $X=\\{x^{(1)},x^{(2)},...,x^{(n)}\\}$ and the dataset labels $Y=\\{y^{(1)}, y^{(2)},...,y^{(n)}\\}$&lt;/p&gt;</description></item><item><title>How the FFM Model Works</title><link>https://simplestory.github.io/en/posts/20181028_fa81994273e28bed9a6b443a7af7f69e/</link><pubDate>Sun, 28 Oct 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20181028_fa81994273e28bed9a6b443a7af7f69e/</guid><description>&lt;blockquote&gt;
&lt;p&gt;CTR (click-through rate) prediction plays an important role in content recommendation and delivery, and the FFM model is good at handling this kind of data. The FFM model is a variant of the FM model, or rather the FM model is a special case of the FFM model&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="rough-pipeline"&gt;Rough pipeline&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Convert the dataset format (using the LIBSVM or FFMs style)&lt;/li&gt;
&lt;li&gt;Compute the loss function (using the exponential loss function)&lt;/li&gt;
&lt;li&gt;Optimize the parameters (using the AdaGrad + SG strategy)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="converting-the-data-format"&gt;Converting the data format&lt;/h2&gt;
&lt;p&gt;LIBSVM format (does not store zero-valued features):&lt;/p&gt;</description></item><item><title>Decision Tree</title><link>https://simplestory.github.io/en/posts/20180829_3cb42cd7fd688b586f483bd682fc8209/</link><pubDate>Wed, 29 Aug 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180829_3cb42cd7fd688b586f483bd682fc8209/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Decision tree, a common machine learning method, is somewhat like a flowchart. A sample is divided into a set according to the value it takes on some feature, and this is done recursively&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="basic-algorithm"&gt;Basic algorithm&lt;/h1&gt;
&lt;p&gt;Input: training set $D=\\{(\mathbf{x_1},y_1),(\mathbf{x_2},y_2),...,(\mathbf{x_m},y_m)\\}$;
attribute set $A=\\{a_1,a_2,...,a_d\\}$&lt;/p&gt;
&lt;p&gt;Output: a decision tree with node as the root node&lt;/p&gt;
&lt;p&gt;Simple process:&lt;/p&gt;
&lt;p&gt;Using some splitting criterion, the optimal feature is selected to split the samples, and this is done recursively, finally yielding the branch nodes of the decision tree&lt;/p&gt;</description></item><item><title>A Scikit-learn Cheat Sheet Collection</title><link>https://simplestory.github.io/en/posts/20180826_8cb44c1627565d8ede47d43e49e9c8ae/</link><pubDate>Sun, 26 Aug 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180826_8cb44c1627565d8ede47d43e49e9c8ae/</guid><description>&lt;blockquote&gt;
&lt;p&gt;This time I am putting together the commonly used scikit-learn packages as a memo&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;K-nearest neighbors:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html"&gt;from sklearn.neighbors import KNeighborsClassifier&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Linear regression:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html"&gt;from sklearn.linear_model import LinearRegression&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Logistic regression:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html"&gt;from sklearn.linear_model import LogisticRgression&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Decision tree:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html"&gt;from sklearn.tree import DecisionTreeClassifier&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Naive Bayes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Gaussian distribution: &lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.GaussianNB.html"&gt;from sklearn.neive_bayes import GaussianNB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Multinomial distribution: &lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.MultinomialNB.html#sklearn.naive_bayes.MultinomialNB"&gt;from sklearn.neive_baybes import MultinomnalNB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Bernoulli distribution: &lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.BernoulliNB.html#sklearn.naive_bayes.BernoulliNB"&gt;from sklearn.neive_baybes import BernoulliNB&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Support vector machine:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Classification: &lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html"&gt;from sklearn.svm import SVC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Regression: &lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html"&gt;from sklearn.svm import SVR&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ensemble algorithms (sklearn.ensemble):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;bagging:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Classification: &lt;a href="http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.BaggingClassifier.html"&gt;from sklearn.ensemble import BaggingClassifier&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Bayesian Classification</title><link>https://simplestory.github.io/en/posts/20180819_72c962ee57eaf5ebe2b4645dd6827ce3/</link><pubDate>Sun, 19 Aug 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180819_72c962ee57eaf5ebe2b4645dd6827ce3/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Bayesian decision theory considers how to choose the optimal class label based on the relevant probabilities and misclassification losses&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Suppose there are N possible class labels, that is $\mathbf{y}=\\{c_1,c_2,...,c_N\\}$, and $\lambda_{ij}$ is the loss incurred by misclassifying a sample whose true label is $c_j$ as $c_i$. Based on the posterior probability $P(c_i\vert\mathbf{x})$, we can obtain the expected loss incurred by classifying sample $\mathbf{x}$ as $c_i$, that is, the &amp;ldquo;conditional risk&amp;rdquo; on sample $\mathbf{x}$:&lt;/p&gt;</description></item><item><title>SVM Support Vector Machine</title><link>https://simplestory.github.io/en/posts/20180816_7ed73172fd758adf99c76ebc108ea063/</link><pubDate>Thu, 16 Aug 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180816_7ed73172fd758adf99c76ebc108ea063/</guid><description>&lt;blockquote&gt;
&lt;p&gt;SVM is a very important model in machine learning, proposed by Vladimir Vapnik, the father of statistical learning theory&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;This post takes binary classification with SVM as the example&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="derivation"&gt;Derivation&lt;/h2&gt;
&lt;p&gt;Given the training dataset $D=\\{(\mathbf{x_1},y_1),(\mathbf{x_2},y_2),...,(\mathbf{x_m},y_m)\\}, y_i \in \\{-1, +1\\}$, the most basic idea of a classifier is to find in the sample space a dividing space based on the training set D that separates the samples of different classes. The dividing hyperplane can be described by the following linear equation:&lt;/p&gt;</description></item><item><title>Linear Regression and Logistic Regression</title><link>https://simplestory.github.io/en/posts/20180813_135c495c1e86bceb067f1bc3135c278b/</link><pubDate>Mon, 13 Aug 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180813_135c495c1e86bceb067f1bc3135c278b/</guid><description>&lt;blockquote&gt;
&lt;p&gt;I have not updated the blog for a long time, having paused for about half a year, and I have also read half a year&amp;rsquo;s worth of books on machine learning and deep learning; now it is time to write some output&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="linear-regression"&gt;Linear regression&lt;/h1&gt;
&lt;p&gt;Given a dataset $D=\\{(\mathbf{x_1},y_1),(\mathbf{x_2},y_2),...,(\mathbf{x_m},y_m)\\}$, where $\mathbf{x_i}=(x_{i1};x_{i2};...;x_{id}), \ y_{i} \in R$. Linear regression tries to learn a linear model&lt;/p&gt;
$$f(x_i)=wx_i+b$$&lt;p&gt;such that $f(x_i)\simeq y_i$.&lt;/p&gt;
&lt;h2 id="derivation"&gt;Derivation&lt;/h2&gt;
&lt;p&gt;Consider using MSE (mean squared error) to measure how good the model is; then the loss function $L(w,b)$ is:&lt;/p&gt;</description></item><item><title>Using g++ and gdb</title><link>https://simplestory.github.io/en/posts/20180302_5ed219da904f7b6718ebebb4c8b47d3c/</link><pubDate>Fri, 02 Mar 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180302_5ed219da904f7b6718ebebb4c8b47d3c/</guid><description>&lt;blockquote&gt;
&lt;p&gt;G++ is the C++ compiler under Unix/Linux, and gdb is a powerful debugging tool under Unix/Linux. Most of the time, the C/C++ code we write does not run on Windows but on a Linux system. Here I record some usage of g++ and gdb in case they are needed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="using-g"&gt;Using g++&lt;/h3&gt;
&lt;p&gt;When g++ performs compilation work, it needs 4 steps in total:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Preprocessing, generating a .i file, mainly expanding header files and macro definitions: &lt;code&gt;g++ -E test.cpp -o test.i&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Compilation, converting the preprocessed file into assembly language and generating a .s file: &lt;code&gt;g++ -S test.i -o test.s&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Assembly, turning the assembly into object code (machine code) and generating a .o file, mainly converting the .s file into a binary file: &lt;code&gt;g++ -c test.s -o test.o&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Linking, linking the object code to generate an executable program: &lt;code&gt;g++ test.o -o test&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The steps above can also be done with a single command:&lt;/p&gt;</description></item><item><title>Configuring Django on Ubuntu</title><link>https://simplestory.github.io/en/posts/20180219_c851e812699d1207837d404c0af593ce/</link><pubDate>Mon, 19 Feb 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180219_c851e812699d1207837d404c0af593ce/</guid><description>&lt;blockquote&gt;
&lt;p&gt;At the time of the 2018 Spring Festival, heaven knows what I went through, posting a blog article on the fourth day of the new year. Django was actually configured before the New Year; I had just learned some knowledge about developing web applications with python at that time, so I configured it along the way.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Environment used for the configuration&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System: Ubuntu16.04 (LTS)&lt;/li&gt;
&lt;li&gt;python version: python3.6 (using Anaconda to create a virtual environment)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="preparation"&gt;Preparation&lt;/h2&gt;
&lt;h4 id="uninstalling-an-old-version-of-django"&gt;Uninstalling an old version of Django&lt;/h4&gt;
&lt;p&gt;If you are upgrading from an older version of Django, you need to deal with the old version a little.&lt;/p&gt;</description></item><item><title>Configuring Tensorflow on Linux</title><link>https://simplestory.github.io/en/posts/20180204_68b9e972b5a534bc31d12d9be53b57ec/</link><pubDate>Sun, 04 Feb 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180204_68b9e972b5a534bc31d12d9be53b57ec/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Borrowing a line from the &lt;a href="http://www.tensorfly.cn/"&gt;TensorFlow Chinese community&lt;/a&gt;: TensorFlow, an open-source magic tool for artificial intelligence.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Environment used for the configuration&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System: Ubuntu16.04 (LTS)&lt;/li&gt;
&lt;li&gt;python version: python3.6 (using Anaconda to create a virtual environment)&lt;/li&gt;
&lt;li&gt;Nvidia card: Geforce 920M (if there is no Nvidia card, only the CPU version can be installed)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="installing-tensorflow"&gt;Installing Tensorflow&lt;/h1&gt;
&lt;p&gt;tensorflow has two versions, CPU and GPU; I created two python virtual environments and installed these two versions separately. Below I record this painful installation process&lt;/p&gt;</description></item><item><title>Linux Penetration Testing Commands</title><link>https://simplestory.github.io/en/posts/20180120_3e2c28e497c306d34f88081093e32c89/</link><pubDate>Sat, 20 Jan 2018 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20180120_3e2c28e497c306d34f88081093e32c89/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Below is a penetration testing memo for Linux machines; I came across it on the internet by chance and copied it over here.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="penetration-testing-a-linux-machine"&gt;Penetration testing a Linux machine&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align:left"&gt;Command&lt;/th&gt;
&lt;th style="text-align:left"&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;netstat -tulpn&lt;/td&gt;
&lt;td style="text-align:left"&gt;Show network ports in Linux together with the corresponding ID (PID)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;watch ss -stplu&lt;/td&gt;
&lt;td style="text-align:left"&gt;Observe TCP and UDP ports in real time through sockets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;lsof -i&lt;/td&gt;
&lt;td style="text-align:left"&gt;Show established connections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;macchanger -m MACADDR INTR&lt;/td&gt;
&lt;td style="text-align:left"&gt;Change the MAC address on KALI Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;ifconfig eth0 192.168.2.1/24&lt;/td&gt;
&lt;td style="text-align:left"&gt;Set the IP address in Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;ifconfig eth0:192.168.2.3/24&lt;/td&gt;
&lt;td style="text-align:left"&gt;Add an IP address to an existing network interface in Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;ifconfig eth0 hw ether MAC ADDR&lt;/td&gt;
&lt;td style="text-align:left"&gt;Change the address in Linux using ifconfig&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;ifconfig eth0 mtu 1500&lt;/td&gt;
&lt;td style="text-align:left"&gt;Change the MTU size with ifconfig; change 1500 to the MTU you want&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;dig -x 192.168.1.1&lt;/td&gt;
&lt;td style="text-align:left"&gt;Perform a reverse lookup on an IP address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;host 192.168.1.1&lt;/td&gt;
&lt;td style="text-align:left"&gt;Perform a reverse lookup on an IP address; useful when dig is not installed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;dig @192.168.2.2 domain.com -t AXFR&lt;/td&gt;
&lt;td style="text-align:left"&gt;Perform a DNS zone transfer with dig&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;host -l domain.com nameserver&lt;/td&gt;
&lt;td style="text-align:left"&gt;Perform a DNS zone transfer with host&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;nbtstat -A x.x.x.x&lt;/td&gt;
&lt;td style="text-align:left"&gt;Obtain the domain name corresponding to an IP address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;ip addr add 192.168.2.22/24 dev eth0&lt;/td&gt;
&lt;td style="text-align:left"&gt;Add a hidden IP address that does not show up when running ifconfig&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;tcpkill -9 host goole.com&lt;/td&gt;
&lt;td style="text-align:left"&gt;Block access to goole.com from the host&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;echo &amp;quot;1&amp;quot;&amp;gt;/proc/sys/net/ipv4/ip_forward&lt;/td&gt;
&lt;td style="text-align:left"&gt;Enable IP forwarding, turning the Linux box into a router — which makes it convenient to control the traffic routed through this box&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left"&gt;echo &amp;quot;8.8.8.8&amp;quot;&amp;gt;/etc/resolv.conf&lt;/td&gt;
&lt;td style="text-align:left"&gt;Use Goole's DNS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="system-information-commands"&gt;System information commands&lt;/h2&gt;
&lt;p&gt;Very helpful for local enumeration&lt;/p&gt;</description></item><item><title>MySQL Data File Paths on Linux</title><link>https://simplestory.github.io/en/posts/20171201_7eec743fae4833726b0d923cf6db1da6/</link><pubDate>Fri, 01 Dec 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20171201_7eec743fae4833726b0d923cf6db1da6/</guid><description>&lt;p&gt;&lt;strong&gt;Server version: 5.7.20-0ubuntu0.16.04.1 (Ubuntu)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After logging into MySQL, you can use the following command to query where the related files are stored:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;show&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variables&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;like&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;%dir%&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output is shown below:&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://simplestory-blog-img.oss-cn-guangzhou.aliyuncs.com/in_posts/20171201/mysql.png" title="mysql"&gt;&lt;/p&gt;
&lt;p&gt;Usually these are:&lt;/p&gt;
&lt;p&gt;The default location of the database files is: &lt;code&gt;/usr/share/mysql/&lt;/code&gt;
Configuration file: &lt;code&gt;/etc/mysql/my.cnf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Database directory: &lt;code&gt;/var/lib/mysql&lt;/code&gt;
Configuration directory: &lt;code&gt;/etc/share/mysql&lt;/code&gt; (mysql.server command and configuration files)
MySQL related commands: &lt;code&gt;/usr/bin&lt;/code&gt;
Startup scripts: &lt;code&gt;/etc/init.d/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One way to start mysql safely: /usr/bin/mysqld_safe-user=root&amp;amp;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Some Linux Commands</title><link>https://simplestory.github.io/en/posts/20171107_619e2d5ba49593e40e16667bafdcf2c1/</link><pubDate>Tue, 07 Nov 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20171107_619e2d5ba49593e40e16667bafdcf2c1/</guid><description>Some little-known Linux commands</description></item><item><title>Detecting Traffic Violations with Opencv</title><link>https://simplestory.github.io/en/posts/20171104_bb6e9cb8623b3bf044c62bbbca472d53/</link><pubDate>Sun, 05 Nov 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20171104_bb6e9cb8623b3bf044c62bbbca472d53/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Opencv contains more than 2500 functions, and almost any mature algorithm you can think of can be implemented by calling Opencv&amp;rsquo;s functions, which is super convenient. This post combines Python and Opencv to detect cars in surveillance video and check whether they commit a violation (crossing the double yellow line).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;System environment: Ubuntu16.04LTS+OpenCV3.3.0+Python2.7.12&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="background-extraction"&gt;Background extraction&lt;/h2&gt;
&lt;p&gt;For surveillance the position is relatively fixed, so the background will not change considerably over a long period of time. We can therefore consider using background subtraction to roughly extract the background.&lt;/p&gt;</description></item><item><title>Installing OpenCV on Linux</title><link>https://simplestory.github.io/en/posts/20171020_df3860e05b3ca04bdc2f774c5c1914fd/</link><pubDate>Fri, 20 Oct 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20171020_df3860e05b3ca04bdc2f774c5c1914fd/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Recently, because a project needed computer vision recognition, I started tinkering with OpenCV. Although the installation process was long and winding, the experience of using it together with Python is actually quite good. Here I record the OpenCV installation and compilation process.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;System environment: Ubuntu16.04&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Software installed: OpenCV3.3.0+Python2.7.12&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="updating-the-system-packages"&gt;Updating the system packages:&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo apt upgrade
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="installing-some-developer-tools"&gt;Installing some developer tools:&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo apt-get install build-essential cmake pkg-config
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The pkg-config package is very likely already installed by default, but just in case, add it in as well. The cmake program is used later to compile OpenCV.&lt;/p&gt;</description></item><item><title>Compiling C/C++ under Vscode</title><link>https://simplestory.github.io/en/posts/20171001_f9fd02f8e181115a55cec2936857675c/</link><pubDate>Sun, 01 Oct 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20171001_f9fd02f8e181115a55cec2936857675c/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Visual Studio Code is a lightweight editor released by Microsoft; by installing various plugins it can be turned into a powerful multi-language, cross-platform compiler. Recently, because of practical needs, I had to debug some C/C++ code, so I started tinkering with Vscode. Below is a record of the problems that troubled me during the process.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;The system used in this post is ubuntu16.04LTS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I will not go into the details of installing Vscode on linux, as Baidu has plenty of resources on that.&lt;/p&gt;</description></item><item><title>Python Classes</title><link>https://simplestory.github.io/en/posts/20170820_7cb802827b60ef8c770d824ec28a65a0/</link><pubDate>Sun, 20 Aug 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20170820_7cb802827b60ef8c770d824ec28a65a0/</guid><description>Life is short, I use Python</description></item><item><title>Python, Object Oriented</title><link>https://simplestory.github.io/en/posts/20170810_3193456a2ce85ef1e01f5a219b37cebd/</link><pubDate>Thu, 10 Aug 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20170810_3193456a2ce85ef1e01f5a219b37cebd/</guid><description>Life is short, I use Python</description></item><item><title>A Basic Git Tutorial</title><link>https://simplestory.github.io/en/posts/20170704_497c40137cedefb55b1afe3bd1e6b13f/</link><pubDate>Tue, 04 Jul 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20170704_497c40137cedefb55b1afe3bd1e6b13f/</guid><description>Some basic Git operations</description></item></channel></rss>