Giter Site home page Giter Site logo

paddlepaddle / passl Goto Github PK

View Code? Open in Web Editor NEW
262.0 12.0 63.0 2.88 MB

PASSL包含 SimCLR,MoCo v1/v2,BYOL,CLIP,PixPro,simsiam, SwAV, BEiT,MAE 等图像自监督算法以及 Vision Transformer,DEiT,Swin Transformer,CvT,T2T-ViT,MLP-Mixer,XCiT,ConvNeXt,PVTv2 等基础视觉算法

License: Apache License 2.0

Python 90.25% Shell 9.60% Jupyter Notebook 0.15%
deep-learning moco moco-v2 simclr clip self-supervised-learning paddle swin-transformer vision-transformer beit

passl's Introduction

⚙️ English | 简体中文

Introduction

PASSL is a Paddle based vision library for state-of-the-art Self-Supervised Learning research with PaddlePaddle. PASSL aims to accelerate research cycle in self-supervised learning: from designing a new self-supervised task to evaluating the learned representations.

Key features of PASSL:

  • Reproducible implementation of SOTA in Self-Supervision

    Existing SOTA in Self-Supervision are implemented - SimCLR, MoCo(v1), MoCo(v2), MoCo-BYOL, BYOL, BEiT. Supervised classification training is also supported.

  • Modular Design

    Easy to build new tasks and reuse the existing components from other tasks (Trainer, models and heads, data transforms, etc.)

🛠️ The ultimate goal of PASSL is to use self-supervised learning to provide more appropriate pre-training weights for downstream tasks while significantly reducing the cost of data annotation.

📣 Recent Update:

  • (2022-2-9): Refactoring README
  • 🔥 Now:

Implemented Models

  • Self-Supervised Learning Models

PASSL implements a series of self-supervised learning algorithms, See Document for details on its use

Epochs Official results PASSL results Backbone Model Document
MoCo 200 60.6 60.64 ResNet-50 download Train MoCo
SimCLR 100 64.5 65.3 ResNet-50 download Train SimCLR
MoCo v2 200 67.7 67.72 ResNet-50 download Train MoCo
MoCo-BYOL 300 71.56 72.10 ResNet-50 download Train MoCo-BYOL
BYOL 300 72.50 71.62 ResNet-50 download Train BYOL
PixPro 100 55.1(fp16) 57.2(fp32) ResNet-50 download Train PixPro
SimSiam 100 68.3 68.4 ResNet-50 download Train SimSiam
DenseCL 200 63.62 63.37 ResNet-50 download Train DenseCL
SwAV 100 72.1 72.4 ResNet-50 download Train SwAV

Benchmark Linear Image Classification on ImageNet-1K.

Comming Soon:More algorithm implementations are already in our plans ...

  • Classification Models

PASSL implements influential image classification algorithms such as Visual Transformer, and provides corresponding pre-training weights. Designed to support the construction and research of self-supervised, multimodal, large-model algorithms. See Classification_Models_Guide.md for more usage details

Detail Tutorial
ViT / PaddleEdu
Swin Transformer / PaddleEdu
CaiT config PaddleFleet
T2T-ViT config PaddleFleet
CvT config PaddleFleet
BEiT config unofficial
MLP-Mixer config PaddleFleet
ConvNeXt config PaddleFleet

🔥 PASSL provides a detailed dissection of the algorithm, see Tutorial for details.

Installation

See INSTALL.md.

Getting Started

Please see GETTING_STARTED.md for the basic usage of PASSL.

Awesome SSL

Self-Supervised Learning (SSL) is a rapidly growing field, and some influential papers are listed here for research use.PASSL seeks to implement self-supervised algorithms with application potential

Contributing

PASSL is still young. It may contain bugs and issues. Please report them in our bug track system. Contributions are welcome. Besides, if you have any ideas about PASSL, please let us know.

Citation

If PASSL is helpful to your research, feel free to cite

@misc{=passl,
    title={PASSL: A visual Self-Supervised Learning Library},
    author={PASSL Contributors},
    howpublished = {\url{https://github.com/PaddlePaddle/PASSL}},
    year={2022}
}

License

As shown in the LICENSE.txt file, PASSL uses the Apache 2.0 copyright agreement.

passl's People

Contributors

brilliantyukaimin avatar firestonelib avatar flytocc avatar fuqianya avatar fuyinno4 avatar gt-zhangacer avatar guoxiawang avatar juneweng avatar lielinjiang avatar liujie0926 avatar lmk123568 avatar lzzyzlbb avatar nemonameless avatar qizhaoaoe avatar shiyutang avatar wangfeng18 avatar wuhuachaocoding avatar xiaoguanghu01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

passl's Issues

建议

1.passl很多文字都是英文的,包括快速使用等文档,希望可以提供中文文档.
2.希望知道图像分类自监督学习的技术研究目前到达什么程度了.比如猫狗这种二分类准确率如何,imagenet准确率如何,使用passl进行图像分类,需要给类别总数量吗?
3.能加个QQ或者微信聊几句吗?有些疑问,拜托了,大佬.
QQ:1226194560
微信:18820785964

PASSL训练大模型

我看框架里面的自监督 一般是r50这些,而ViT和Swin这种是分类模型,不知道我有没有理解错。我如何使用PASSL自监督训练大模型,然后转换成PaddleClas模型,然后应用到目标检测或者分割等下游任务中?

BYOL的预训练中好像使用了gt_label?

  • 在byol的config 中设置了 num_classes=1000:
    num_classes: 1000
  • 在model中设置了self.classifier = nn.Linear(embedding_dim, num_classes),并且forward中将classif_out和label一起传给了head

image

outputs = self.head(a1, b1, a2, b2, classif_out, label)

  • 在L2 Head中将对比loss和有监督的CE loss加在了一起返回

image

outputs["loss"] = outputs['rep_loss'] + outputs["class_loss"]

预训练模型key对齐paddle系列backbone

目前自监督系列的预训练模型,如r50,应用到分类、目标检测任务上时,需要把模型key手动对齐paddleclas 的r50才能使用。希望可以有一个通用化的转化脚本,不然更换backbone后还需定制化对齐key,使用起来比较麻烦。
期待尽快可以release通用转化脚本!感谢!

ModuleNotFoundError: No module named 'passl.engine.engine'

Traceback (most recent call last):
File "tools/train.py", line 23, in
from passl.engine.engine import Engine
ModuleNotFoundError: No module named 'passl.engine.engine'
INFO 2024-03-27 16:41:09,324 launch_utils.py:343] terminate all the procs

如图所示,想知道怎么回事呢

dinov2 pretrain

Can you provide the 'pretrained/dinov2/dinov2_vitl14_pretrain'?

训练完没有权重

您好,为何我完整训练完权重被全部删除了,我看程序里不是保存最后5轮吗?

我很关注图像分类的自监督进展

小弟想问问,对于图像分类的自监督,目前是什么进展呢?比如猫狗分类这种典型的二分类准确率如何?imagenet1k分类准确率如何?PASSL里面的关于图像分类的自监督算法或者模型,有哪些?能给个例子,让我知道如何使用吗?目前看到PASSLissues才1条,文档完全没看到.方便加个微信或者QQ聊几句吗?小弟对于图像分类的自监督高度重视.还有一个疑问,关于图像分类的自监督模型,是不是我给一堆图片,模型运行后,就会把图片归类呢?我需不需要给出类别的数量呢?说白了,我想知道图像分类的自监督的一个使用流程.现在都1.0了,该有点用处了吧.如果一个模型运行后,图像就分好类了,归纳为N类,我有什么办法判断分类的正确性呢?这方面有算法吗?
提了很多问题,跪求每个问题都回答一下,谢谢大佬.

如何训练自有数据集?

数据准备的脚本不是特别看得懂,我如何准备自己的数据集?训练集理论上是不用标签的是吧?

BEiT配置yaml配置文件有问题

在配置文件PASSL/configs/beit/beit_base_p16_224.yaml中,head的名字,BeitClsHead应该为:BEiTClsHead 。
另外格式也有问题,会报错,需要小修改。大约是第17句的缩进不对。

MLP-Mixer: An all-MLP Architecture for Vision

readme文件里的两个模型的TOP1 是不是写反了?模型大的准确度比模型小的准确度小一些?

Arch Weight Top-1 Acc Top-5 Acc Crop ratio # Params
mlp_mixer_b16_224 pretrain 1k 76.60 92.23 0.875 60.0M
mlp_mixer_l16_224 pretrain 1k 72.06 87.67 0.875 208.2M

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.