Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroDivisionError: float divmod() #8

Open
Ishan-10038 opened this issue Mar 15, 2022 · 1 comment
Open

ZeroDivisionError: float divmod() #8

Ishan-10038 opened this issue Mar 15, 2022 · 1 comment

Comments

@Ishan-10038
Copy link

Dear Author,
When I run the last part of the code from frame import FRAME

file_path = "./videos/nice_road.mp4"# <== Upload appropriate file
video_out = "videos/output11.mov"
frame = FRAME(
ego_vehicle_offset = .0, # offset for self vehicle in frame
yellow_lower = np.uint8([ 20, 50, 110]), # LOWER YELLOW HLS THRESHOLD
yellow_upper = np.uint8([35, 255, 255]), # UPER YELLOW HLS THRESHOLD
white_lower = np.uint8([ 0, 140, 0]), # LOWER WHITE THRESHOLD
white_upper = np.uint8([180, 255, 100]), # UPPER WHITE THRESHOLD
lum_factor = 110, # NORMALIZING LUM FACTOR
max_gap_th = 0.45, # MAX GAP THRESHOLD
YOLO_PERIOD = 2, # YOLO PERIOD
lane_start=[0.2,0.5] , # LANE INITIATION
verbose = 3) # VERBOSITY
frame.process_video(file_path, 2,video_out = video_out,pers_frame_time =398, t0 =398 , t1 =698)#None) , I am getting the following error: "ZeroDivisionError Traceback (most recent call last)
in ()
14 lane_start=[0.2,0.5] , # LANE INITIATION
15 verbose = 3) # VERBOSITY
---> 16 frame.process_video(file_path, 2,video_out = video_out,pers_frame_time =398, t0 =398 , t1 =698)#None)

/content/drive/MyDrive/copilot/frame.py in process_video(self, file_path, fps_factor, video_out, pers_frame_time, t0, t1)
232 frame_h_out = int(frame_h*(1-self.ego_vehicle_offset))
233 print("{:s} WIDTH {:d} HEIGHT {:d} FPS {:.2f} DUR {:.1f} s".format(
--> 234 file_path,frame_w,frame_h,fps_actual,nb_frames//fps_actual
235 ))
236

ZeroDivisionError: float divmod()". Kindly help me out in the same.

@KhushiKV
Copy link

Instead of the line: file_path = "./videos/nice_road.mp4"
Use: file_path = "./videos/nice_road"

This solved the error for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants