Code Monkey home page Code Monkey logo

Comments (4)

lilyhappily avatar lilyhappily commented on July 22, 2024 3

I recently study the tutorial, I have the problem too. I don't know whether you solve or not. when you encounter the problem, you print the tensor 1 and tensor 2, and then you will find the tensor 1 is tensor([0]). It is that some pictures have no gound_truth boxes. You should filter them out in the function of create_data_lists in utils.py. I changed the the author's code len(object) == 0 to len(object["boxes"] == 0 and it works. Hope, this can help.

from a-pytorch-tutorial-to-object-detection.

YoongiKim avatar YoongiKim commented on July 22, 2024

Me too. I need help!

from a-pytorch-tutorial-to-object-detection.

fansac avatar fansac commented on July 22, 2024

I recently study the tutorial, I have the problem too. I don't know whether you solve or not. when you encounter the problem, you print the tensor 1 and tensor 2, and then you will find the tensor 1 is tensor([0]). It is that some pictures have no gound_truth boxes. You should filter them out in the function of create_data_lists in utils.py. I changed the the author's code len(object) == 0 to len(object["boxes"] == 0 and it works. Hope, this can help.

THX

from a-pytorch-tutorial-to-object-detection.

Tathagatd96 avatar Tathagatd96 commented on July 22, 2024

@indamutsa @YoongiKim , I had faced the same issue. The criterion() expects a 2D tensor as input i.e a list of all bounding boxes which themselves are lists, so either change the shape of the boxes and labels in the train() in train.py or change the shape of boxes and labels in the forward() of class MultiBoxLoss(). You can use unsqueeze() to resize the tensors. Hope this helps.

from a-pytorch-tutorial-to-object-detection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.