Comments (13)
Hi, I have more errors when I use python 3.7.. I cannot implement it, could you give me the code for training the model with the config and pth? Thank you!!!!
Hi! This code repo is the official implementation of ViT-Adapter. You can follow the guidelines in the README file to train/evaluate a model you like.
If you want to train Mask2Former-BeiT-Adapter, you should prepare an appropriate python environment. (Follow the instructions here. )
After that, you should also prepare some necessary files:
- Download the ade20k data to the directory
ViT-Adapter/segmentation/data/
; - Download the pre-trained weight of BEiT-Large (here) to the directory
ViT-Adapter/segmentation/pretrained/
;
Your working dir should be ViT-Adapter/segmentation/
.
Then run
sh dist_train.sh configs/ade20k/mask2former_beit_adapter_large_640_160k_ade20k_ss.py 8
for an 8-GPUs training, or run
python train.py configs/ade20k/mask2former_beit_adapter_large_640_160k_ade20k_ss.py
for a single-GPU training.
from vit-adapter.
Hello, when I run model_VitAdapter = init_segmentor(config_file_VitAdapter , checkpoint_file_VitAdapter, device='cuda:0'), it says this error, how to solve it~~ Thank you very much~~!
Hi! When you use EncoderDecoderMask2Former, you need to import package "mmseg_custom" and import EncoderDecoderMask2Former somewhere. Like file ViT-Adapter/segmentation/mmseg_custom/models/segmentors/__init__.py
.
from vit-adapter.
Hi, after
!python mmseg_custom/models/segmentors/init.py I get
Traceback (most recent call last):
File "mmseg_custom/models/segmentors/init.py", line 2, in
from .encoder_decoder_mask2former import EncoderDecoderMask2Former
ImportError: attempted relative import with no known parent package
What should I change~~ Thank you!!
from vit-adapter.
Hi, after !python mmseg_custom/models/segmentors/init.py I get
Traceback (most recent call last): File "mmseg_custom/models/segmentors/init.py", line 2, in from .encoder_decoder_mask2former import EncoderDecoderMask2Former ImportError: attempted relative import with no known parent package What should I change~~ Thank you!!
You do not need to actually run the init file, just import mmseg_custom in your script and add your current work dir to your environment variable PYTHONPATH.
from vit-adapter.
when I type import mmseg_custom, there is ModuleNotFoundError: No module named 'mmdet' caused by ----> 3 from mmdet.utils import util_mixins
from vit-adapter.
when I type import mmseg_custom, there is ModuleNotFoundError: No module named 'mmdet' caused by ----> 3 from mmdet.utils import util_mixins
I think this error means you need to install "mmdet" first. You can follow the instructions in the Usage in here.
from vit-adapter.
I cannot install mmdet as your code to get the error of ERROR: Command errored out with exit status 1:
command: /home/jinshan/anaconda3/bin/python /home/jinshan/anaconda3/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-81klhbox/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cython>=0.27.3' oldest-supported-numpy 'setuptools>=43.0.0' wheel
cwd: None
I tried !pip install openmim
!mim install mmdet==2.22.0 but still got the error ERROR: Command errored out with exit status 1:
command: /home/jinshan/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-download-arfq_jcg/mmdet/setup.py'"'"'; file='"'"'/tmp/pip-download-arfq_jcg/mmdet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zyqum7yy
cwd: /tmp/pip-download-arfq_jcg/mmdet/
Complete output (2 lines):
Error: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library.
Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.
Have you met the same problem and how have you solved~ Thank you very very much
from vit-adapter.
Oh I found it could work on python 3.7, I am using the 3.8.. I will try it later~~ Thank you
from vit-adapter.
Hi, I have more errors when I use python 3.7.. I cannot implement it, could you give me the code for training the model with the config and pth? Thank you!!!!
from vit-adapter.
Hi, I got the error "EncoderDecoder: 'BEiTAdapter is not in the models registry'" and I imported the mmseg_custom got error:/ViT-Adapter/segmentation/mmseg_custom/models/backbones/beit_adapter.py in
8 import torch.nn.functional as F
9 from mmseg.models.builder import BACKBONES
---> 10 from ops.modules import MSDeformAttn
11 from timm.models.layers import DropPath, trunc_normal_
12 from torch.nn.init import normal_
ModuleNotFoundError: No module named 'ops.modules'
from vit-adapter.
Hi, I got the error "EncoderDecoder: 'BEiTAdapter is not in the models registry'" and I imported the mmseg_custom got error:/ViT-Adapter/segmentation/mmseg_custom/models/backbones/beit_adapter.py in 8 import torch.nn.functional as F 9 from mmseg.models.builder import BACKBONES ---> 10 from ops.modules import MSDeformAttn 11 from timm.models.layers import DropPath, trunc_normal_ 12 from torch.nn.init import normal_
ModuleNotFoundError: No module named 'ops.modules'
Hi, you need to compile the ops module first. You can follow the last two lines of instructions in the usage. First, compile the module in the detection folder and create a soft link to ops in the segmentation folder.
from vit-adapter.
Hi, I followed the last two lines and get error:
Traceback (most recent call last):
File "setup.py", line 70, in
ext_modules=get_extensions(),
File "setup.py", line 43, in get_extensions
raise NotImplementedError('Cuda is not availabel')
NotImplementedError: Cuda is not availabel
from the command line sh make.sh
which the error comes from if torch.cuda.is_available() and CUDA_HOME is not None:...else.....
I tried shows the torch.cuda.is_available() is True but CUDA_HOME is None, so what could I do to solve it~~~ Thank you
from vit-adapter.
Hi, I followed the last two lines and get error: Traceback (most recent call last): File "setup.py", line 70, in ext_modules=get_extensions(), File "setup.py", line 43, in get_extensions raise NotImplementedError('Cuda is not availabel') NotImplementedError: Cuda is not availabel from the command line sh make.sh which the error comes from if torch.cuda.is_available() and CUDA_HOME is not None:...else..... I tried shows the torch.cuda.is_available() is True but CUDA_HOME is None, so what could I do to solve it~~~ Thank you
I think you can add the path to CUDA to your environment variables and try the 'sh' command again.
from vit-adapter.
Related Issues (20)
- Cannot download the checkpoint of upernet_deit_adapter_tiny.
- After Freezing the Vit backbone how many iterations are supposed to be trained?
- How can I use other pretrained ViTs or CNNs?
- number of iteration in the case of a batchsize equals to 1
- May I ask how to export onnx? There has been an error HOT 1
- ViT Adapter Not Working With Patch Size Different From 16 HOT 1
- Relative log amplitudes of Fourier transformed feature maps.
- Reccomended config for the case of binary segmentation
- KeyError: 'ViTAdapter is not in the models registry' HOT 1
- Poor performance on custom dataset.
- Dimension mismatching for beit_dapter with changing img_size and crop_size from (512, 512) to (384, 384)
- LayerScale and pre-trained models HOT 5
- Can ViT-Adapter be exported as an ONNX model? What are the respective versions of PyTorch and the ONNX subset for this?
- Request the configuration file of objects365 pre-training
- 从 mmseg0.x 迁移至 mmseg 1.x 复现出现问题
- 关于segmentation和detection的BEiT实现略有不同的问题 HOT 2
- Missing pretrained weights HOT 1
- Inference in batches and multiple GPU HOT 1
- Gradient accumulation implemention HOT 2
- ModuleNotFoundError: No module named 'MultiScaleDeformableAttention' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vit-adapter.