All Projects → chenyuntc → Scene Baseline

chenyuntc / Scene Baseline

PyTorch baseline for AI challenger Scene classification

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Scene Baseline

Tensorflow Kubernetes Art Classification
Train a TensorFlow model on Kubernetes to recognize art culture based on the collection from the Metropolitan Museum of Art
Stars: ✭ 55 (-38.2%)
Mutual labels:  image-classification
Pytorch Book
PyTorch tutorials and fun projects including neural talk, neural style, poem writing, anime generation (《深度学习框架PyTorch:入门与实战》)
Stars: ✭ 9,546 (+10625.84%)
Mutual labels:  image-classification
Bsconv
Reference implementation for Blueprint Separable Convolutions (CVPR 2020)
Stars: ✭ 84 (-5.62%)
Mutual labels:  image-classification
Meme Generator
MemeGen is a web application where the user gives an image as input and our tool generates a meme at one click for the user.
Stars: ✭ 57 (-35.96%)
Mutual labels:  image-classification
Deep Ranking
Learning Fine-grained Image Similarity with Deep Ranking is a novel application of neural networks, where the authors use a new multi scale architecture combined with a triplet loss to create a neural network that is able to perform image search. This repository is a simplified implementation of the same
Stars: ✭ 64 (-28.09%)
Mutual labels:  image-classification
Object Recognition Tensorflow
Object Recognition using TensorFlow and Java
Stars: ✭ 77 (-13.48%)
Mutual labels:  image-classification
Divide And Co Training
[Paper 2020] Towards Better Accuracy-efficiency Trade-offs: Divide and Co-training. Plus, an image classification toolbox includes ResNet, Wide-ResNet, ResNeXt, ResNeSt, ResNeXSt, SENet, Shake-Shake, DenseNet, PyramidNet, and EfficientNet.
Stars: ✭ 54 (-39.33%)
Mutual labels:  image-classification
Malware Classification
Towards Building an Intelligent Anti-Malware System: A Deep Learning Approach using Support Vector Machine for Malware Classification
Stars: ✭ 88 (-1.12%)
Mutual labels:  image-classification
Imbalanced Dataset Sampler
A (PyTorch) imbalanced dataset sampler for oversampling low frequent classes and undersampling high frequent ones.
Stars: ✭ 1,155 (+1197.75%)
Mutual labels:  image-classification
Imageclassification
Deep Learning: Image classification, feature visualization and transfer learning with Keras
Stars: ✭ 83 (-6.74%)
Mutual labels:  image-classification
Rostensorflow
TensorFlow ImageNet demo using ROS sensor_msgs/Image
Stars: ✭ 59 (-33.71%)
Mutual labels:  image-classification
Global Self Attention Network
A Pytorch implementation of Global Self-Attention Network, a fully-attention backbone for vision tasks
Stars: ✭ 64 (-28.09%)
Mutual labels:  image-classification
Attention Gated Networks
Use of Attention Gates in a Convolutional Neural Network / Medical Image Classification and Segmentation
Stars: ✭ 1,237 (+1289.89%)
Mutual labels:  image-classification
Imagenet
Trial on kaggle imagenet object localization by yolo v3 in google cloud
Stars: ✭ 56 (-37.08%)
Mutual labels:  image-classification
Deep Learning Training Gui
Train and predict your model on pre-trained deep learning models through the GUI (web app). No more many parameters, no more data preprocessing.
Stars: ✭ 85 (-4.49%)
Mutual labels:  image-classification
Mish
Official Repsoitory for "Mish: A Self Regularized Non-Monotonic Neural Activation Function" [BMVC 2020]
Stars: ✭ 1,072 (+1104.49%)
Mutual labels:  image-classification
Marta Gan
MARTA GANs: Unsupervised Representation Learning for Remote Sensing Image Classification
Stars: ✭ 75 (-15.73%)
Mutual labels:  image-classification
Wb color augmenter
WB color augmenter improves the accuracy of image classification and image semantic segmentation methods by emulating different WB effects (ICCV 2019) [Python & Matlab].
Stars: ✭ 89 (+0%)
Mutual labels:  image-classification
Tf Mobilenet V2
Mobilenet V2(Inverted Residual) Implementation & Trained Weights Using Tensorflow
Stars: ✭ 85 (-4.49%)
Mutual labels:  image-classification
Deepdenoising
Stars: ✭ 81 (-8.99%)
Mutual labels:  image-classification

PyTorch Baseline for AI challenger scene

AI Challenger 场景分类竞赛的示例代码

使用

1.环境配置

安装:

  • PyTorch,根据官网说明下载指定的版本即可。
  • 第三方依赖: pip install -r requirements.txt

2.数据预处理:

这一步主要是根据json文件进行简单的处理,生成二进制scene.pth,可以跳过这一步,直接下载随程序附带的scene.pth

如果你想自己生成scene.pth,修改scripts/data_process.py 中的文件路径,然后运行

python scripts/data_process.py

3.启动visdom

可视化工具visdom

nohup python2 -m visdom.server&

4.训练

训练之前还需要新建checkpoints文件夹用来保存模型mkdir checkpoints。 注意修改utils.py 中文件路径

python main.py train --model='resnet34'

在 Titan Xp下,大概90分钟可以在验证集上得到大约0.938的准确率

python main.py train --model='resnet365'

使用place365的预训练模型resnet50, 可以在验证集达到0.957的top3分数,

打开浏览器 输入http://ip:8097 可以看到训练过程。visdom 中要用到两个js文件plotly.min.jsreact-grid-layout.min.js,这两个js文件被防火墙所拦截~ 所以你可能需要自备梯子才能用visdom。

另外一个解决方法是: locate locate visdom/static/index.html,修改index.html中两行js的地址

5.提交

python main.py submit --model='resnet34' --load-path='res34_1018_2204_0.938002232143' 

会在当前目录生成result.json文件,直接提交即可

关于CPU运行

把所有.cuda()代码去掉,就能使得程序在CPU上运行

各个文件说明

欢迎参考之前在知乎专栏写过的一篇关于PyTorch的文件组织安排的文章了解每个文件的作用

models/: 存放各个模型定义,所有的模型继承自basic_module.py中的BasicModule.

models/resnet.py: 对torchvision中的resnet18, resnet34, resnet50, resnet101 和resnet152 进行了简单的封装。

dataset.py: 数据加载相关

main.py: 主程序,包含训练和测试

utils.py: 可视化工具visdom的封装,计算top3准确率函数,可配置变量(可通过命令行参数修改,也可以通过修改文件配置)等。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].