AI on the Jetson Nano LESSON 45: Understanding Python Functions, Classes, Methods and Threading

  Рет қаралды 8,317

Paul McWhorter

Paul McWhorter

Күн бұрын

Пікірлер: 50
@HA-wo3we
@HA-wo3we Жыл бұрын
love your quick snappy jokes. Also love the fact you start the lesson by recapping the important info from previous lesson. This is surely the sign of a good teacher, thanks.
@opalprestonshirley1700
@opalprestonshirley1700 4 жыл бұрын
You sure can make confusing subjects easier to understand never dry and boring. Very enjoyable lesson. Have a great weekend.
@ecassar1975
@ecassar1975 4 жыл бұрын
Great lesson. I've been ages trying to understand what was happening in codes written by others, without much success, but now it all makes a lot of sense. It amazes me how you manage to simplify things so much with the examples you use in your tutorials. You are an ace. Thanks a lot for your time and dedication.
@sanfinity_
@sanfinity_ 3 жыл бұрын
Great lesson very nicely explained sir. The way of making mistakes and rectifying them is what most of the courses and youtube tutorials lag and thats where Paul McWhorter sir leads.
@nielsroetert
@nielsroetert 3 жыл бұрын
All these lessons building up to this, so much cool stuff being introduced in this one, love how you're keeping it real and show that things don't always work as expected or what seems logical in our heads. On to the next lessons, after doing my homework that is.
@paulmcwhorter
@paulmcwhorter 3 жыл бұрын
More to come!
@ricardobjorkeheim775
@ricardobjorkeheim775 3 жыл бұрын
Thank you Paul, the Threading part was great!
@vaughntaylor2855
@vaughntaylor2855 3 жыл бұрын
Really appreciate the lesson Paul! Excellent work explaining classes!!!!
@paulmcwhorter
@paulmcwhorter 3 жыл бұрын
Glad it was helpful!
@r1rmndz507
@r1rmndz507 3 жыл бұрын
I always get confuse with classes and methods but you have explained it very well! Thanks
@paulmcwhorter
@paulmcwhorter 3 жыл бұрын
Glad to hear that!
@paulsavage4409
@paulsavage4409 4 жыл бұрын
Regarding the args=()...The args parameter takes a tuple. If you want to specify a tuple with one element, you must add the comma e.g., (var,) otherwise Python does not know it's a single-element tuple. If you are passing more than one element in the tuple you don't need the extra comma, as Python can identify that you are specifying a tuple.
@paulmcwhorter
@paulmcwhorter 4 жыл бұрын
Thanks for the explanation. It is unusual to ever see a dangling comma, but your explanation makes sense
@quaternion-pi
@quaternion-pi 4 жыл бұрын
If you pass a list instead of a tuple to args, you don't need the dangling comma => args=[some_arg]
@mohamadn6116
@mohamadn6116 4 жыл бұрын
Thanks for the explanation. I found this on the net to dive a little deeper: # Unwanted result: single_tuple_error = (0) print(single_tuple_error) print(type(single_tuple_error)) # 0 # . It thinks it is an int! # What we want single_tuple = (0, ) print(single_tuple) print(type(single_tuple)) # (0,) #
@boxertwo
@boxertwo 4 жыл бұрын
Enjoying this stuff greatly!! Tried threading a while back and it was agonizing. Now I see it more clearly!!
@marksholcomb
@marksholcomb 3 жыл бұрын
Not being a Pro programmer, I have never fully understood Classes but this lesson helps clarify . Thanks. wonderful lesson.
@Mircea007
@Mircea007 3 жыл бұрын
Hi Paul, Wow, this is so exciting, running pieces of code in parallel and not rely on the while loop order.
@fptechreviews6394
@fptechreviews6394 4 жыл бұрын
This is next level programming what they fail to teach you properly. Thank you Mr McWhorter.
@ThuongPham-wg4bc
@ThuongPham-wg4bc 2 жыл бұрын
Thank you. You made the complicated things clearly
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
Glad it helped!
@epixexplorations
@epixexplorations 4 жыл бұрын
excellent lesson really enjoyed this one.
@MuhammadAhmad096
@MuhammadAhmad096 3 жыл бұрын
The comma problem at 1:08:00 is because if we write (x), python automatically sees it as x. The comma is necessary so that python sees it as a tuple. (x , ) makes it a tuple with no second entry.
@pralaymajumdar7822
@pralaymajumdar7822 4 жыл бұрын
Extraordinary lesson.
@paulmeistrell1726
@paulmeistrell1726 3 жыл бұрын
Well done Paul, interesting concepts delivered gently. ....I think the early morning thing affected your typing.....(
@eranfeit
@eranfeit 3 жыл бұрын
Thank you for your wonderful lesson
@bhavinpithawala3967
@bhavinpithawala3967 3 жыл бұрын
you were right never ever edit out those mistake and debugging.. its impossible to code without those error.... thanks for sharing videos. still i feel refreshing to watch basics video after 15 years in programming . i just love coding..
@everythingrobotics
@everythingrobotics 3 жыл бұрын
The threading part is really interesting. Maybe we can split the lists of image files taken from 'known' folder and get all encodings via threading. I'll try it.
@CodingScientist
@CodingScientist 4 жыл бұрын
Great lesson Paul
@wishicouldarduino8880
@wishicouldarduino8880 4 жыл бұрын
This stuff is tuff ! But I love it !even though I can't do that much compared to what I knew then and what I know now is almost night and day. I'm better at c sharp but I'm learning python more now ! And the beauty is ros uses both simultaneously ! 👍
@markshepherd9942
@markshepherd9942 4 жыл бұрын
Thanks Paul, another great one. both my Pi cameras are working , but out of sync like yours. I've caught up! Can't wait for the next one, I will go and revise my functions and classes. Stay safe, I'm still locked down in London.
@markshepherd9942
@markshepherd9942 4 жыл бұрын
I haven’t time travelled, this comment was meant for the previous lesson. See you on Sat
@markomatesic5394
@markomatesic5394 4 жыл бұрын
Great lesson Paul, as always. Is it possible to use threading with single Pi camera to spread the frame grabbing and processing load to more than one thread? Is this even feasible (do we benefit in anything) and will there be a lesson on that in the future?
@anthonybrigandi5653
@anthonybrigandi5653 4 жыл бұрын
Great stuff
@wayneswan3092
@wayneswan3092 3 жыл бұрын
I feel like we should have been been learning how to code like this from the beginning. While I understand the concepts, and the similarities between this way and the old way, I feel like I'm going to need a lot more lessons to really get this down. It's like learning an almost completely different coding language to me.
@Bob-zg2zf
@Bob-zg2zf 4 жыл бұрын
👍🏻 You dah man, Paul. I wish the coding were done in C++.
@keithemerson9349
@keithemerson9349 4 жыл бұрын
Great lesson!! Takes the mystery out of classes and threading. I really want to use threading.By the way. I was running two web cams and got a poor frame rate. Raspi cam + webcam and frame rate was even better than yours! Guess it depends on either frame size/res/ rate for each camera
@paulmcwhorter
@paulmcwhorter 4 жыл бұрын
definitely. If using a webcam, use the cv2.set command to set the frame size as if you dont do that no telling what you are getting. Also, make sure to call using /dev/video1 insteat of just '1'. Somewhere along the way that changed.
@אלימאיר-ו7ק
@אלימאיר-ו7ק 3 жыл бұрын
Thank you Paul, I get import error "cannot import nam Thread". what should i do ?
@אלימאיר-ו7ק
@אלימאיר-ו7ק 3 жыл бұрын
Solved: upgraded Python from 3.6 to 3.9
@keithemerson9349
@keithemerson9349 4 жыл бұрын
Hi Paul,Went back to jetpack 4.3 but still not getting the frame rates you are with two cameras ??
@RafeHarrison
@RafeHarrison 4 жыл бұрын
do a tour of your workbench
@paulmcwhorter
@paulmcwhorter 4 жыл бұрын
It is ugly. You dont want to see it. Believe me, not neat
@Bob-zg2zf
@Bob-zg2zf 4 жыл бұрын
OOP features = inheritance, encapsulation, polymorphisim. Class is of data encapsulation. 😘
@AlanHeigl
@AlanHeigl 4 жыл бұрын
we are adding turbo for our engine
@MechDickel
@MechDickel 4 жыл бұрын
Thinking about a Jetson Nano for my robot dog...
@chutchinson01450
@chutchinson01450 4 жыл бұрын
June seems kinda far out lol
@paulmcwhorter
@paulmcwhorter 4 жыл бұрын
I know. The natives are growing restless. The latest lessons I am doing are really cool. The thing is the material is really in depth, and takes me a long time to put together.
@chutchinson01450
@chutchinson01450 4 жыл бұрын
Paul McWhorter ill just trust you to keep doing the good work then :)
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 77 МЛН
Jetson Nano Developer Kit - Getting Started with the NVIDIA Jetson Nano
24:57
Natural Language Processing with spaCy & Python - Course for Beginners
3:02:33
12 New AI Projects using Raspberry-Pi, Jetson Nano & more
7:50
ToP Projects Compilation
Рет қаралды 818 М.
Learn Prompt Engineering: Full Beginner Crash Course (5 HOURS!)
4:57:00
Zero To Mastery
Рет қаралды 25 М.
Understanding AI from Scratch - Neural Networks Course
3:44:18
freeCodeCamp.org
Рет қаралды 459 М.
Real-Time Object Detection in 10 Lines of Python Code on Jetson Nano
26:18
AI on the Jetson Nano LESSON 1: Getting Started for Absolute Beginners
1:25:24
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 77 МЛН