A scene recognition tool based on pytorch
conda env create -f environment.yml python=3.9
conda activate torch-scene
export PYTHONPATH=$PYTHONPATH:$(pwd)
Please refer [Model Zoo]
Please download the data from [Place2 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
For train configs, please refer to conf/train.yaml
python tools/train.py batch_size=128
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
python scripts/convert_torchscript.py
The dataset and basic code comes from [MIT Place365]
Thanks for the great work!