Giter Site home page Giter Site logo

phoenix1327 / scene-recognition-pytorch1.x-tf2.x Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 8.0 93 KB

Scene recognition models based on pytorch1.x and TF2.x. Provide training, test and conversion scripts as well as many pretrained models. Hands-on tutorial about deploying a model.

License: MIT License

Shell 1.21% Python 98.79%

scene-recognition-pytorch1.x-tf2.x's Introduction

Scene-Recognition-Service-PyTorch-TF2.0

Scene recognition models based on pytorch and TF2.0. Upgraded from https://github.com/CSAILVision/places365

Install

conda env create -f environment.yml python=3.7

conda activate scene_pytorch_tf

export PYTHONPATH=$PYTHONPATH:$(pwd)

Model Zoo (Pretrained Models)

Please refer [Model Zoo]

Train

We download the data from http://places2.csail.mit.edu/download.html

PyTorch == 1.x

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 with multiple GPUs

python tools/train.py

3. Remove the .module

python scripts/remove_pytorch_module.py

4. Test a model

Donwload pretrained weights from https://drive.google.com/drive/folders/1NbV3NZlgbqnLSd9zwZoz8kFpNQjUYolT?usp=sharing

python tools/test.py

5. Convert a model to TorchScript

python scripts/convert_torchscript.py

Tensorflow == 2.x

1. Download the data. (Refer: https://github.com/tensorflow/datasets)

python -m tensorflow_datasets.scripts.download_and_prepare --datasets=places365_small
  • 2. Train the model with multiple GPUs

  • 3. Test models

scene-recognition-pytorch1.x-tf2.x's People

Contributors

huaizhengzhang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.