<jupyter_start><jupyter_text>**Detecting Occupied Chairs**<jupyter_code>D=Data({'source': "rb.mp4",'step':10,'size':(416,416,3),'video':1})
print (len(D.data))
print (names[0])
visualize(D.data[0],boxes[0],names[0])
def normalize(boxes):
    return boxes-np.mean(bo)
def occupied(boxes,names,eps=0.05):
    ch_idx=np.where(names=='chair')[0]
    per_idx=np.where(names=='person')[0]
    height=np.abs(boxes[per_idx][:,0]-boxes[per_idx][:,2])
    print (height)
    iou_=iou(boxes[ch_idx],boxes[per_idx])
    Mask=np.zeros_like(iou_,dtype=bool)
    Mask[np.argmax(iou_,axis=0),np.arange(Mask.shape[1],dtype=int)]=True
#     iou_[Mask]=0
    occ=boxes[ch_idx[np.sum(iou_>eps,axis=1)>0]]
    return occ
occupied_chairs=occupied(np.array(boxes[0]).astype(float),np.array(names[0]))
visualize(D.data[1].copy(),occupied_chairs)<jupyter_output>[ 35.02088  21.3373  266.42134 232.32203  61.42508  96.42484 134.36853
  96.44382]<jupyter_text>**Detecting Crowd**<jupyter_code>crowd=cluster_crowd(features[names=='person'],boxes[names=='person'],2,eps=0.9)
visualize(D.data[1].copy(),crowd)
for c,i in enumerate(np.linspace(0.5,2,100)):
    print (c,i)
    img = copy.deepcopy(image)
    print (features)
    cluster_crowd(img,features,boxes_,thickness,ImageDraw.Draw(img),self.colors,2,eps=i,name='./results/'+str(c)+'.jpg')
images=[]
        for i in range(100):
             images.append(cv2.imread('results/'+str(i)+ '.jpg'))
        return np.array(images),features
for i,c in reversed(list(enumerate(['a','b','c']))):
    print (bool(i),c)
import numpy as np
a=np.arange(3).astype(str)
np.core.defchararray.add(a, '.txt')
import pandas as pd<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20875824835032994, 'fraction_numerical': 0.0623875224955009, 'mean_word_length': 6.315789473684211, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '452430', 'license': 'MIT', 'n_tokens_mistral': 755, 'n_tokens_neox': 685, 'n_words': 76, 'path': 'Experiments.ipynb', 'repo_name': 'M-Usman10/YoloServer', 'size': '1667'}