Skip to content

Scene recognition tool based on pytorch. Provide training, test and deployment functions, as well as many pretrained models.

License

Notifications You must be signed in to change notification settings

dixing0908/TorchScene

 
 

Repository files navigation

TorchScene

A scene recognition tool based on pytorch

Installation

conda env create -f environment.yml python=3.9

conda activate torch-scene

export PYTHONPATH=$PYTHONPATH:$(pwd)

Model Zoo (Pretrained Models)

Please refer [Model Zoo]

Step by step

Please download the data from [Place2 Data]

1. Download the data

These images are 256x256 images, in a more friendly directory structure that in train and val split the images are organized such as train/reception/00003724.jpg and val/raft/000050000.jpg

sh download_data_pytorch.sh

2. Train the model

For train configs, please refer to conf/train.yaml

python tools/train.py batch_size=128

3. carry out the inferring

Donwload pretrained weights from [Google Drive], or use the weights you trained in local. For infer configs, please refer to conf/infer.yaml

python tools/infer.py img_path=root/TorchScene/imgs/12.jpg weight_path=root/TorchScene/checkpoints/vision_transformer1654506720.0398195.ckpt

4. Convert a model to TorchScript

python scripts/convert_torchscript.py

Acknowledge

The dataset and basic code comes from [MIT Place365]

Thanks for the great work!

About

Scene recognition tool based on pytorch. Provide training, test and deployment functions, as well as many pretrained models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.2%
  • Shell 0.8%