Giter Site home page Giter Site logo

pict's Introduction

PicT

This repo is the official implementation of "PicT: A Slim Weakly Supervised Vision Transformer for Pavement Distress Classification" based on Pytorch.

For more details of the pavement dataset CQU-BPDD used in paper, please refer to CQU-BPDD. (Note: CQU-BPDD can be only used in the uncommercial case and is licensed under CC BY-NC-SA 4.0.)

For more details of this task, see Pavement Distress Classification.

Requirement

Core:

  • torch == 1.11+cu11.5 (Not required, but recommended.)
  • timm == 0.67
  • ...

Docker:

Download Docker image via Baidu Cloud.

Note: If u wanto reproduce the results in the paper exactly, please email Wenhao.

Usage

These examples are in the I-REC setting. For other settings, please change the config file.

Train Swin-S

python3 main.py --data-path=$DATA_PATH --output=$OUTPUT_PATH --project=pict --cfg ../configs/baseline/swin_small_1rec.yaml --title=swin_s

Train PicT

# PicT uses the pretrained swin_s weight to init the teacher model
python3 main.py --data-path=$DATA_PATH --output=$OUTPUT_PATH --project=pict --cfg ../configs/baseline/swin_small_1rec.yaml ../configs/pict_1rec.yaml --title=pict --opt PICT.TEACHER_INIT $PRETRAINED_WEIGHT_PATH

pict's People

Contributors

dearcaat avatar

Stargazers

 avatar  avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

cvsch

pict's Issues

Error in training with DDP mode

When I train PicT with DDP mode, I find this error:
File "main.py", line 207, in main
models['main'] = NativeDDP(models['main'], device_ids=[config.LOCAL_RANK ]) # can use device str in Torch >= 1.1models['main'] = NativeDDP(models['main'], device_ids=[config.LOCAL_RANK ]) # can use device str in Torch >= 1.1
File "/eto_cn1/miniconda3/envs/XXX/lib/python3.8/site-packages/torch/distributed/utils.py", line 89, in _verify_param_shape_across_processes
return dist._verify_params_across_processes(process_group, tensors, logger)
RuntimeError: NCCL error in: /opt/conda/conda-bld/pytorch_1659484657607/work/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1191, invalid usage, NCCL version 2.10.3
ncclInvalidUsage: This usually reflects invalid usage of NCCL library (such as too many async ops, too many collectives at once, mixing streams in a group, etc).
return dist._verify_params_across_processes(process_group, tensors, logger)return dist._verify_params_across_processes(process_group, tensors, logger)

Wish to get your reply

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.