C34 | HOG Feature Vector Calculation | Computer Vision | Object Detection | EvODN

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024

Комментарии • 95

  • @Cogneethi
    @Cogneethi  5 лет назад +7

    If you found this tutorial useful, please share with your friends(WhatsApp/iMessageMessenger/WeChat/Line/Telegram) and on Social(LinkedIn/Quora/Reddit),
    Tag @cogneethi on twitter.com
    Let me know your feedback @ cogneethi.com/contact

    • @johanemerson307
      @johanemerson307 3 года назад

      sorry to be so offtopic but does anybody know a trick to log back into an Instagram account?
      I stupidly lost my password. I love any help you can give me!

  • @VasudevaK
    @VasudevaK 12 дней назад +1

    very nice clear explanation with examples

  • @nikronic
    @nikronic 5 лет назад +35

    Really clear explanation with numerical example which many tutorials lack of this important feature. Thank you

  • @muhammetkurt3512
    @muhammetkurt3512 4 года назад +3

    I am watching from Turkey and this is the best explanation. I am so appreciate because I found this channel

  • @vasanthc55
    @vasanthc55 Год назад

    Really this video help me to undestand the HOG feature vector claculation in a very simple manner in depth , Simply perfect.

  • @pallabidas3064
    @pallabidas3064 5 лет назад +2

    Best video on HOG feature descriptors. Thanks sir for sharing ur knowledge.

  • @varunc
    @varunc 4 года назад +5

    crisp, clear, to the point with neat diagrams.. thanks

  • @JohnSmith-pb7cn
    @JohnSmith-pb7cn 4 года назад +2

    Man, you are really cool in deep explanation of hog. Bravo.

  • @golden_infinity_harbinger8016
    @golden_infinity_harbinger8016 3 года назад

    Clear , crisp and precise explanation with excellent visualization .
    Thank you so much !!!

  • @yugpn6358
    @yugpn6358 3 года назад

    Thanks man...You really made consolidated computer vision course that explains all the things with simplicity

  • @antoups
    @antoups 5 месяцев назад

    best explanation so far!

  • @Marceloamado1998
    @Marceloamado1998 10 месяцев назад

    Thank you for the explanation, you are very good and clear in the way you express yourself.

  • @lam-thai-nguyen
    @lam-thai-nguyen 3 месяца назад

    thanks bro, now I think this field is so fun

  • @richadhiman585
    @richadhiman585 4 года назад +1

    Very clear excellent video with examples and detail description. Thank you.

  • @ahmadalghooneh2105
    @ahmadalghooneh2105 2 года назад

    Very thorough explaination!

  • @3PicPe0ple
    @3PicPe0ple 4 года назад +14

    Insane how this only has 2k views

    • @yugpn6358
      @yugpn6358 3 года назад

      seriously .... This guy made consolidated computer vision course that explains all the things with simplicity

    • @techtrader8434
      @techtrader8434 Год назад

      It's now 58k views

  • @rashariyad1821
    @rashariyad1821 3 года назад

    the best explanation ever

  • @sophalratitya6202
    @sophalratitya6202 Месяц назад

    amazing demonstration, i can understand .

  • @sreeharshaparuchuri6115
    @sreeharshaparuchuri6115 3 года назад +1

    So, a couple of questions (a great series though!)
    At 7:58, why aren't the gradient lines STRICTLY along the x or y direction (depending on the part of the arrow), why is there a slight tilt?
    At 5:34, what's the point of concatenating 4 9x1 feature vectors? An 8x8 patch is already a huge patch from which one can calculate the histogram. Also, this method of concatenation results in overlapping between windows (maybe this is alright as we would like to detect subtle changes) but if we didn't concatenate feature vectors, our image would be represented by only 8 * 16 * 9 = 1152 numbers, thus, saving a lot of compute power.
    I hope that i've asked my questions clearly enough.

  • @ShaidaMuhammad
    @ShaidaMuhammad 4 года назад +3

    God. you should be my ML teacher.

  • @yoyocr2034
    @yoyocr2034 3 года назад +1

    concise and clear... grazzie

  • @Banditpundit08
    @Banditpundit08 4 года назад +1

    Nice and clear explanation, thank you!!

  • @janosbagi8432
    @janosbagi8432 4 года назад +1

    Very nice explanation. Thank you very much !

  • @sidharthbabu4709
    @sidharthbabu4709 4 года назад +1

    this is a good explanation to hear

  • @mailoisback
    @mailoisback 4 года назад +4

    Thanks for the video! At 08:15 you say that when we transition from white to black, the change in gradient magnitude is along the x-direction. But isn't it changing in y-direction? I think that in the hog visualization we see the orientations of edges, not the gradients (which are perpendicular to edges).

    • @Cogneethi
      @Cogneethi  4 года назад

      Yes you are right!. Its a mistake. Glad that you pointed out.

  • @kinsung85
    @kinsung85 3 года назад +1

    For the 8*8 matrix in each cell/grid, you calculate the gradient magnitude and gradient direction. There will be missing values at the edge of the calculation. What numbers to fill in for the pixels value at the edge?

  • @sarvagyasinghs
    @sarvagyasinghs 2 месяца назад

    loved the tutorial...

  • @mdiftekherhossain6152
    @mdiftekherhossain6152 4 года назад +1

    great explanation.Thanks!

  • @annie157
    @annie157 3 года назад

    Ohhhhhhhhhhh man Thank you so much for such a great explanation... I have paid for udemy course but the teacher sucks he didn't even know how to teach and he is taking his salary for no reason.

  • @keshavmaheshwari521
    @keshavmaheshwari521 Год назад

    ase pada rai ho jesa bachpan se sikh ke ai hai

  • @ExploreElectronics
    @ExploreElectronics 3 года назад

    good explanation

  • @hemantpurswaniAI
    @hemantpurswaniAI 3 месяца назад +1

    grad direction will be tan inverse (50/30)?

  • @worldnaturewithnaturalbeau9042
    @worldnaturewithnaturalbeau9042 4 года назад

    Great Video, just keep it up!

  • @chandraprakash934
    @chandraprakash934 Год назад +1

    1:35 Why grad direction tan-1(30/50) and not tan-1(50/30) ? It should be y/x right ?

  • @vijayalaxmiise1504
    @vijayalaxmiise1504 4 месяца назад

    Deep🙏 Explanation

  • @somdubey5436
    @somdubey5436 4 года назад +4

    Hi. Thanks for such an informative video. I have a small question, shouldn't the Gradient direction be tan^(-1)(y/x), or tan^(-1)(50/30) instead of tan^(-1)(30/50) !!

    • @Cogneethi
      @Cogneethi  4 года назад

      Yes, some mistakes in the calculation and explanation. I have answered this in some of the comments. Thank you for pointing out the mistakes.

    • @somdubey5436
      @somdubey5436 4 года назад

      @@Cogneethi vedio content is really helpful. I will not call the thing that i pointed as mistake, it is just a small thing we tend to miss while creating such a beautiful deliverable. Thanks for sharing.

    • @Cogneethi
      @Cogneethi  4 года назад +2

      @@somdubey5436 Hey, no hard feelings here. I am also learning a lot from the comments. Please do point out any others that you might come across. It will benefit other viewers too. :)

    • @somdubey5436
      @somdubey5436 4 года назад

      @@Cogneethi ya sure :)

  • @ani7453
    @ani7453 Год назад

    thanks bro, helps a lot!!

  • @khabarsilva6850
    @khabarsilva6850 4 года назад

    Nice explanation 👌

  • @praveensoni1119
    @praveensoni1119 2 года назад +2

    Clear-cut explanation. Why college professors don't teach like that lol

  • @julianzausch7895
    @julianzausch7895 4 года назад +1

    Great Video. But how you get a range of 0 - 180 if you take only absolute values in arctan. In my opinion arctan shows only 0 - 90 degree for positive values?

    • @Cogneethi
      @Cogneethi  4 года назад

      Hey, you are right. I have answered this is another comment to "Derric". Can you please see the discussion.

  • @QuintusAndreus
    @QuintusAndreus 4 года назад +1

    Very clear thank you

  • @anu9649
    @anu9649 3 года назад

    Awesome 😍😍😍

  • @sadikulhaquesadi6003
    @sadikulhaquesadi6003 2 года назад

    It was helpful...

  • @afraibrahim257
    @afraibrahim257 4 года назад +1

    Hey, I have a doubt... we are doing the Gradient magnitude segregation into 9 bins which are in the range of 0-180 degrees, but the pictorial representation shows magnitudes up to 360... How do we arrive at that representation??

    • @Cogneethi
      @Cogneethi  4 года назад +3

      Hey, the pictorial representation is wrong. Sorry for that.
      More info:
      Supposedly, the authors got better results by using unsigned gradients (0-180) than signed (0-360).
      www.learnopencv.com/histogram-of-oriented-gradients/
      lilianweng.github.io/lil-log/2017/10/29/object-recognition-for-dummies-part-1.html
      devanginiblog.wordpress.com/2016/05/10/hog-histogram-of-gradients/

  • @NH-gl8do
    @NH-gl8do 4 года назад

    Thank you so much for your explanation, please when we have the histogram, how is the transition from having one histogram to the image of 'histogram of oriented gradients ', and pelase do you have any resources concerning local ternary pattern

    • @Cogneethi
      @Cogneethi  4 года назад

      I might have covered this here: ruclips.net/video/Qwc3a8cOKRU/видео.html
      And I dont know about ternary pattern

  • @christersantos4035
    @christersantos4035 4 года назад

    Great explanation overall! I have a question though: does this also involve image pyramid, sliding window and non-maximum suppression in actual implementation?

    • @Cogneethi
      @Cogneethi  4 года назад +1

      image pyramid yes
      sliding window yes.
      nms yes.
      you can try sklearn library for hog feature extraction.

    • @Cogneethi
      @Cogneethi  4 года назад

      Hey, my bad. I was thinking of something else. Does use image pyramid.
      Please see the next few videos in the playlist to know more.

  • @sumairamushtaq3145
    @sumairamushtaq3145 2 года назад

    What if you have a whole data set to extract?

  • @frankwxu
    @frankwxu 4 года назад +1

    arctan range is 0-180 and also should be arctan(y/x), not arctan(x/y)

  • @monasaz4337
    @monasaz4337 4 года назад

    thank you sir

  • @islamtouahri5802
    @islamtouahri5802 4 года назад +1

    hi there
    I m trying to write algorithm to extract HOG feature from images ,
    so all the calculation of HOG method i understood very well thank to you bro
    but i have one probleme it s makes me crazy
    when i import images i have array of multi-Dem so I can't apply HOG method on it
    (you used in ur example array of 2D)
    so How i can change image array of multiDem to array of 2D
    and thanks for help

    • @Cogneethi
      @Cogneethi  4 года назад +1

      option 1: You can keep it simple and convert the image to grayscale and calculate the HOG features: scikit-image.org/docs/dev/auto_examples/color_exposure/plot_rgb_to_gray.html
      Options 2: Calculate Gradient magnitude and direction for the 3 channels (RGB) seperately. Then, for each pixel, pick those channel value with the maximum change in gradient magnitude:
      This is what seems to have done here: github.com/scikit-image/scikit-image/blob/17e4487883a38ad6c8f83c83b60ff37f93cc1bce/skimage/feature/_hog.py
      Please let me know if you have any other doubts.

    • @islamtouahri5802
      @islamtouahri5802 4 года назад

      Cogneethi can we apply HOG method on colored image without turning it into gray image????

    • @Cogneethi
      @Cogneethi  4 года назад +1

      yes, I have mentioned the technique in option 2 - that is without converting to gray

    • @islamtouahri5802
      @islamtouahri5802 4 года назад

      @@Cogneethi i can't find ( option 2 ) would u send link of this video
      thanks again for helping !

    • @Cogneethi
      @Cogneethi  4 года назад +1

      Hey, code for option 2 is there in the 2nd link in the comment. You can refer it for your implementation.
      I havent made a video for the coding part.

  • @ahmadnaufal2105
    @ahmadnaufal2105 4 года назад

    thank you so much for the explanation. but i have a question, why we should resize the image resolution to 64x128? can we do with the original size?

    • @Cogneethi
      @Cogneethi  4 года назад +1

      This 64x128 dimension was used in the original HOG paper to detect pedestrians. The dataset they used had around 1805 images of humans cropped in 64x128 patches.
      In reality there is no such constraint. You can have images of any size.
      Sorry for the confusion, I should have mentioned this in the video.
      Thanks for pointing this out.

  • @md.arifurrahman6254
    @md.arifurrahman6254 5 лет назад

    9 Column, 1 row

  • @hamzanaeem4838
    @hamzanaeem4838 3 года назад

    These features are scale or rotation invariant ?

    • @Cogneethi
      @Cogneethi  3 года назад

      No, they are not scale or rot invariant

    • @hamzanaeem4838
      @hamzanaeem4838 3 года назад

      Then if i trained the features of Hog of images . If in future test image will be rotated or some affect in scale . It will incorrectly classify .
      How scale and rotation invariance achieve in HOG

    • @Cogneethi
      @Cogneethi  3 года назад

      @@hamzanaeem4838 HOG may not be best fit for this case. Instead you can try other feature descriptors as mentioned here: dsp.stackexchange.com/a/1642
      Honestly, I never had a chance to apply/use these for any of my projects. So, I may not be the best person to answer this with conviction.

  • @ms.keerthanabcnmamitcse3448
    @ms.keerthanabcnmamitcse3448 4 года назад

    Dear Sir,
    I have a doubt. I a unable to understand theoretically how finally we get the outline of the shape of the object? how those white dots in the output are plotted? My doubt might sound very silly but i request you to clarify my doubt

    • @Cogneethi
      @Cogneethi  4 года назад +1

      Hey, those outputs are got from HOG. I have explained it in the previous videos: ruclips.net/video/Qwc3a8cOKRU/видео.html
      Or you can watch from beginning: ruclips.net/video/5YLn5i_qkTI/видео.html
      Once we get the HOG output. We train a SVM classifier to detect such patterns.
      Basically, if we have images of people standing, then the HOG output will all look similar.
      And the SVM Classifier will be able to identify such patterns.
      But of course, if you feed an image of person sitting, then the HOG output pattern will be different and the SVM Classifier may not be able to detect it.
      So, to build such generic detectors, we can use CNNs which act as much better feature extractors.
      Let me know if I need to elaborate.

    • @ms.keerthanabcnmamitcse3448
      @ms.keerthanabcnmamitcse3448 4 года назад

      @@Cogneethi Dear Sir,
      Thanks a lot for your response.
      With which dataset or what data is used to train svm? I mean svm classifier needs to be trained with hog output so that next time when a new hog output is fed as input to svm, it classifies yes or no?
      Kindly respond

    • @Cogneethi
      @Cogneethi  4 года назад +1

      @@ms.keerthanabcnmamitcse3448 pascal.inrialpes.fr/data/human/

    • @ms.keerthanabcnmamitcse3448
      @ms.keerthanabcnmamitcse3448 4 года назад

      @@Cogneethi sir thanks a lot for your timely response.

  • @nidatasneem1792
    @nidatasneem1792 Год назад

    amazingggggggggggggggggggggg

  • @امنهطه-ع7ق
    @امنهطه-ع7ق 3 года назад

    Pleas sir I wanted code for image splicing detection

  • @TheGaneshshow
    @TheGaneshshow 4 года назад +1

    How to resize from 150 * 300 to 64*128?

    • @Cogneethi
      @Cogneethi  4 года назад

      any standard image library will do. check python PIL. Even pytorch has it i guess.

    • @TheGaneshshow
      @TheGaneshshow 4 года назад

      @@Cogneethi ohhh! Thank you very much.

  • @abdurrahimderric1568
    @abdurrahimderric1568 4 года назад

    nice explanation, why is is 180 and not 360!!

    • @Cogneethi
      @Cogneethi  4 года назад +1

      Hey good question, I never got that doubt. I only checked now.
      Supposedly, the authors got better results by using unsigned gradients (0-180) than signed (0-360).
      arctan(x) of any number is between -90 to 90. So, they must be shifting this to 0-180* range.
      www.learnopencv.com/histogram-of-oriented-gradients/
      lilianweng.github.io/lil-log/2017/10/29/object-recognition-for-dummies-part-1.html
      devanginiblog.wordpress.com/2016/05/10/hog-histogram-of-gradients/
      Thanks for the asking.

    • @simoneserafini7917
      @simoneserafini7917 4 года назад +2

      @@Cogneethii have a question, x direction and y direction are absolute value so they are only positive numbers, arctan(x) is from 0 to 90 for x positive values and -90 to 0 for negative x values. That means that the direction can only go from 0-90. Am i worng or there is something wrong in the video?

    • @Cogneethi
      @Cogneethi  4 года назад +1

      @@simoneserafini7917 Hey, error in video. It is not absolute value.
      We do need to consider the sign. That way, we will get the direction correctly between -90 to 90. Then it is probably shifted to 0 to 180 range.
      While calculating magnitue, the sign gets cancelled out due to the square.
      Thanks for pointing out the mistake.

  • @vikramsandu6054
    @vikramsandu6054 2 года назад

    Very well explained. Thank you so much.