You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to fine tune DiT for object detection (text, diagrams detection only) etc for my own dataset. Been searching through the web for quite some time but could not find anything on fine tuning a Transformers backbone for object detection.
I know how to fine tune Detectron 2 for an object detection task with the default given configuration yaml files using Faster RCNN / Masked RCNN models with Resnet or any other backbone CNN models but I don't know how to do it with Transformers models.
DiT is also present as a HuggingFace model and supports Feature Extraction as BeitFeatureExtractor.from_pretrained("microsoft/dit-large") so I think it could be used as a backbone but I found nothing on this one either.
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-11-446d81c845dd> in <module>
13 train_dataloader = DataLoader(train_dataset, collate_fn=collate_fn, batch_size=4, shuffle=True)
14 val_dataloader = DataLoader(val_dataset, collate_fn=collate_fn, batch_size=2)
---> 15 batch = next(iter(train_dataloader))
5 frames
/usr/local/lib/python3.7/dist-packages/transformers/feature_extraction_utils.py in __getitem__(self, item)
85 """
86 if isinstance(item, str):
---> 87 return self.data[item]
88 else:
89 raise KeyError("Indexing with integers is not available when using Python based feature extractors")
KeyError: 'labels'
Can someone please help me with the problem t hand?
ANY architecture like Faster RCNN, DETR etc and ANY repo or platform like Detectron 2, PaddleDetection, MMDetection, HuggingFace, EfficientDet would do.
The text was updated successfully, but these errors were encountered:
I want to fine tune DiT for object detection (text, diagrams detection only) etc for my own dataset. Been searching through the web for quite some time but could not find anything on fine tuning a Transformers backbone for object detection.
I know how to fine tune Detectron 2 for an object detection task with the default given configuration
yaml
files using Faster RCNN / Masked RCNN models with Resnet or any other backbone CNN models but I don't know how to do it with Transformers models.This github issues for DETR for custom backbone describes how to change the backbone as the author said that you can use ANY models from timm library and since there are almost 890 models present but unfortunately, not
DiT
.DiT
is also present as a HuggingFace model and supports Feature Extraction asBeitFeatureExtractor.from_pretrained("microsoft/dit-large")
so I think it could be used as a backbone but I found nothing on this one either.I tried changing the code on how to train DETR on custom data by replacing code in Cell 8,
but while running the code for Cell 11,
it gave me error as:
Can someone please help me with the problem t hand?
ANY architecture like
Faster RCNN
,DETR
etc and ANY repo or platform likeDetectron 2
,PaddleDetection
,MMDetection
,HuggingFace
,EfficientDet
would do.The text was updated successfully, but these errors were encountered: