Skip to content

Add VOC Detection and Segmentation Datasets #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

ellisbrown
Copy link

took what @fmassa left off with at https://github.com/pytorch/examples/pull/21/files#diff-0344e770fabb635e92d12f8b67f3504a and completed / improved

  • VOCDetection should be complete. Should use AnnotationTransform when making the dataset and the detection_collate when making a DataLoader
  • VOCSegmentation not fully tested

@fmassa fmassa self-assigned this Mar 7, 2017
def __getitem__(self, index):
img_id = self.ids[index]

target = Image.open(self._annopath % img_id).convert('RGB')

This comment was marked as off-topic.

"""VOC Segmentation Dataset Object
input and target are both images

NOTE: need to address https://github.com/pytorch/vision/issues/9

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@acgtyrant
Copy link

When do you merge this pull request...

(default: alphabetic indexing of VOC's 20 classes)
keep_difficult (bool, optional): keep difficult instances or not
(default: False)
channels (int): number of channels

This comment was marked as off-topic.

for i, cur_bb in enumerate(bbox):
bb_sz = int(cur_bb.text) - 1
# scale height or width
bb_sz = bb_sz / width if i % 2 == 0 else bb_sz / height

This comment was marked as off-topic.

This comment was marked as off-topic.

targets = []
imgs = []
for _, sample in enumerate(batch):
for _, tup in enumerate(sample):

This comment was marked as off-topic.


label_ind = self.class_to_ind[name]
bndbox.append(label_ind)
res += [bndbox] # [xmin, ymin, xmax, ymax, ind]

This comment was marked as off-topic.

@fmassa
Copy link
Member

fmassa commented Dec 6, 2018

Replaced by #663

Thanks for the PR!

@fmassa fmassa closed this Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants