/pytorch-material-classification

Material Classification with Convolutional Networks in PyTorch

Primary LanguagePythonApache License 2.0Apache-2.0

Pytorch Material Classification

This repo provides examples for material classification in GTOS, GTOS-MOBILE, DTD and MINC dataset using PyTorch.

Setup

Prerequisites

  • Ubuntu
  • Pytorch
    • pip3 install torch torchvision
  • Easydict
    • pip3 install easydict
  • tqdm
    • pip3 install tqdm
  • Pytorch-Encoding
    • pip3 install torch-encoding
    • Note: You need to install Pytorch 1.0 for torch-encoding, or you can modify the encoding layer based on this for latest Pytorch.

Getting Started

  • Clone this repo:
git clone https://github.com/jiaxue1993/pytorch-material-classification.git
cd pytorch-material-classification/
  • Download GTOS, GTOS_MOBILE, DTD, MINC to the dataset folder

  • Navigate to different experiment folder and train network. For example, you can finetune ResNet on GTOS-MOBILE dataset with followint command

cd experiments/gtos_mobile.finetune.resnet/
python train.py

Accuracy & Statistics

Base Model Dataset Method Accuracy Pretrained Model
MobileNet GTOS Finetune 80.4 One Drive
DAIN 82.5
DEP 83.3
TEAN 84.7
ResNet-50 DTD DEP 73.2
MINC DEP 82.0

Citation

Please consider citing following projects in your publications if it helps your research.

Differential Angular Imaging for Material Recognition [pdf]

@inproceedings{xue2017differential,
  title={Differential angular imaging for material recognition},
  author={Xue, Jia and Zhang, Hang and Dana, Kristin and Nishino, Ko},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={764--773},
  year={2017}
}

Deep Texture Manifold for Ground Terrain Recognition [pdf]

@inproceedings{xue2018deep,
  title={Deep texture manifold for ground terrain recognition},
  author={Xue, Jia and Zhang, Hang and Dana, Kristin},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={558--567},
  year={2018}
}

Deep TEN: Texture Encoding Network [pdf]

@inproceedings{zhang2017deep,
  title={Deep ten: Texture encoding network},
  author={Zhang, Hang and Xue, Jia and Dana, Kristin},
  booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
  pages={708--717},
  year={2017}
}

Differential Viewpoints for Ground Terrain Material Recognition [pdf][arxiv]

@article{xue2020differential,
  title={Differential Viewpoints for Ground Terrain Material Recognition},
  author={Xue, Jia and Zhang, Hang and Nishino, Ko and Dana, Kristin},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year={2020},
  publisher={IEEE}
}

Acknowledgement

Part of the code comes from PyTorch-Encoding, TorchSeg, pytorch-mobilenet-v2