<jupyter_start><jupyter_text>To fill in, follow DETR colabfound here https://colab.research.google.com/github/facebookresearch/detr/blob/colab/notebooks/DETR_panoptic.ipynbscrollTo=QD4mQxHIqGCr<jupyter_code>import torch
from torchvision import transforms as T
from PIL import Image

path = 'sample_pics/idris.jpg'
pic = Image.open(path)
model = torch.hub.load('facebookresearch/detr', 'detr_resnet50', pretrained=True)
model.eval()
transform = T.Compose([
    T.Resize(800),
    T.ToTensor(),
    T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])


tensored = transforms.ToTensor()(pic)
tensored = tensored.unsqueeze(0)

a = model(tensored)
a['pred_logits'].shape
a['pred_boxes'].shape<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14600550964187328, 'fraction_numerical': 0.04269972451790634, 'mean_word_length': 5.990384615384615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '506565', 'license': 'MIT', 'n_tokens_mistral': 308, 'n_tokens_neox': 282, 'n_words': 46, 'path': 'detr.ipynb', 'repo_name': 'amorisot/MAJR', 'size': '726'}