ChargedMonk/Social-Distancing-using-YOLOv5

Question

SamiurRahman1 opened this issue · 1 comments

Hello, thank you for your cool repo. I just had a couple of questions,

  1. How did you calculate the distance between two persons? Did you use bird-eye view? Or only the pixel distance was calculated?
  2. Can we change the distance threshold value somehow?

Thanks

Sorry for replying so late,

  1. I used euclidean distance between the centres of people (all in pixels). Yes, I used the bird-eye view.
  2. Yes, we can change the thresholds for both yellow level warning and red level warnings by passing the thresholds to the function distancing on line 111 of detect.py - distancing(people_coords, im0, dist_thres_lim=(200,250)).