<jupyter_start><jupyter_text><jupyter_code>!python3 -m pip install opencv-python
import cv2 as cv
!curl -o car.jpeg https://imgd.aeplcdn.com/0x0/n/cw/ec/27032/s60-exterior-right-front-three-quarter-3.jpeg
!pwd

!curl -o DenseNet_201.prototxt https://raw.githubusercontent.com/shicai/DenseNet-Caffe/a68651c0b91d8dcb7c0ecd39d1fc76da523baf8a/DenseNet_201.prototxt
!curl -o DenseNet_201.caffemodel https://storage.openvinotoolkit.org/repositories/open_model_zoo/public/2021.4/densenet-201/DenseNet_201.caffemodel
img = cv.imread('car.jpeg')
net = cv.dnn.readNet("DenseNet_201.caffemodel", "DenseNet_201.prototxt")
scale = 1 / 58.8235294117647
width = 224
height = 224
mean = [103.94, 116.78, 123.68]
swapRB = False
crop = False

blob = cv.dnn.blobFromImage(img, scale, (width, height), mean, swapRB, crop)
net.setInput(blob);
prob = net.forward();
!curl -o labels.txt https://gist.githubusercontent.com/yrevar/942d3a0ac09ec9e5eb3a/raw/238f720ff059c1f82f368259d1ca4ffa5dd8f9f5/imagenet1000_clsidx_to_labels.txt

_, _, _, res = cv.minMaxLoc(prob.reshape(1000))
print(res)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13515981735159818, 'fraction_numerical': 0.12511415525114156, 'mean_word_length': 6.070967741935484, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '162370', 'license': 'Apache-2.0', 'n_tokens_mistral': 568, 'n_tokens_neox': 477, 'n_words': 60, 'path': 'dnn_detection.ipynb', 'repo_name': 'allnes/opencv_practice', 'size': '1095'}