Giter Club home page Giter Club logo

Comments (4)

alexandru-dinu avatar alexandru-dinu commented on July 27, 2024

Because img is a numpy array that wraps the returned PIL Image, I am guessing that None is returned, and so np.array(None).shape is (), hence the got 0.

from pytorch-yolov3.

CaptainEven avatar CaptainEven commented on July 27, 2024

@alexandru-dinu the training is fine from start, and the error happened @Batch 1473....i don't understand

from pytorch-yolov3.

chijan-nh avatar chijan-nh commented on July 27, 2024

I got similar issue in detect.py.
The attached data/samples can be run, however, if grayscale images are given as data/samples, then "not enough values to unpack" error is reproduced.
The code h,w,_=img.shape caused this error because the grayscale image does not have channels, i.e. , len(img.shape)==2.

I think the @Batch 1473 's images are broken (including None). The #36 issue may be caused by the dataset. Until @Batch 1472, the dataset is normal, I think.
My dirty hack is (1) get len(img.shape) and (2) use if divided; if len(img.shape)!=3, then this batch is ignored.

from pytorch-yolov3.

eriklindernoren avatar eriklindernoren commented on July 27, 2024

This was caused by a grayscale image in the dataset. It's fixed in master.

from pytorch-yolov3.

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.