Advanced Computer Vision with Python - Full Course

Advanced Computer Vision with Python - Full Course

freeCodeCamp.org

3 года назад

1,667,515 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

2067Xenon
2067Xenon - 17.09.2023 23:58

Anyone else run into the divided by zero error when making the face detection module? The error comes from line 11 where fps = 1/cTime -pTime . cTime is set as time.time() while pTime is set to cTime which means they are the same value resulting in 0 being their difference. This error seemingly prevents the script from executing though, sometimes it just runs until it runs into the error. Any notes to fix this?

Ответить
Arwyn
Arwyn - 17.09.2023 21:52

how do I open the "hands" in parameters if I'm on a mac, he said to control right click but it doesn't work.

Ответить
Vikrama Dhanvi
Vikrama Dhanvi - 13.09.2023 10:04

how could I get the codes through websites

Ответить
Magic Drawing Hand
Magic Drawing Hand - 28.08.2023 23:54

some link error? can u share trainer ai videos and jpg for demos?

Ответить
Magic Drawing Hand
Magic Drawing Hand - 28.08.2023 23:24

NC

Ответить
Le Minh Duc
Le Minh Duc - 20.08.2023 16:20

Amazing

Ответить
Reality of World
Reality of World - 19.08.2023 15:52

i have problem in transforming the poseEstimationmin to pose module what to do help guys

Ответить
บุณยาพร ชัยมงคลทรัพย์
บุณยาพร ชัยมงคลทรัพย์ - 12.08.2023 23:28

AttributeError: module 'cv2.dnn' has no attribute 'DictValue'
I got some error, please help me fix this error.

Ответить
Ivo Cvetkov
Ivo Cvetkov - 08.08.2023 14:45

quick hint if your video is too big for the screen:

cv2.namedWindow("Resized_Window", cv2.WINDOW_NORMAL)
cv2.resizeWindow("Resized_Window", 1200, 700)

cv2.imshow("Resized_Window", img)

### resized window values are the rectangle sides, you can adjust them as you wish

Ответить
الأمل بالله
الأمل بالله - 03.08.2023 22:16

In Pose Estimation, how can i find the z cordinate ? and show the depth frame also with poses?

Ответить
</codX>
- 09.06.2023 07:16

casualy uploads a 6 hour comp vision course brooo, thanks bhai !

Ответить
Paul Sunday
Paul Sunday - 06.06.2023 21:50

Can I use vs code instead? If yes, how do i integrate mediapipe & opencv like he did?

Ответить
Tony Wan
Tony Wan - 29.05.2023 19:25

Great course!

Ответить
Abdussamad Arhun
Abdussamad Arhun - 27.05.2023 18:53

Imgae = I am gay

Ответить
Lakshmanan Sivakumar
Lakshmanan Sivakumar - 23.05.2023 17:45

Replace FACE_CONNECTIONS with FACEMESH_TESSELATION if you get an attribute error (Face Mesh section)

Ответить
Mateusz
Mateusz - 19.05.2023 18:12

Hand Tracking module does not work..

Ответить
Paul Sunday
Paul Sunday - 17.05.2023 01:33

Can I use vs code for my learning instead of pycharm as used in this tutorial?

Ответить
Muhammet Uzun
Muhammet Uzun - 16.05.2023 19:13

I finally finished. what an adventure it was! Thank you to everyone who contributed 🙏

Ответить
Moroccan Avatar
Moroccan Avatar - 11.05.2023 18:31

Why i can not install mediapipe . Its give an error

Ответить
Luis Coelho
Luis Coelho - 26.04.2023 22:06

Great video, congratulations!! Can mediapipe be adapted to recognize the foot palm (like the hand) ?

Ответить
xm t
xm t - 24.04.2023 16:35

help. What should I do if the automatically translated subtitles are not displayed in the second half of the video?

Ответить
Adam Roman Paul
Adam Roman Paul - 21.04.2023 23:25

I couldn't down load OpenCV in current platform.

Ответить
Jonathan
Jonathan - 15.04.2023 20:07

How do you fix the point out of bounds error?

Ответить
y_aro
y_aro - 03.04.2023 16:25

cant we detect multiple pose?

Ответить
DevIsDevil
DevIsDevil - 03.04.2023 08:24

Would we able to import this python script in blender for object tracking??

Ответить
Mayank Khandelwal 07
Mayank Khandelwal 07 - 02.04.2023 15:29

hii sir ,i want to install a library named mediapipe for my project and i have 3.11 version of the python and im facing problem in installing the library ,will you please help me out for doing this plz plz plz

Ответить
M.PAVAN KALYAN
M.PAVAN KALYAN - 01.04.2023 02:42

Okay I tried 10 hours but unable to install mediapipe , now some one has to help me please

Ответить
Stu.
Stu. - 28.03.2023 21:21

can you do pose estimation with pictures rather than video?

Ответить
Suman Shakthivel T V 21BCE1993
Suman Shakthivel T V 21BCE1993 - 24.03.2023 19:17

where to get the videos of pose detection

Ответить
Bhargav Kongara
Bhargav Kongara - 09.03.2023 05:39

Sir I am unable to access the source code you provided through the link you have given in description

Ответить
M.PAVAN KALYAN
M.PAVAN KALYAN - 25.02.2023 11:06

Is this for beginners??

Ответить
20261A6619 GANDHE HARSHAVARDHAN
20261A6619 GANDHE HARSHAVARDHAN - 21.02.2023 18:15

Hey guys if u are getting any errors in hand tracking module please refer to the below code:---


import cv2
import mediapipe as mp
import time
import math
import numpy as np

class handDetector():
def __init__(self, mode=False, maxHands=2, detectionCon=0.7, trackCon=0.5):
self.mode = mode
self.maxHands = maxHands
self.detectionCon = detectionCon
self.modelComplex = 1
self.trackCon = trackCon
self.mpHands = mp.solutions.hands
self.hands = self.mpHands.Hands(self.mode, self.maxHands, self.modelComplex, self.detectionCon, self.trackCon)
self.mpDraw = mp.solutions.drawing_utils
self.tipIds = [4, 8, 12, 16, 20]

def findHands(self, img, draw=True):
imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
self.results = self.hands.process(imgRGB)
# print(results.multi_hand_landmarks)

if self.results.multi_hand_landmarks:
for handLms in self.results.multi_hand_landmarks:
if draw:
self.mpDraw.draw_landmarks(img, handLms,self.mpHands.HAND_CONNECTIONS)

return img

def findPosition(self, img, handNo=0, draw=True):
xList = []
yList = []
bbox = []
self.lmList = []
if self.results.multi_hand_landmarks:
myHand = self.results.multi_hand_landmarks[handNo]
for id, lm in enumerate(myHand.landmark):
# print(id, lm)
h, w, c = img.shape
cx, cy = int(lm.x * w), int(lm.y * h)
xList.append(cx)
yList.append(cy)
# print(id, cx, cy)
self.lmList.append([id, cx, cy])
if draw:
cv2.circle(img, (cx, cy), 5, (255, 0, 255), cv2.FILLED)

xmin, xmax = min(xList), max(xList)
ymin, ymax = min(yList), max(yList)
bbox = xmin, ymin, xmax, ymax

if draw:
cv2.rectangle(img, (xmin - 20, ymin - 20), (xmax + 20, ymax + 20),
(0, 255, 0), 2)

return self.lmList, bbox

def fingersUp(self):
fingers = []
# Thumb
if self.lmList[self.tipIds[0]][1] > self.lmList[self.tipIds[0] - 1][1]:
fingers.append(1)
else:
fingers.append(0)

# Fingers
for id in range(1, 5):

if self.lmList[self.tipIds[id]][2] < self.lmList[self.tipIds[id] - 2][2]:
fingers.append(1)
else:
fingers.append(0)

# totalFingers = fingers.count(1)

return fingers

def findDistance(self, p1, p2, img, draw=True,r=15, t=3):
x1, y1 = self.lmList[p1][1:]
x2, y2 = self.lmList[p2][1:]
cx, cy = (x1 + x2) // 2, (y1 + y2) // 2

if draw:
cv2.line(img, (x1, y1), (x2, y2), (255, 0, 255), t)
cv2.circle(img, (x1, y1), r, (255, 0, 255), cv2.FILLED)
cv2.circle(img, (x2, y2), r, (255, 0, 255), cv2.FILLED)
cv2.circle(img, (cx, cy), r, (0, 0, 255), cv2.FILLED)
length = math.hypot(x2 - x1, y2 - y1)

return length, img, [x1, y1, x2, y2, cx, cy]
def main():
pTime = 0
cTime = 0
cap = cv2.VideoCapture(0)
detector = handDetector()
while True:
success, img = cap.read()
img = detector.findHands(img)
lmList, bbox = detector.findPosition(img)
if len(lmList) != 0:
print(lmList[4])

cTime = time.time()
fps = 1 / (cTime - pTime)
pTime = cTime

cv2.putText(img, str(int(fps)), (10, 70), cv2.FONT_HERSHEY_PLAIN, 3,
(255, 0, 255), 3)

cv2.imshow("Image", img)

if cv2.waitKey(20) & 0xFF==ord('s'):
break
# cv2.waitKey(1)

if _name_ == "__main__":
main()

Ответить
Ahiad Hazan
Ahiad Hazan - 18.02.2023 01:21

i'm only 40 minutes in the course and WOW!
thank you very much!

Ответить
Mole Thi
Mole Thi - 14.02.2023 02:20

post code in comments

Ответить
Watchertube868
Watchertube868 - 31.01.2023 21:22

This is such a great course, my man just gave everyone the steps to a free working AI framework. That you can customize if you put your own time in. You sir deserve the recognition o7.

Ответить
Krishna Prakash
Krishna Prakash - 29.01.2023 19:59

What are prerequisites for this video can any one please tell me? If you know

Ответить
Divya Dhaipullay
Divya Dhaipullay - 29.01.2023 02:55

why do we get an error when we open the link to the code?

Ответить
MHSA MHSA
MHSA MHSA - 25.01.2023 20:36

Could you please gave me the code

Ответить
Purushottam Kumar
Purushottam Kumar - 25.01.2023 08:40

How can I download images for finger counter project ?

Ответить
Neki
Neki - 15.01.2023 13:20

For me, I install python 3.8.10 version again and uninstall my new version. It fix the error installing mediapipe. It helps you to keep going this courses. I don't know why python 3.11 doesn't work.

Ответить
Hồ Đình Triều
Hồ Đình Triều - 14.01.2023 11:39

ikd why I cant run the module properly even I extractly like yours, but when I import this module in another file then it still work well, its kinda confused for me

Ответить
The Blocklosted
The Blocklosted - 08.01.2023 12:24

If someone is having issues like "cannot find videocapture in ___in....bla bla"
Right click on Lib folder and mark directory as source

Ответить
Andrés Felipe Vargas Arboleda
Andrés Felipe Vargas Arboleda - 04.01.2023 19:51

Hi, i´m beginer in programation, bot your tutorial is very comprensive , thanks

Ответить
diToR
diToR - 04.01.2023 00:53

an error occurring while installing autopy
anybody facing this problem?

Ответить
RED0X
RED0X - 26.12.2022 03:01

How can ai be a thinker and creator?

Ответить