Comments (8)
Hi @momo1986, the error arises because you probably do not prepare an input text
in your dataset mapper. Are you sure you are using the correct dataset mapper?
OneFormer/oneformer/oneformer_model.py
Lines 282 to 283 in 4962ef6
from oneformer.
Hi, @praeclarumjj3.
Thanks for your reply.
I know that the evaluation dataset should be given the token "text" to enable the training mode.
Is there a demo that "text" field could be edited and set in a correct parameter when "--eval-only" is given.
I wish you are all good.
Best Wishes!
Yours Sincerely,
Momo
from oneformer.
Hi @momo1986, you would need to create a "text" list inside the evaluation dataset mapper if you want to use it during inference.
You can take a look at the training dataset mapper for reference.
from oneformer.
I also set as the training mode.
python train_net_adv.py --num-gpus 1 --config-file configs/cityscapes/convnext/oneformer_convnext_large_bs16_90k.yaml --eval-only MODEL.IS_TRAIN True MODEL.WEIGHTS 250_16_convnext_l_oneformer_cityscapes_90k.pth MODEL.TEST.TASK semantic
However, I obtained the error.
This is the error log.
Traceback (most recent call last):
File "train_net_adv.py", line 438, in
launch(
File "/home/ubuntu/junyan/Python/segmentation/detectron2/detectron2/engine/launch.py", line 84, in launch
main_func(*args)
File "train_net_adv.py", line 419, in main
res = Trainer.test(cfg, model)
File "train_net_adv.py", line 369, in test
results_i = inference_on_dataset(model, data_loader, evaluator)
File "/home/ubuntu/junyan/Python/segmentation/detectron2/detectron2/evaluation/evaluator.py", line 241, in inference_on_dataset
for idx, inputs in enumerate(data_loader):
File "/home/ubuntu/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/home/ubuntu/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home/ubuntu/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home/ubuntu/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/_utils.py", line 434, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/ubuntu/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ubuntu/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ubuntu/junyan/Python/segmentation/detectron2/detectron2/data/common.py", line 95, in getitem
data = self._map_func(self._dataset[cur_idx])
File "/home/ubuntu/junyan/Python/segmentation/detectron2/detectron2/utils/serialize.py", line 26, in call
return self._obj(*args, **kwargs)
File "/home/ubuntu/junyan/Python/segmentation/OneFormer/oneformer/data/dataset_mappers/oneformer_unified_dataset_mapper.py", line 301, in call
raise ValueError(
ValueError: Cannot find 'pan_seg_file_name' for panoptic segmentation dataset datasets/cityscapes/leftImg8bit/val/frankfurt/frankfurt_000001_062250_leftImg8bit.png.
I feel sorry for disturing you. Nevertheless, I am looking forward to addressing the problem.
Thanks & Regards!
Yours Sincerely,
Momo
from oneformer.
Looks the pan seg file is existed, how can I link them together?
The file structure is set as recommended.
Thanks & Best wishes!
Regards!
Momo
from oneformer.
Looks like that the model would touch the task of panoptic segmentation when the mode is set to the training model. However, for attacking adversarially in the inference time, evaluation only on semantic segmentation is what we want? Is there any workaround in UI to skip this issue?
Thanks & Regards!
Momo
from oneformer.
Hi @momo1986, were you able to solve this issue? I am sorry for not being able to reply earlier, been busy.
from oneformer.
I am closing this issue due to inactivity. Feel free to re-open.
from oneformer.
Related Issues (20)
- undefined symbol: _ZNK3c107SymBool10guard_boolEPKcl
- whether I need to download Swin transformer pretraining weight for training
- Swin large backbone warning: "norm.bias will not be loaded. Please double check and see if this is desired." HOT 1
- AssertionError when trying to reproduce result HOT 2
- Inference time
- Class labels Issue
- Different result in different GPU HOT 1
- Update colab demo HOT 1
- Resources required to fine-tune this model with swin-l HOT 13
- Potential code bug but always good model
- Freezing layers for DiNAT model
- Cityscapes val SOTA results not found in the paper HOT 2
- Training ADE20K for Instance Segmentation Only
- ModuleNotFoundError: No module named 'detectron2.config' HOT 3
- Wrong citation
- What is the expected dimension sizes for the outputs dictionary from sem_seg_head? HOT 3
- Installation and setting up this repo is challenging HOT 1
- How to set prefetch_factor? HOT 1
- How to set the image size to run demo ?
- Runtime Error HOT 1
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 oneformer.