<jupyter_start><jupyter_text>Predicting on the validation dataset<jupyter_code># Validation set is the 10% of the image_data
scores, boxes, classes, model_body, input_image_shape = load_yolo(model_body, class_names, anchors)
# Predicting the classes and box coordinates for the input image
draw(model_body, scores, boxes, classes,input_image_shape, image_data, image_set='val',save_all=False)<jupyter_output><empty_output><jupyter_text>Object Detection on test image data<jupyter_code># Loading the path of the test data
test = glob('data/test/*.jpg')
# Reading and storing the test image data
test_data = []
for i in test:
    test_data.append(plt.imread(i))
# Processing the test image data 
test_data = process_data(test_data)
# Predicting the scores, boxes, classes for the given input image
scores, boxes, classes, model_body, input_image_shape = load_yolo(model_body, class_names, anchors)
# Drawing the bounding boxes
draw(model_body, scores, boxes, classes,input_image_shape, test_data, image_set='all', out_path='data/test/output/',save_all=False)<jupyter_output><empty_output><jupyter_text>Real-Time Object Detection<jupyter_code>#Path of the stored video file
videopath = 'data/real_time/bdd-videos-sample.mp4'
scores, boxes, classes, model_body, input_image_shape = load_yolo(model_body, class_names, anchors)
vc = cv2.VideoCapture(videopath)
while(True):
    check, frame = vc.read()
    frame = process_data(np.expand_dims(frame, axis=0))
    img_data = draw(model_body, scores, boxes, classes, input_image_shape, frame, image_set='real', save_all=False, real_time=True)
    img_data = np.array(img_data)
    cv2.imshow('Capture:', img_data)
    key = cv2.waitKey(1)
    if key == ord('q'):
        break
vc.release()
cv2.destroyAllWindows()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10756302521008404, 'fraction_numerical': 0.005042016806722689, 'mean_word_length': 6.731601731601732, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '292810', 'license': 'MIT', 'n_tokens_mistral': 617, 'n_tokens_neox': 596, 'n_words': 148, 'path': 'object-detection-using-yolo-master/model/Train Model - YOLOv2.ipynb', 'repo_name': 'pranshuprakashpandey/Object-Detection-Model-Using-CNN', 'size': '1785'}