Natural Scene Recognition Using Deep Learning

栏目: IT技术 · 发布时间: 4年前

内容简介:Recognizing the environment in one glance is one of the human brain’s most accomplished deed. While the tremendous recent progress in object recognition tasks originates from the availability of large datasets such as COCO and the rise of Convolution Neura

Natural Scene Recognition Using Deep Learning

In Computer vision Scene Recognition is one of the top challenging research fields.

Recognizing the environment in one glance is one of the human brain’s most accomplished deed. While the tremendous recent progress in object recognition tasks originates from the availability of large datasets such as COCO and the rise of Convolution Neural Networks ( CNNs) to learn high-level features, scene recognition performance has not achieved the same level of success.

In this blog post, we will see how classification models perform on classifying images of a scene. For this task, we have taken the Places365-Standard dataset to train the model. This dataset has 1,803,460 training images and 365 classes with the image number per class varying from 3,068 to 5,000 and size of images is 256*256.

Images from the dataset

Installing and Downloading the data

Let’s start by setting up Monk and its dependencies:

!git clone https://github.com/Tessellate-Imaging/monk_v1.git
! cd monk_v1/installation/Linux && pip install -r requirements_cu9.txt

After installing the dependencies, I downloaded the Places365-Standard dataset which is available to download from here .

Create an Experiment

I have created an experiment, and for this task, I used mxnet gluon back-end.

import os
import sys
sys.path.append("monk_v1/monk/");
from gluon_prototype import prototype
gtf = prototype(verbose=1);
gtf.Prototype("Places_365", "Experiment");

Model Selection and Training

I experimented with various models like resnet, densenet, inception, vgg16, and many more but only vgg16 gives the greater validation accuracy than any other model.

gtf.Default(dataset_path="train/",
            path_to_csv="labels.csv",
            model_name="vgg16",
            freeze_base_network=False,
            num_epochs=20);gtf.Train();

After training for 20 epoch I got the training accuracy of 65% and validation accuracy of 53%.

Prediction

gtf = prototype(verbose=1);
gtf.Prototype("Places_365", "Experiment", eval_infer=True);
img_name = "test_256/Places365_test_00208427.jpg"
predictions = gtf.Infer(img_name=img_name);
from IPython.display import Image
Image(filename=img_name)
Prediction on test images
img_name = "test_256/Places365_test_00151496.jpg" 
predictions = gtf.Infer(img_name=img_name);
from IPython.display import Image
Image(filename=img_name)
Prediction on test images

After this, I tried to find out why the accuracy has not improved more than what I got. Some of the possible reasons are:

Incorrect Labels:-While inspecting the training folder, there are images that have incorrect labels like baseball_field has the wrong image. There are many more incorrect labels.

Wrong Image in baseball_field
img=mpimg.imread(“images/train/baseball_field2469.jpg”)
imgplot = plt.imshow(img)

Unclear Scenes:-Due to various similar classes that share similar objects like dining_room and dining_hall, forest_road and field_road, there are unclear images that are very hard to classify.

Label: field_road
Label: forest_road

As we can see it is very hard to classify these 2 images.

Multiple Scene Parts:-Images consist of multiple scenes parts can not be classified into one category like buildings near the ocean. These scenes can be hard to classify and require more ground truth labels for describing the environment.

To summarize, this blog post has shown how we can use deep learning networks to perform a natural scene classification and why scene recognition performance has not achieved the same level of success as that of object recognition.

References

http://places2.csail.mit.edu/PAMI_places.pdf


以上所述就是小编给大家介绍的《Natural Scene Recognition Using Deep Learning》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

XSS跨站脚本攻击剖析与防御

XSS跨站脚本攻击剖析与防御

邱永华 / 人民邮电出版社 / 2013-9-1 / 49.00元

《XSS跨站脚本攻击剖析与防御》是一本专门剖析XSS安全的专业书,总共8章,主要包括的内容如下。第1章 XSS初探,主要阐述了XSS的基础知识,包括XSS的攻击原理和危害。第2章 XSS利用方式,就当前比较流行的XSS利用方式做了深入的剖析,这些攻击往往基于客户端,从挂马、窃取Cookies、会话劫持到钓鱼欺骗,各种攻击都不容忽视。第3章 XSS测试和利用工具,介绍了一些常见的XSS测试工具。第4......一起来看看 《XSS跨站脚本攻击剖析与防御》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具