Giter Club home page Giter Club logo

vicss's Introduction

Python PyTorch Lightning

Vocabulary-free Image Classification and Semantic Segmentation

Alessandro Conti, Enrico Fini, Massimiliano Mancini, Paolo Rota, Yiming Wang, Elisa Ricci

Setup

Install dependencies

# clone project
git clone https://github.com/altndrr/vicss
cd vicss

# install requirements
# it will create a .venv folder in the project root
# and install all the dependencies using flit
make install

# activate virtual environment
source .venv/bin/activate

Setup environment variables

# copy .env.example to .env
cp .env.example .env

# edit .env file
vim .env

Usage

The two entry points are train.py and eval.py. Calling them without any argument will use the default configuration.

# train model
python src/train.py

# test model
python src/eval.py

Configuration

The full list of parameters can be found under configs, but the most important ones are:

  • data: dataset to use, default to caltech101.
  • experiment: experiment to run, default to baseline/clip.
  • logger: logger to use, default to null.

Parameters can be overwritten by passing them as command line arguments. You can additionally override any parameter from the config file by using the ++ prefix.

# train model on ucf101 dataset
python src/train.py data=ucf101 experiment=baseline/clip

# train model on ucf101 dataset with RN50 backbone
python src/train.py data=ucf101 experiment=baseline/clip model=clip ++model.model_name=RN50

Note that since all our approaches are training-free, there is virtually no difference between train.py and eval.py. However, we still keep them separate for clarity.

Development

Install pre-commit hooks

# install pre-commit hooks
pre-commit install

Run tests

# run fast tests
make test

# run all tests
make test-full

Format code

# run linters
make format

Clean repository

# remove autogenerated files
make clean

# remove logs
make clean-logs

Acknowledgements

We gratefully acknowledge taap studio for designing the logo of this project and ashleve/lightning-hydra-template for the template used to build this repository.

vicss's People

Contributors

altndrr avatar

Stargazers

Jeff Carpenter avatar An-zhi WANG avatar BinRen avatar Nicola Dall'Asen avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

cv-seg

vicss's Issues

Excuse me

Hello, I would like to ask why an error occurs when I change the "experiment" to "method/dense_cased" in the train.yaml file. Is there anything else that needs to be modified? Thank you.

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.