Skip to content
Discussion options

You must be logged in to vote

I'm solving it using a pytorch map-style dataset. It does not provide/preload a list[dict] with the lightweight representation of all the training instances.
My dataset has one image and a Json file with all its annotations

from torch.utils.data import Dataset
class yourDatasetClass(Dataset):
def init(self, df, transforms=None): #df is a dataframe with all the annotations of your dataset
.....
def getitem(self, idx):
target = {}
target["file_name"] = imgPath
............
return target

In pytorch and specially torchvision there are tutorials on building a detection dataset but you need to return image and targets. In detectron2 you only have to return a dict with the details specified in s…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by juanluisrosaramos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant