Giter Site home page Giter Site logo

AttributeError: 'NoneType' object has no attribute 'shape' about hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network HOT 7 CLOSED

sparshasaha avatar sparshasaha commented on June 15, 2024
AttributeError: 'NoneType' object has no attribute 'shape'

from hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network.

Comments (7)

SparshaSaha avatar SparshaSaha commented on June 15, 2024 1

A fix for this issue has been put in by @mohammed-Emad . Thus closing this

from hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network.

SparshaSaha avatar SparshaSaha commented on June 15, 2024

I'll check and get back to you in a few days

from hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network.

hadeeratef4 avatar hadeeratef4 commented on June 15, 2024

AttributeError: 'NoneType' object has no attribute 'shape'.

I have the same issue. can help me ?

from hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network.

mohammed-Emad avatar mohammed-Emad commented on June 15, 2024

Check the cam or check the video used,
This error does occur when there is a problem reading the camera or video.

He inquires about the shape class,
But the value of the frame now equals None,
There are no classes there so this is a mistake.
It was supposed to make a condition to alert you to the lack of input to understand the problem without entering into other labyrinths.

For example

if ret==True:
   ...your code..
else:
  error input and break

or real example

while(True):
        # get the current frame
        (grabbed, frame) = camera.read()
        if not grabbed: #is true
            print("Error input chk your[cam Or video]")
            break
        # resize the frame
        frame = imutils.resize(frame, width = 700)

        # flip the frame so that it is not the mirror view
        frame = cv2.flip(frame, 1)

        # clone the frame
        clone = frame.copy()

        # get the height and width of the frame
        (height, width) = frame.shape[:2]

Thanks, good luck

from hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network.

mohammed-Emad avatar mohammed-Emad commented on June 15, 2024

or cam error port?

camera = cv2.VideoCapture(0)

try -1 vs 0

camera = cv2.VideoCapture(-1)

see
cv2-videocapture-open-always-returns-false

from hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network.

SparshaSaha avatar SparshaSaha commented on June 15, 2024

Hey @mohammed-Emad your point seems right. I should have included a check for the cam capture before getting into action. I would request you to raise a Pull Request to fix the Issue. I can then merge it in accordingly. Thanks.

from hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network.

mohammed-Emad avatar mohammed-Emad commented on June 15, 2024

Hi @SparshaSaha , I will start with that now
Thank you

from hand-gesture-recognition-using-background-elllimination-and-convolution-neural-network.

Related Issues (10)

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.