Please refer to https://xieenze.github.io/ for more details.
xieenze / trans2seg Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Please refer to https://xieenze.github.io/ for more details.
When I try to reduce the categories to two while testing, I get the following error:
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1579027003190/work/aten/src/THC/generic/THCTensorMath.cu line=26 error=59 : device-side assert triggered
Traceback (most recent call last):
File "tools/train.py", line 330, in
trainer.train()
File "tools/train.py", line 170, in train
losses.backward()
File "/opt/conda/envs/trans_seg/lib/python3.6/site-packages/torch/tensor.py", line 195, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/opt/conda/envs/trans_seg/lib/python3.6/site-packages/torch/autograd/init.py", line 99, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1579027003190/work/aten/src/THC/generic/THCTensorMath.cu:26
Traceback (most recent call last):
File "/opt/conda/envs/trans_seg/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/opt/conda/envs/trans_seg/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/conda/envs/trans_seg/lib/python3.6/site-packages/torch/distributed/launch.py", line 263, in
main()
File "/opt/conda/envs/trans_seg/lib/python3.6/site-packages/torch/distributed/launch.py", line 259, in main
cmd=cmd)
How to modify the network parameters to run?
thank you!
Can you provide pretrained model
hello, thanks for sharing. I assume this repo is still undergoing significant clean-up? It looks like a lot of the code was moved from segmentron. But, deep clean-up seems necessary. For example, is loss.py
line 9 : from ..models.pointrend import point_sample
. However, pointrend only exists in segmentron and has been removed from this repo. So, loss.py
will have import error.
用最小的模型trans2seg_small.yaml, 4块2080ti显卡,batch_size大小设置成1,显存还是会爆,跑这个模型最低的硬件的条件是什么?
Hi,
Have been trying to run training (though on single GPU).
-> bash tools/dist_train.sh configs/trans10kv2/trans2seg/trans2seg_medium.yaml 1
And below is error stack. Please can you help?
Many thanks.
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
Traceback (most recent call last):
File "tools/train.py", line 20, in
from segmentron.solver.loss import get_segmentation_loss
File "/home/paperspace/Trans2Seg/segmentron/solver/loss.py", line 9, in
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in
from segmentron.solver.loss import get_segmentation_loss
File "/home/paperspace/Trans2Seg/segmentron/solver/loss.py", line 9, in
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in
from segmentron.solver.loss import get_segmentation_loss
File "/home/paperspace/Trans2Seg/segmentron/solver/loss.py", line 9, in
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in
from segmentron.solver.loss import get_segmentation_loss
File "/home/paperspace/Trans2Seg/segmentron/solver/loss.py", line 9, in
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in
from segmentron.solver.loss import get_segmentation_loss
File "/home/paperspace/Trans2Seg/segmentron/solver/loss.py", line 9, in
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in
from segmentron.solver.loss import get_segmentation_loss
File "/home/paperspace/Trans2Seg/segmentron/solver/loss.py", line 9, in
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in
from segmentron.solver.loss import get_segmentation_loss
File "/home/paperspace/Trans2Seg/segmentron/solver/loss.py", line 9, in
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in
from segmentron.solver.loss import get_segmentation_loss
File "/home/paperspace/Trans2Seg/segmentron/solver/loss.py", line 9, in
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/paperspace/Torch/lib/python3.8/site-packages/torch/distributed/launch.py", line 263, in
main()
File "/home/paperspace/Torch/lib/python3.8/site-packages/torch/distributed/launch.py", line 258, in main
raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/home/paperspace/Torch/bin/python', '-u', 'tools/train.py', '--local_rank=7', '--config-file', 'configs/trans10kv2/trans2seg/trans2seg_medium.yaml', '1']' returned non-zero exit status 1.
First of all, Thank you for this nice work!
Secondly, are you planning on uploading a pretrained model?
Very good job. It seems that it can be migrated to other segmentation datasets
by input this command:
'''
bash tools/dist_train.sh configs/trans10kv2/trans2seg/trans2seg_medium.yaml 2
'''
but I get error for :
'''
Traceback (most recent call last):
File "tools/train.py", line 296, in
cfg.update_from_list(args.opts)
File "/home/lthpc/Algo/xjw/Trans2Seg/segmentron/config/config.py", line 107, in update_from_list
raise ValueError(
ValueError: Command line options config format error! Please check it: ['2']''', and I try to check the src code:
'''
def update_from_list(self, config_list):
if len(config_list) % 2 != 0:
raise ValueError(
"Command line options config format error! Please check it: {}".
format(config_list))
for key, value in zip(config_list[0::2], config_list[1::2]):
try:
self.setattr(key, value, create_if_not_exist=False)
except KeyError:
raise KeyError('Non-existent config key: {}'.format(key))'''
I don't konw how to fix it?
The download link in Google Drive for the Download of the trans10kv2 dataset is down. Could you repost a new one?
Can i run it in windows10 environment? Thanks
I couldn't find it.
Could anyone provide a better demo?
Maybe here you want to swap dim 1 (num_heads) and dim 2 (num_class) before reshaping? Or it is my misunderstanding?
Thank you very much.
Hi,
I'm interested in your project and working on transparent object segmentation. Can you provide the pre-trained model? Thanks for your help!
Does anyone knows how to use the demo?It always has a AssertionError when i use it.
File "E:\python\Trans2Seg-master\segmentron\models\trans2seg.py", line 74, in forward
cls_token, x = self.vit.forward_encoder(x)
File "E:\python\Trans2Seg-master\segmentron\modules\transformer.py", line 224, in forward_encoder
pos_embed = self.resize_pos_embed(x, pos_embed)
File "E:\python\Trans2Seg-master\segmentron\modules\transformer.py", line 242, in resize_pos_embed
assert x_h * x_w == hw-1
AssertionError
When I followed the train demo, there were some path errors like
(trans2seg) jinrae@costar-Oryx-Pro:~/workspace/Trans2Seg$ bash tools/dist_train.sh configs/trans10kv2/trans2seg/trans2seg_medium.yaml 1
+ CONFIG=configs/trans10kv2/trans2seg/trans2seg_medium.yaml
+ GPUS=8
++ dirname tools/dist_train.sh
+ python -m torch.distributed.launch --nproc_per_node=8 tools/train.py --config-file configs/trans10kv2/trans2seg/trans2seg_medium.yaml 1
*****************************************
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
*****************************************
Traceback (most recent call last):
File "tools/train.py", line 20, in <module>
from segmentron.solver.loss import get_segmentation_loss
File "/home/jinrae/workspace/Trans2Seg/segmentron/solver/loss.py", line 9, in <module>
Traceback (most recent call last):
File "tools/train.py", line 20, in <module>
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
from segmentron.solver.loss import get_segmentation_loss
File "/home/jinrae/workspace/Trans2Seg/segmentron/solver/loss.py", line 9, in <module>
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in <module>
from segmentron.solver.loss import get_segmentation_loss
File "/home/jinrae/workspace/Trans2Seg/segmentron/solver/loss.py", line 9, in <module>
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in <module>
from segmentron.solver.loss import get_segmentation_loss
File "/home/jinrae/workspace/Trans2Seg/segmentron/solver/loss.py", line 9, in <module>
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "/home/jinrae/miniconda3/envs/trans2seg/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/jinrae/miniconda3/envs/trans2seg/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/jinrae/miniconda3/envs/trans2seg/lib/python3.6/site-packages/torch/distributed/launch.py", line 263, in <module>
main()
File "/home/jinrae/miniconda3/envs/trans2seg/lib/python3.6/site-packages/torch/distributed/launch.py", line 259, in main
cmd=cmd)
subprocess.CalledProcessError: Command '['/home/jinrae/miniconda3/envs/trans2seg/bin/python', '-u', 'tools/train.py', '--local_rank=7', '--config-file', 'configs/trans10kv2/trans2seg/trans2seg_medium.yaml', '1']' returned non-zero exit status 1.
Traceback (most recent call last):
File "tools/train.py", line 20, in <module>
from segmentron.solver.loss import get_segmentation_loss
File "/home/jinrae/workspace/Trans2Seg/segmentron/solver/loss.py", line 9, in <module>
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in <module>
from segmentron.solver.loss import get_segmentation_loss
File "/home/jinrae/workspace/Trans2Seg/segmentron/solver/loss.py", line 9, in <module>
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Traceback (most recent call last):
File "tools/train.py", line 20, in <module>
from segmentron.solver.loss import get_segmentation_loss
File "/home/jinrae/workspace/Trans2Seg/segmentron/solver/loss.py", line 9, in <module>
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
(trans2seg) jinrae@costar-Oryx-Pro:~/workspace/Trans2Seg$ Traceback (most recent call last):
File "tools/train.py", line 20, in <module>
from segmentron.solver.loss import get_segmentation_loss
File "/home/jinrae/workspace/Trans2Seg/segmentron/solver/loss.py", line 9, in <module>
from ..models.pointrend import point_sample
ModuleNotFoundError: No module named 'segmentron.models.pointrend'
Does anyone run the code well?
Hi, thanks for your paper and code. I just found that SBU dataset was implemented without related performance listed in your paper. I wonder the performance on SBU. If possible, would you provide some details performance scores, e.g, ber or accuracy.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.