Coder Social home page Coder Social logo

ps-vit's People

Contributors

kevin-ssy avatar yuexy 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

ps-vit's Issues

No module named '_ext'

Thank you for your awesome work. I have followed all steps for training your model; however, I encountered the following error which happens for importing your model in line 9 of main.py (import models). Although it seems that models have not been used anywhere in main.py, when I commented import models, another error would occur in line 315 in create_model of main.py.

I would be grateful if you could guide me to deal with this issue.

Traceback (most recent call last):
  File "/home/amir/Documents/PS-ViT/main.py", line 9, in <module>
    import models
  File "/home/amir/Documents/PS-ViT/models/_init_.py", line 1, in <module>
    from .ps_vit import *
  File "/home/amir/Documents/PS-ViT/models/ps_vit.py", line 4, in <module>
    from timm.models.helpers import load_pretrained
  File "/home/amir/anaconda3/envs/ps_vit/lib/python3.7/site-packages/timm/_init_.py", line 2, in <module>
    from .models import create_model, list_models, is_model, list_modules, model_entrypoint, \
  File "/home/amir/anaconda3/envs/ps_vit/lib/python3.7/site-packages/timm/models/_init_.py", line 1, in <module>
    from .ps_vit import *
  File "/home/amir/anaconda3/envs/ps_vit/lib/python3.7/site-packages/timm/models/ps_vit.py", line 8, in <module>
    from layers import ProgressiveSample
  File "/home/amir/Documents/PS-ViT/layers/_init_.py", line 1, in <module>
    from .progressive_sample import ProgressiveSample
  File "/home/amir/Documents/PS-ViT/layers/progressive_sample.py", line 9, in <module>
    'progressive_sampling_backward'])
  File "/home/amir/Documents/PS-ViT/utils/ext_loader.py", line 5, in load_ext
    ext = importlib.import_module(name)
  File "/home/amir/anaconda3/envs/ps_vit/lib/python3.7/importlib/_init_.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_ext'

Process finished with exit code 1

First of all, I used ">python setup.py build_ext --inplace" to compile. I would like to ask why the question in ext_loader.py file appears

Traceback (most recent call last):
File "D:\Lenovo\PycharmProjects\PS-ViT-master\utils\ext_loader.py", line 12, in
ext_module = load_ext('ext', ['progressive_sampling_forward', 'progressive_sampling_backward'])
File "D:\Lenovo\PycharmProjects\PS-ViT-master\utils\ext_loader.py", line 5, in load_ext
ext = importlib.import_module(name)
File "D:\Anaconda3\envs\python39\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 565, in module_from_spec
File "", line 1108, in create_module
File "", line 228, in _call_with_frames_removed
ImportError: DLL load failed while importing _ext: 找不到指定的模块。

Error when installing apex, really need your help!

Hello! I installed under the instructions (PyTorch==1.7.1 and torchvision==0.8.2 with CUDA==10.1). When I install apex using "pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./", it successfully finished. However, when I run the code, there is an error from "import apex", that is "fused_weight_gradient_mlp_cuda module not found. gradient accumulation fusion with weight gradient computation disabled." Have anyone met this problem? Thank you very much!

Can't load pretrained model

Thansk for your great work. I tried to train PS-ViT on my own dataset based on your ImageNet pretrained model. But when I use create_model(initial_checkpoint) in your code to load ps_vit_b_18.pth.tar, something goes wrong. Can you help me solve this problem? Thansk again!
{%4{XGSIU51N1GR{G0TIDAQ

Train from scratch not working

I have done your installation setup step-by-step, but unfortunately the train from scratch bash file not working. this is the log file that code have generated on the output file

usage: main.py [-h] [--data DIR] [--data_train_root DATA_TRAIN_ROOT]
[--data_train_label DATA_TRAIN_LABEL]
[--data_val_root DATA_VAL_ROOT]
[--data_val_label DATA_VAL_LABEL] [--model MODEL]
[--pretrained] [--initial-checkpoint PATH] [--resume PATH]
[--eval_checkpoint PATH] [--no-resume-opt] [--num-classes N]
[--gp POOL] [--img-size N] [--crop-pct N]
[--mean MEAN [MEAN ...]] [--std STD [STD ...]]
[--interpolation NAME] [-b N] [-vb N] [--opt OPTIMIZER]
[--opt-eps EPSILON] [--opt-betas BETA [BETA ...]]
[--momentum M] [--weight-decay WEIGHT_DECAY] [--clip-grad NORM]
[--sched SCHEDULER] [--lr LR]
[--lr-noise pct, pct [pct, pct ...]] [--lr-noise-pct PERCENT]
[--lr-noise-std STDDEV] [--lr-cycle-mul MULT]
[--lr-cycle-limit N] [--warmup-lr LR] [--min-lr LR]
[--epochs N] [--start-epoch N] [--decay-epochs N]
[--warmup-epochs N] [--cooldown-epochs N] [--patience-epochs N]
[--decay-rate RATE] [--no-aug] [--scale PCT [PCT ...]]
[--ratio RATIO [RATIO ...]] [--hflip HFLIP] [--vflip VFLIP]
[--color-jitter PCT] [--aa NAME] [--aug-splits AUG_SPLITS]
[--jsd] [--reprob PCT] [--remode REMODE] [--recount RECOUNT]
[--resplit] [--mixup MIXUP] [--cutmix CUTMIX]
[--cutmix-minmax CUTMIX_MINMAX [CUTMIX_MINMAX ...]]
[--mixup-prob MIXUP_PROB]
[--mixup-switch-prob MIXUP_SWITCH_PROB]
[--mixup-mode MIXUP_MODE] [--mixup-off-epoch N]
[--smoothing SMOOTHING]
[--train-interpolation TRAIN_INTERPOLATION] [--drop PCT]
[--drop-connect PCT] [--drop-path PCT] [--drop-block PCT]
[--bn-tf] [--bn-momentum BN_MOMENTUM] [--bn-eps BN_EPS]
[--sync-bn] [--dist-bn DIST_BN] [--split-bn] [--model-ema]
[--model-ema-force-cpu] [--model-ema-decay MODEL_EMA_DECAY]
[--seed S] [--log-interval N] [--recovery-interval N] [-j N]
[--num-gpu NUM_GPU] [--save-images] [--amp] [--apex-amp]
[--native-amp] [--channels-last] [--pin-mem] [--no-prefetcher]
[--output PATH] [--eval-metric EVAL_METRIC] [--tta N]
[--local_rank LOCAL_RANK] [--use-multi-epochs-loader]
[--distributed DISTRIBUTED] [--port PORT]
[--repeated_aug REPEATED_AUG]
main.py: error: unrecognized arguments: main.py

About the training of the sampling location offsets

Hi, Xiaoyu
This PS-ViT is an excellent work! And I have a little question want to ask: When I train the sampling location offsets network, the output offsets are always very high (nearly the H/W of the image) or low (nearly 0). Have you ever encountered this kind of problem? How do you limit the range of the learned offsets?
image

Looking forward to your reply! Thanks!

the performance about PS-ViT-Ti/14

Hi,

I have trained PS-ViT-Ti/14 following the default setting in the code. But the performance is only 74.6, which is lower than 75.6 in the paper. Could you show more training details?

Download the pre training model

Hello,

Thank you for sharing. I have some problems downloading pre training weights. I hope to get your help. I can't use Google drive to download ps-vit-b / 14 and ps-vit-b / 18 pre training weights. I hope you can provide Baidu online disk and other download methods.Thank you very much.

This program was compiled against version 3.9.2

excuse me i'm facing this problem
This program was compiled against version 3.9.2 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.17.1). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "bazel-out/k8-opt/bin/tensorflow/core/framework/tensor_shape.pb.cc".)

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.