<jupyter_start><jupyter_text>Bus Detection<jupyter_code>import cv2
cap = cv2.VideoCapture('bus1.mp4')

bus_cascade = cv2.CascadeClassifier('Bus_front.xml')
while True:
    ret, img = cap.read()
   
    if (type(img) == type(None)):
        break
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    
    bus = bus_cascade.detectMultiScale(gray, 1.1, 2)


    for (x,y,w,h) in bus:
        cv2.rectangle(img,(x,y),(x+w,y+h),(0,255,255),2)
    
    cv2.imshow('video', img)
   
    
    if cv2.waitKey(33) == 27:
        break

cv2.destroyAllWindows()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15889464594127806, 'fraction_numerical': 0.046632124352331605, 'mean_word_length': 3.328358208955224, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '198587', 'license': 'MIT', 'n_tokens_mistral': 259, 'n_tokens_neox': 244, 'n_words': 35, 'path': 'Vehicles and Pedestrian Detection/Bus Detection/bus.ipynb', 'repo_name': 'kaustavr19/Hands-on-ML-Basic-to-Advance-', 'size': '579'}