IvLabs/person_following_bot

Usage of Gaussian Filter

Closed this issue · 1 comments

In your paper, you've mentioned this: "How-ever, the depth contains a lot of noise and hence just selecting a single pixel toestimate depth can lead to a highly noisy estimate of depth. To overcome thisproblem, we considered a region of size 50×50 pixel in the center of the trackingwindow(100×100 pixel)."

However, in the code, if tracking is successful, depth is still extracted at the centroid:

`

			calc_x, calc_z = (x+w/2), depth_frame.get_distance(x+w//2, y+h//2)

`

Moreover, I do not see how the get_smoother function is being used:

`

				curr_dist = get_smoother(depth_frame, i)
				distance_list.append(curr_dist)	
				if 1 < curr_dist < 8:
					person_in_range.append(i)
					#yolo_box.remove(i)
					# print('distance : {:4.2f}'.format(curr_dist))`

person_in_range.append(i) - what is this line doing? After appending the YOLO's bounding box, this doesn't seem to be used anywhere?

Am I missing something? Would help if you could clarify these discrepancies. Thanks

Using an averaging filter generally gives higher accuracy; however, applying it is specific to the use case. For the use case we tested our algorithm, directly using the depth of the bounding box's center worked absolutely fine, so we did not include it in the code. This helps in reducing one hyperparameter (filter window size). You can feel free to try both approaches, and use the one that works best for you.

As far as person_in_range.append(i) is considered, it's redundant code. Thank you for pointing it. We'll remove it in the next commit. The get_smoother function is designed to apply a Gaussian filter around the query point to get a more accurate estimate of the depth.

I'm closing this issue. Should you have any further questions, feel free to re-open.