@jakaskerl ,
Where do I change the SpatialDetectionNetwork for DetectionNetwork? Should this be in my main.py or my distance.py files? I was looking around to see if I could find the placement or where the DetectionNetwork is but could not locate them. Is the code below the code that should be replaced to calculate back to me?
def calc_x(self, val):
norm = min(self.max_x, max(val, self.min_x))
center = (norm - self.min_x) / (self.max_x - self.min_x) * self.distance_bird_frame.shape[1]
bottom_x = max(center - 2, 0)
top_x = min(center + 2, self.distance_bird_frame.shape[1])
return int(bottom_x), int(top_x)
def calc_z(self, val): norm = min(self.max_z, max(val, self.min_z)) center = (1 - (norm - self.min_z) / (self.max_z - self.min_z)) * self.distance_bird_frame.shape[0] bottom_z = max(center - 2, 0) top_z = min(center + 2, self.distance_bird_frame.shape[0]) return int(bottom_z), int(top_z)