Crowd Survilliance Heat Map
Crowd Survilliance Heat Map
while cap.isOpened():
ret, frame = cap.read()
if not ret:
break
What This Does:
✔ Reads each frame from the video
✔ If no more frames, it exits the loop
with torch.no_grad():
density_map = model(input_tensor)
crowd_count = density_map.sum().item()
out.write(overlay)
time.sleep(0.2)
clear_output(wait=True)