SHI-Labs / OneFormer

OneFormer: One Transformer to Rule Universal Image Segmentation, arxiv 2022 / CVPR 2023

Home Page:https://praeclarumjj3.github.io/oneformer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to set prefetch_factor?

Pari-singh opened this issue · comments

Hi, I am trying to train on custom data (which is in coco instance seg format). I have followed your suggestions for registering the data and using instance_coco_custom_dataset_mapper.py for it. Dataloading with data distribution visualization part is done successfully, however, I get error in line 339, in build_batch_data_loader:

data_loader = torchdata.DataLoader(
File "/home/pari/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 183, in init
assert prefetch_factor > 0
TypeError: '>' not supported between instances of 'NoneType' and 'int'

For me, prefetch_factor is None and I see no way of setting it in config so far. Can you help me figure out how to set it up - config file for custom instance segmentation would be a great help as well!
(I tried both single GPU for debugging and multiGPU but get same error) @praeclarumjj3

Thanks in advance!

So I manually set the default as 1 and it works so far, but would love to know what's the solution.
Another warning I am getting while training is:
WARNING [10/02 23:53:15 d2.checkpoint.c2_model_loading]: norm.weight will not be loaded. Please double check and see if this is desired.
WARNING [10/02 23:53:15 d2.checkpoint.c2_model_loading]: Shape of norm.bias in checkpoint is torch.Size([1536]), while shape of sem_seg_head.predictor.transformer_cross_attention_layers.6.norm.bias in model is torch.Size([256]).
Any suggestions/comments? @praeclarumjj3