Skip to content
No description, website, or topics provided.
Python Shell
Branch: master
Clone or download
Latest commit b47a8a8 Jul 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea multer_deeptexture_v1 Jun 24, 2019
.gitignore Initial commit Jun 23, 2019
LICENSE Initial commit Jun 23, 2019
README.md Update README.md Jul 21, 2019
deepTEN.py multer_deeptexture_v1 Jun 24, 2019
files.py
functions.py
lr_scheduler.py multer_deeptexture_v1 Jun 24, 2019
main.py
modules.py multer_deeptexture_v1 Jun 24, 2019
option.py multer_deeptexture_v1 Jun 24, 2019
resnet.py
runtest.sh multer_deeptexture_v1 Jun 24, 2019
runtrain.sh multer_deeptexture_v1 Jun 24, 2019
utils.py multer_deeptexture_v1 Jun 24, 2019

README.md

multer_dnn_textureclassification

Code for "Multi-level Texture Encoding and Representation (MuLTER) based on Deep Neural Networks" (ICIP2019); Partial code are borrowed from Hang Zhang's work deep texture encoding network (DEEP TEN).

Citation

Y. Hu, Z. Long, and G. AlRegib, “Multi-level Texture Encoding and Representation (MuLTER) based on Deep Neural Networks,” IEEE International Conference on Image Processing, Taipei, Taiwan, September 2019.

or 

@inproceedings{hu2019_multertexture,
author={Hu, Yuting and Long, Zhiling and AlRegib, Ghassan},
booktitle={IEEE International Conference on Image Processing (ICIP)},
title={Multi-level Texture Encoding and Representation (MuLTER) based on Deep Neural Networks,
month={September},
year={2019}
}

Prerequisites

Ubuntu 18.04
Python 3.6.6
Pytorchnightly 1.0.0.dev20190114

Github repo

git clone https://github.com/yutinghu/deepten_multiscale.git

Folder structure

The folder structure is listed as follows:

multer_dnn_textureclassification
    |----lib
        |----cpu
        |----gpu
        |----__pycache__
        |----__init__
    |----data
        |----minc-2500
            |----images
            |----labels
            |----categories.txt
    |----model
        |----resnet50-25c4b509.pth
    |----logs
        |----e.g. 20190623_185030
    |----main.py
    |----deepTEN.py

Installations

We include a "lib" folder for pytorch encoding. You can also install pytorch encoding referring to this link.

Data and model preparation

Download the MINC-2500 dataset, which is a popular dataset for texture and material recognition. Please unzip this file in the directory of data/. Download ResNet-50 and unzip it in the "models" folder.

How to train your own model on minc-2500 dataset

Train:

$ CUDA_VISIBLE_DEVICES=0 python main.py --dataset minc --model deepten --batch-size 32 --lr 0.01 --epochs 30 --lr-step 10 --lr-scheduler step --weight-decay 5e-4

How to test your own model on minc-2500 dataset

You can save a trained model (.pth file) to the "models" folder by adding this line (torch.save(model.state_dict(), PATH)) in the main.py. Then, test:

python main.py --dataset minc --model name_of_pretrainedmodel --nclass 23  --pretrained --eval
You can’t perform that action at this time.