Git Product home page Git Product logo

class-incremental-template's Introduction

Class-Incremental

Introduction

This template aims to create a baseline for handling the image classification using Class-Incremental Method. It also depends on the requirements and datasets to whether use or not use FastSAM or CLIP models to further improve the performance.

Dataset

Now suppose that we have 2 sets in raw: train and val (public_test) corresponding to 2 folders in data/raw. There are 10 phases and each phases we will have 10 different classes so in total we have 100 classes.

Before going to the project experiment, we need to make sure that the data structure follow the below format!

Structure

```
.
├── data

│   ├── raw
│   │   ├── Train
│   │   │   ├── phase 1
│   │   │   │   ├── class_0
│   │   │   │   │   ├── 000.jpg
│   │   │   │   │   ├── ...
│   │   │   │   ├── class_1
│   │   │   │   ├── ...
│   │   │   │   ├── class_10
│   │   │   ├── phase 2
│   │   │   ├── ...
│   │   │   ├── phase 10
│   │   ├── Val
│   │   │   ├── 00.jpg
│   │   │   ├── ...

│   ├── processed
│   │   ├── Train
│   │   ├── Val
```

Set-up

git clone https://github.com/manhph2211/Class-Incremental.git
cd Class-Incremental
conda create -n ci python=3.11
conda activate ci
pip install -r requirements.txt
wget https://huggingface.co/spaces/An-619/FastSAM/resolve/main/weights/FastSAM.pt -O src/models/segmentator/weights/FastSAM.pt

Usage

python src/dataloader/dataset.py # you might wanna see some samples

python src/tools/segment.py --output " " --image_folder " " --text_prompt "eg. a bird" # Optional
 
python src/tools/train.py # Training and validation

python src/tools/classify.py # Testing an image folder and submission

Reference

@misc{zhao2023fast,
      title={Fast Segment Anything},
      author={Xu Zhao and Wenchao Ding and Yongqi An and Yinglong Du and Tao Yu and Min Li and Ming Tang and Jinqiao Wang},
      year={2023},
      eprint={2306.12156},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

class-incremental-template's People

Contributors

manhph2211 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ronelgeminiano

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.