question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom dataset runtime error

See original GitHub issue

Hello

I am trying to retrain yolact on Pascal Part a variation of Pascal VOC where each classes has many sub-classes. To simplify everything I make every sub-classes a class in addition with the 20 original one which give me a set 316 classes. I generated three JSON files for each case.

When I start training I encouter the following error: RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity Which happen here: losses = criterion(out, wrapper, wrapper.make_mask()) train.py around line 262 (I had some print in my file so my line number is different)

Here: https://github.com/eriklindernoren/PyTorch-YOLOv3/issues/110

I read it might be a path issue however I rechecked the image path are correct. Also I am able to train Pascal Voc using the same image path without issues.

I try to investigate the forward method of the loss function looking for an empty tensor but I did not find any.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dbolyacommented, May 21, 2019

Well there’s your problem. “iscrowd” tells COCO to ignore every detection that overlaps with it. It’s not used for training, it’s used to give the model a break when there’s a crowd of people and each person isn’t individually annotated.

Do not use iscrowd for data you actually want to train on. Like every other method and like COCO does in evaluation, I completely ignore all detections that overlap with an “iscrowd” GT.

0reactions
davodogstercommented, Oct 21, 2020

@JSharp4273 Hi Julien, I have a similar problem. All of my images have many overlapping instances… so iscrowd=1 in the coco.json file. How can I train YOLACT with this data? I am able to train MaskRCNN with it but I would rather use YOLACT.

Regards, Sam @dbolya

EDIT: The solution was just find and replace all iscrowd: 1 to iscrowd: 0. I’m using the RLE format (not polygon). I also used waspinators function to generate the coco.json file.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Runtime Error on Training Custom Dataset · Issue #982 - GitHub
Questions & Help Hi everyone, I am trying to train a simple GNN with using my dataset. I created the dataset with following...
Read more >
A runtime error occurred in creating and using custom dataset
I created a custom dataset with reference to github. ... The dataset is a variant of cifar100 and consists of .png images and...
Read more >
Language_model_learner and custom dataset: RunTime Error
Hi, I am just trying to reproduce the code found in the doc (here) where we want to fine-tune a pretrained language model....
Read more >
Runtime error when reading data from a training dataset ...
I have a sample of data in my training dataset which I am able to view if I print the data, but when...
Read more >
7 Comments - Kaggle
When I tried to load the datasets, I got error RuntimeError: Found 0 files in ... pytorch-custom-dataset-examples and gitbooks: Bringing data to PyTorch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found