AcurusTrack icon indicating copy to clipboard operation
AcurusTrack copied to clipboard

ZeroDivisionError: division by zero

Open Tetsujinfr opened this issue 4 years ago • 4 comments

hi

I am processing a 4minutes video with many people appearing overtime, say about 200 or so. While running the people_demo (replaced the demo video by the 4 minutes 38secs video (6942 frames), I did run my own face detector, did recompute the homography dict sucessfully, etc), all was running fine but all a sudden I got this error after some processing:

... ... INFO:root:change track {'current': [3252, 3283], 'new': [3287]} INFO:root:ratio {('center_x', 'center_y'): 1.333521432163324e-74} INFO:root:change track {'current': [3252, 3283], 'new': [3287]} multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/usr/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "/content/AcurusTrack/pipeline.py", line 297, in window_processing wind_obj.algo_iteration() File "/content/AcurusTrack/track/tracker.py", line 73, in algo_iteration self.internal_loop() File "/content/AcurusTrack/track/tracker_merger.py", line 75, in internal_loop accepted_count = self.acc_obj.analyse_acceptance(self.change_track) File "/content/AcurusTrack/track/tracker.py", line 288, in analyse_acceptance self.curr_acceptance = self.get_acceptance(change_track) File "/content/AcurusTrack/track/tracker.py", line 322, in get_acceptance ratio = self.compute_ratio(pair, change_track) File "/content/AcurusTrack/track/tracker.py", line 385, in compute_ratio lkls_ratio = self.likelihoods_multiplication(lkls_new_diff_curr, lkls_curr_diff_new) File "/content/AcurusTrack/track/tracker.py", line 350, in likelihoods_multiplication power = values / len(curr_diff_new) ZeroDivisionError: division by zero """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "./examples/people_in_masks_demo/people_in_masks_demo.py", line 85, in algorithm.run_analyser() File "/content/AcurusTrack/pipeline.py", line 154, in run_analyser final_meta_dict, hom = self.get_meta() File "/content/AcurusTrack/pipeline.py", line 57, in decorator meta, hom = func(ref) File "/content/AcurusTrack/pipeline.py", line 68, in decorator meta, homography_dict = func(ref) File "/content/AcurusTrack/pipeline.py", line 148, in get_meta final_meta = self.analysis() File "/content/AcurusTrack/pipeline.py", line 82, in decorator meta = func(ref) File "/content/AcurusTrack/pipeline.py", line 135, in analysis self.process_windows_separately() File "/content/AcurusTrack/pipeline.py", line 234, in process_windows_separately pool.starmap(window_processing, self.wind_objects) File "/usr/lib/python3.7/multiprocessing/pool.py", line 276, in starmap return self._map_async(func, iterable, starmapstar, chunksize).get() File "/usr/lib/python3.7/multiprocessing/pool.py", line 657, in get raise self._value ZeroDivisionError: division by zero

Do you know what that comes from? Can this happen if no object is detect on a given frame or something like that? Can it be caused by the length of the video? For reference the video can be found here

thanks for your help

Tetsujinfr avatar Sep 04 '21 00:09 Tetsujinfr

Hi! Thanks for the provided results! Our team will be checking it soon. We'll get back to you with a reply.

vishneuskaja avatar Sep 06 '21 08:09 vishneuskaja

Let me attach the input files I used which did trigger the error, hopefully that may ease your investigation.

https://user-images.githubusercontent.com/29961693/132199705-79636886-9a30-4240-8de0-4e6d53307dd4.mp4

input_video_1080p_detections.json.txt

Tetsujinfr avatar Sep 06 '21 10:09 Tetsujinfr

hi, any update on this issue? thanks

Tetsujinfr avatar Sep 18 '21 14:09 Tetsujinfr

hi did you have a chance to replicate the issue / find a fix? thanks

Tetsujinfr avatar Oct 06 '21 13:10 Tetsujinfr