<jupyter_start><jupyter_text>Imports<jupyter_code>import cv2
import cvlib as cv
from cvlib.object_detection import draw_bbox
from IPython.display import Image, display<jupyter_output><empty_output><jupyter_text>File Name<jupyter_code>FILE_NAME = "image.jpeg"
OUT_FILE_NAME = "image-out.jpeg"<jupyter_output><empty_output><jupyter_text>Display Image<jupyter_code>display(Image(FILE_NAME, width = 700, height = 300))<jupyter_output><empty_output><jupyter_text>Detect Objects<jupyter_code>img = cv2.imread(FILE_NAME)
bbox, label, conf = cv.detect_common_objects(img, confidence=0.6, model="yolov3-tiny")
for l, c in zip(label, conf):
    print(f"Detected object: {l} with confidence level of {c}n")<jupyter_output><jupyter_text>Output Image with Bounding Box<jupyter_code>output_image = draw_bbox(img, bbox, label, conf)
cv2.imwrite(OUT_FILE_NAME, output_image)
display(Image(OUT_FILE_NAME, width = 700, height = 300))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1164021164021164, 'fraction_numerical': 0.01904761904761905, 'mean_word_length': 10.261904761904763, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '582800', 'license': 'Apache-2.0', 'n_tokens_mistral': 378, 'n_tokens_neox': 358, 'n_words': 61, 'path': 'cvlib_notebook.ipynb', 'repo_name': 'bhattbhavesh91/cvlib-tutorial', 'size': '945'}