JuanHernandez-uc commited on
Commit
6c80045
·
1 Parent(s): 499854d

Add application file

Browse files
Files changed (4) hide show
  1. Dockerfile +31 -0
  2. app.py +441 -0
  3. imagenet_classes.txt +1000 -0
  4. requirements.txt +14 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PIP_NO_CACHE_DIR=1 \
6
+ PORT=7860 \
7
+ HF_HOME=/home/user/.cache/huggingface \
8
+ TORCH_HOME=/home/user/.cache/torch \
9
+ OMP_NUM_THREADS=1 \
10
+ MKL_NUM_THREADS=1
11
+
12
+ RUN apt-get update && apt-get install -y --no-install-recommends \
13
+ ca-certificates \
14
+ libgomp1 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ RUN useradd -m -u 1000 user
18
+ USER user
19
+ ENV HOME=/home/user \
20
+ PATH=/home/user/.local/bin:$PATH
21
+
22
+ WORKDIR $HOME/app
23
+
24
+ COPY --chown=user:user requirements.txt .
25
+ RUN pip install --upgrade pip && pip install -r requirements.txt
26
+
27
+ COPY --chown=user:user . .
28
+
29
+ EXPOSE 7860
30
+
31
+ CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860} --workers 1"]
app.py ADDED
@@ -0,0 +1,441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+ import io
3
+ import uuid
4
+ import json
5
+ import threading
6
+ import hashlib
7
+ from contextvars import ContextVar
8
+ from typing import Optional, Dict, Any
9
+
10
+ import torch
11
+ import torch.nn.functional as F
12
+ import timm
13
+ from PIL import Image
14
+
15
+ from fastapi import FastAPI, UploadFile, File, Query, HTTPException
16
+ from fastapi.middleware.cors import CORSMiddleware
17
+ from fastapi.responses import JSONResponse
18
+
19
+ from timm.layers.pos_embed import resample_abs_pos_embed
20
+ try:
21
+ from timm.layers.patch_embed import resample_patch_embed
22
+ except Exception:
23
+ resample_patch_embed = None
24
+
25
+
26
+ # -----------------------
27
+ # Config
28
+ # -----------------------
29
+ MODEL_NAME = "flexivit_large.300ep_in1k"
30
+ TARGET_IMG = 96
31
+ TARGET_PATCH = 32
32
+ NEW_GRID = (TARGET_IMG // TARGET_PATCH, TARGET_IMG // TARGET_PATCH) # (3,3)
33
+
34
+ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
35
+
36
+ # ImageNet normalization
37
+ IMNET_MEAN = torch.tensor([0.485, 0.456, 0.406]).view(3, 1, 1)
38
+ IMNET_STD = torch.tensor([0.229, 0.224, 0.225]).view(3, 1, 1)
39
+
40
+
41
+ # -----------------------
42
+ # Load labels (local file recommended)
43
+ # -----------------------
44
+ def load_imagenet_labels(path="imagenet_classes.txt"):
45
+ try:
46
+ with open(path, "r", encoding="utf-8") as f:
47
+ return [line.strip() for line in f.readlines() if line.strip()]
48
+ except FileNotFoundError:
49
+ # If missing, still works but without names.
50
+ return None
51
+
52
+ IMAGENET_LABELS = load_imagenet_labels()
53
+
54
+
55
+ # -----------------------
56
+ # Build & adapt model once
57
+ # -----------------------
58
+ def adapt_flexivit_to_3x3(model: torch.nn.Module):
59
+ # --- Resize patch embedding conv weight ---
60
+ with torch.no_grad():
61
+ proj = model.patch_embed.proj
62
+ w = proj.weight.detach().cpu() # [embed_dim, in_chans, old_ps, old_ps]
63
+ b = proj.bias.detach().cpu() if proj.bias is not None else None
64
+ old_ps = w.shape[-1]
65
+
66
+ if old_ps != TARGET_PATCH:
67
+ if resample_patch_embed is not None:
68
+ w2 = resample_patch_embed(w, (TARGET_PATCH, TARGET_PATCH))
69
+ else:
70
+ ed, ic, _, _ = w.shape
71
+ w_ = w.reshape(ed * ic, 1, old_ps, old_ps)
72
+ w_ = F.interpolate(w_, size=(TARGET_PATCH, TARGET_PATCH), mode="bicubic", align_corners=False)
73
+ w2 = w_.reshape(ed, ic, TARGET_PATCH, TARGET_PATCH)
74
+ else:
75
+ w2 = w
76
+
77
+ embed_dim, in_chans, _, _ = w2.shape
78
+ new_proj = torch.nn.Conv2d(
79
+ in_channels=in_chans,
80
+ out_channels=embed_dim,
81
+ kernel_size=TARGET_PATCH,
82
+ stride=TARGET_PATCH,
83
+ padding=0,
84
+ bias=(b is not None),
85
+ )
86
+ new_proj.weight.copy_(w2)
87
+ if b is not None:
88
+ new_proj.bias.copy_(b)
89
+
90
+ model.patch_embed.proj = new_proj.to(DEVICE)
91
+
92
+ # Update patch embed metadata if present
93
+ if hasattr(model.patch_embed, "patch_size"):
94
+ model.patch_embed.patch_size = (TARGET_PATCH, TARGET_PATCH)
95
+ if hasattr(model.patch_embed, "img_size"):
96
+ model.patch_embed.img_size = (TARGET_IMG, TARGET_IMG)
97
+ if hasattr(model.patch_embed, "grid_size"):
98
+ model.patch_embed.grid_size = NEW_GRID
99
+ if hasattr(model.patch_embed, "num_patches"):
100
+ model.patch_embed.num_patches = NEW_GRID[0] * NEW_GRID[1]
101
+
102
+ # --- Resize absolute positional embeddings to 3x3 ---
103
+ if hasattr(model, "pos_embed") and model.pos_embed is not None:
104
+ with torch.no_grad():
105
+ pe = model.pos_embed.detach()
106
+
107
+ # infer prefix tokens (cls, dist, etc.)
108
+ prefix = int(getattr(model, "num_prefix_tokens", 0))
109
+ if prefix == 0 and hasattr(model, "cls_token") and model.cls_token is not None:
110
+ prefix = 1
111
+
112
+ # infer old grid
113
+ old_grid = None
114
+ if hasattr(model, "patch_embed") and hasattr(model.patch_embed, "grid_size"):
115
+ old_grid = tuple(model.patch_embed.grid_size)
116
+
117
+ if old_grid is not None:
118
+ grid_tokens = old_grid[0] * old_grid[1]
119
+ if pe.shape[1] == grid_tokens:
120
+ prefix = 0
121
+ elif pe.shape[1] == grid_tokens + prefix:
122
+ pass
123
+ else:
124
+ prefix = 0
125
+ old_grid = None
126
+
127
+ if old_grid is None:
128
+ n = pe.shape[1] - prefix
129
+ g = int(n ** 0.5)
130
+ old_grid = (g, g)
131
+
132
+ pe2 = resample_abs_pos_embed(
133
+ pe,
134
+ new_size=NEW_GRID,
135
+ old_size=old_grid,
136
+ num_prefix_tokens=prefix,
137
+ interpolation="bicubic",
138
+ antialias=True,
139
+ )
140
+ model.pos_embed = torch.nn.Parameter(pe2)
141
+
142
+ return model
143
+
144
+
145
+ def build_model():
146
+ model = timm.create_model(MODEL_NAME, pretrained=True).to(DEVICE).eval()
147
+
148
+ # (Recommended) disable fused attention if present (helps hooks)
149
+ for blk in model.blocks:
150
+ if hasattr(blk.attn, "fused_attn"):
151
+ blk.attn.fused_attn = False
152
+
153
+ model = adapt_flexivit_to_3x3(model)
154
+ return model
155
+
156
+
157
+ MODEL = build_model()
158
+ print(f"[server] model={MODEL_NAME} device={DEVICE} grid={NEW_GRID}")
159
+
160
+
161
+ # -----------------------
162
+ # Hooks using ContextVar (safe-ish for concurrent requests)
163
+ # -----------------------
164
+ _attn_var: ContextVar[Optional[list]] = ContextVar("_attn_var", default=None)
165
+ _tok_var: ContextVar[Optional[list]] = ContextVar("_tok_var", default=None)
166
+
167
+ def _save_attn_drop_input(module, inp, out):
168
+ lst = _attn_var.get()
169
+ if lst is not None and len(inp) > 0 and torch.is_tensor(inp[0]):
170
+ # inp[0]: [B, H, N, N]
171
+ lst.append(inp[0].detach().cpu())
172
+
173
+ def _save_block_out(module, inp, out):
174
+ lst = _tok_var.get()
175
+ if lst is not None and torch.is_tensor(out):
176
+ # out: [B, N, D]
177
+ lst.append(out.detach())
178
+
179
+
180
+ # Register hooks once
181
+ ATTN_HOOKS = []
182
+ TOK_HOOKS = []
183
+ for blk in MODEL.blocks:
184
+ ATTN_HOOKS.append(blk.attn.attn_drop.register_forward_hook(_save_attn_drop_input))
185
+ TOK_HOOKS.append(blk.register_forward_hook(_save_block_out))
186
+
187
+
188
+ # -----------------------
189
+ # Preprocess
190
+ # -----------------------
191
+ def preprocess(pil_img: Image.Image) -> torch.Tensor:
192
+ img = pil_img.convert("RGB")
193
+ w, h = img.size
194
+ s = min(w, h)
195
+ left = (w - s) // 2
196
+ top = (h - s) // 2
197
+ img = img.crop((left, top, left + s, top + s)).resize((TARGET_IMG, TARGET_IMG), Image.BICUBIC)
198
+
199
+ x = torch.from_numpy(
200
+ (torch.ByteTensor(torch.ByteStorage.from_buffer(img.tobytes()))
201
+ .view(TARGET_IMG, TARGET_IMG, 3).numpy()).astype("float32") / 255.0
202
+ )
203
+ x = x.permute(2, 0, 1) # CHW
204
+ x = (x - IMNET_MEAN) / IMNET_STD
205
+ return x.unsqueeze(0) # [1,3,H,W]
206
+
207
+
208
+ # -----------------------
209
+ # Compute logit lens + attention export
210
+ # -----------------------
211
+ def compute_logit_lens_from_tokens(tokens_per_layer, model):
212
+ logits_list = []
213
+ probs_list = []
214
+ with torch.no_grad():
215
+ for x_l in tokens_per_layer:
216
+ x_ln = model.norm(x_l) if hasattr(model, "norm") and model.norm is not None else x_l
217
+ cls_l = x_ln[:, 0] # CLS token
218
+ logits_l = model.head(cls_l)
219
+ logits_list.append(logits_l.detach().cpu())
220
+ probs_list.append(torch.softmax(logits_l, dim=-1).detach().cpu())
221
+
222
+ logits_per_layer = torch.stack(logits_list, dim=0) # [L,B,C]
223
+ probs_per_layer = torch.stack(probs_list, dim=0)
224
+ return logits_per_layer, probs_per_layer
225
+
226
+
227
+ def round_tensor(t: torch.Tensor, decimals: int):
228
+ s = 10 ** decimals
229
+ return torch.round(t * s) / s
230
+
231
+
232
+ MODEL_LOCK = threading.Lock()
233
+
234
+ def analyze_image(pil_img: Image.Image) -> Dict[str, Any]:
235
+ x = preprocess(pil_img).to(DEVICE)
236
+
237
+ # Per-request storage
238
+ attn_maps = []
239
+ layer_tokens = []
240
+ tok_token = _tok_var.set(layer_tokens)
241
+ attn_token = _attn_var.set(attn_maps)
242
+
243
+ try:
244
+ with torch.no_grad():
245
+ # Lock recommended if you run multiple workers/threads with GPU,
246
+ # and because we use shared model + hooks
247
+ with MODEL_LOCK:
248
+ logits_final = MODEL(x)
249
+
250
+ # Final probs
251
+ probs_final = torch.softmax(logits_final, dim=-1)[0].detach().cpu()
252
+ probs_final = round_tensor(probs_final, 6)
253
+
254
+ # Logit lens
255
+ logits_by_layer, probs_by_layer = compute_logit_lens_from_tokens(layer_tokens, MODEL)
256
+
257
+ # Export logit lens json
258
+ export_logit = {
259
+ "model": MODEL_NAME,
260
+ "grid": [NEW_GRID[0], NEW_GRID[1]],
261
+ "num_layers": int(logits_by_layer.shape[0]),
262
+ "num_classes": int(logits_by_layer.shape[-1]),
263
+ "class_names": IMAGENET_LABELS,
264
+ "logits": [],
265
+ "final_probs": probs_final.tolist()
266
+ }
267
+ for l in range(logits_by_layer.shape[0]):
268
+ v = logits_by_layer[l, 0] # [C]
269
+ v = round_tensor(v, 3)
270
+ export_logit["logits"].append(v.tolist())
271
+
272
+ # Attention json
273
+ # attn_maps is list length L, each: [B,H,N,N] CPU
274
+ attn_maps2 = [a.squeeze(0) for a in attn_maps] # -> [H,N,N]
275
+ if len(attn_maps2) == 0:
276
+ raise RuntimeError("No attention captured. (Hook may not match this timm model/config)")
277
+
278
+ attn_serializable = []
279
+ for layer in attn_maps2:
280
+ layer_data = []
281
+ for head in layer:
282
+ head = round_tensor(head, 4)
283
+ layer_data.append(head.tolist())
284
+ attn_serializable.append(layer_data)
285
+
286
+ export_attn = {
287
+ "num_layers": len(attn_serializable),
288
+ "num_heads": len(attn_serializable[0]),
289
+ "num_tokens": len(attn_serializable[0][0]),
290
+ "grid": [NEW_GRID[0], NEW_GRID[1]],
291
+ "attention": attn_serializable
292
+ }
293
+
294
+ return {
295
+ "logit_lens_full": export_logit,
296
+ "attention_full": export_attn
297
+ }
298
+
299
+ finally:
300
+ _tok_var.reset(tok_token)
301
+ _attn_var.reset(attn_token)
302
+ layer_tokens.clear()
303
+ attn_maps.clear()
304
+
305
+
306
+ # -----------------------
307
+ # FastAPI app
308
+ # -----------------------
309
+ app = FastAPI(title="ViT Explainer API", version="1.0")
310
+
311
+ app.add_middleware(
312
+ CORSMiddleware,
313
+ allow_origins=["*"], # tighten in prod
314
+ allow_credentials=True,
315
+ allow_methods=["*"],
316
+ allow_headers=["*"],
317
+ )
318
+
319
+ # In-memory store for "file-like endpoints" (job-based)
320
+ RESULTS: Dict[str, Dict[str, Any]] = {}
321
+
322
+ # In-memory store for "current files" (no-regenerate on GET)
323
+ CURRENT: Dict[str, Any] = {
324
+ "hash": None,
325
+ "attention_full": None,
326
+ "logit_lens_full": None,
327
+ }
328
+
329
+ def _no_store(resp: JSONResponse) -> JSONResponse:
330
+ resp.headers["Cache-Control"] = "no-store, no-cache, must-revalidate, max-age=0"
331
+ resp.headers["Pragma"] = "no-cache"
332
+ return resp
333
+
334
+
335
+ @app.get("/health")
336
+ def health():
337
+ return {
338
+ "status": "ok",
339
+ "model": MODEL_NAME,
340
+ "device": DEVICE,
341
+ "grid": list(NEW_GRID),
342
+ "has_current": CURRENT["attention_full"] is not None,
343
+ }
344
+
345
+
346
+ # -----------------------
347
+ # Legacy: returns JSON directly OR job endpoints
348
+ # -----------------------
349
+ @app.post("/analyze")
350
+ async def analyze(
351
+ file: UploadFile = File(...),
352
+ store: int = Query(0, description="1 => guarda resultados y entrega endpoints /results/{id}/..."),
353
+ ):
354
+ if not file.content_type or not file.content_type.startswith("image/"):
355
+ raise HTTPException(status_code=400, detail="Please upload an image file.")
356
+
357
+ raw = await file.read()
358
+ try:
359
+ img = Image.open(io.BytesIO(raw)).convert("RGB")
360
+ except Exception:
361
+ raise HTTPException(status_code=400, detail="Could not decode image.")
362
+
363
+ try:
364
+ out = analyze_image(img)
365
+ except Exception as e:
366
+ raise HTTPException(status_code=500, detail=f"Model inference failed: {e}")
367
+
368
+ if store == 1:
369
+ job_id = str(uuid.uuid4())
370
+ RESULTS[job_id] = out
371
+ return {
372
+ "job_id": job_id,
373
+ "endpoints": {
374
+ "attention_full": f"/results/{job_id}/attention_full.json",
375
+ "logit_lens_full": f"/results/{job_id}/logit_lens_full.json",
376
+ }
377
+ }
378
+
379
+ return out
380
+
381
+
382
+ @app.get("/results/{job_id}/attention_full.json")
383
+ def get_attention(job_id: str):
384
+ if job_id not in RESULTS:
385
+ raise HTTPException(status_code=404, detail="job_id not found")
386
+ return _no_store(JSONResponse(RESULTS[job_id]["attention_full"]))
387
+
388
+
389
+ @app.get("/results/{job_id}/logit_lens_full.json")
390
+ def get_logit(job_id: str):
391
+ if job_id not in RESULTS:
392
+ raise HTTPException(status_code=404, detail="job_id not found")
393
+ return _no_store(JSONResponse(RESULTS[job_id]["logit_lens_full"]))
394
+
395
+
396
+ # -----------------------
397
+ # Preferred: "current files" endpoints (keep frontend fetch paths stable)
398
+ # - POST /analyze_current only when image changes
399
+ # - GET /attention_full.json and /logit_lens_full.json are just readers
400
+ # -----------------------
401
+ @app.post("/analyze_current")
402
+ async def analyze_current(file: UploadFile = File(...)):
403
+ if not file.content_type or not file.content_type.startswith("image/"):
404
+ raise HTTPException(status_code=400, detail="Please upload an image file.")
405
+
406
+ raw = await file.read()
407
+ img_hash = hashlib.sha256(raw).hexdigest()
408
+
409
+ # ✅ no regenerate if same image already processed
410
+ if CURRENT["hash"] == img_hash and CURRENT["attention_full"] is not None:
411
+ return {"status": "unchanged", "hash": img_hash}
412
+
413
+ try:
414
+ img = Image.open(io.BytesIO(raw)).convert("RGB")
415
+ except Exception:
416
+ raise HTTPException(status_code=400, detail="Could not decode image.")
417
+
418
+ try:
419
+ out = analyze_image(img)
420
+ except Exception as e:
421
+ raise HTTPException(status_code=500, detail=f"Model inference failed: {e}")
422
+
423
+ CURRENT["hash"] = img_hash
424
+ CURRENT["attention_full"] = out["attention_full"]
425
+ CURRENT["logit_lens_full"] = out["logit_lens_full"]
426
+
427
+ return {"status": "updated", "hash": img_hash}
428
+
429
+
430
+ @app.get("/attention_full.json")
431
+ def attention_full_current():
432
+ if CURRENT["attention_full"] is None:
433
+ raise HTTPException(status_code=404, detail="No attention computed yet. Call POST /analyze_current first.")
434
+ return _no_store(JSONResponse(CURRENT["attention_full"]))
435
+
436
+
437
+ @app.get("/logit_lens_full.json")
438
+ def logit_lens_current():
439
+ if CURRENT["logit_lens_full"] is None:
440
+ raise HTTPException(status_code=404, detail="No logit lens computed yet. Call POST /analyze_current first.")
441
+ return _no_store(JSONResponse(CURRENT["logit_lens_full"]))
imagenet_classes.txt ADDED
@@ -0,0 +1,1000 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tench
2
+ goldfish
3
+ great white shark
4
+ tiger shark
5
+ hammerhead
6
+ electric ray
7
+ stingray
8
+ cock
9
+ hen
10
+ ostrich
11
+ brambling
12
+ goldfinch
13
+ house finch
14
+ junco
15
+ indigo bunting
16
+ robin
17
+ bulbul
18
+ jay
19
+ magpie
20
+ chickadee
21
+ water ouzel
22
+ kite
23
+ bald eagle
24
+ vulture
25
+ great grey owl
26
+ European fire salamander
27
+ common newt
28
+ eft
29
+ spotted salamander
30
+ axolotl
31
+ bullfrog
32
+ tree frog
33
+ tailed frog
34
+ loggerhead
35
+ leatherback turtle
36
+ mud turtle
37
+ terrapin
38
+ box turtle
39
+ banded gecko
40
+ common iguana
41
+ American chameleon
42
+ whiptail
43
+ agama
44
+ frilled lizard
45
+ alligator lizard
46
+ Gila monster
47
+ green lizard
48
+ African chameleon
49
+ Komodo dragon
50
+ African crocodile
51
+ American alligator
52
+ triceratops
53
+ thunder snake
54
+ ringneck snake
55
+ hognose snake
56
+ green snake
57
+ king snake
58
+ garter snake
59
+ water snake
60
+ vine snake
61
+ night snake
62
+ boa constrictor
63
+ rock python
64
+ Indian cobra
65
+ green mamba
66
+ sea snake
67
+ horned viper
68
+ diamondback
69
+ sidewinder
70
+ trilobite
71
+ harvestman
72
+ scorpion
73
+ black and gold garden spider
74
+ barn spider
75
+ garden spider
76
+ black widow
77
+ tarantula
78
+ wolf spider
79
+ tick
80
+ centipede
81
+ black grouse
82
+ ptarmigan
83
+ ruffed grouse
84
+ prairie chicken
85
+ peacock
86
+ quail
87
+ partridge
88
+ African grey
89
+ macaw
90
+ sulphur-crested cockatoo
91
+ lorikeet
92
+ coucal
93
+ bee eater
94
+ hornbill
95
+ hummingbird
96
+ jacamar
97
+ toucan
98
+ drake
99
+ red-breasted merganser
100
+ goose
101
+ black swan
102
+ tusker
103
+ echidna
104
+ platypus
105
+ wallaby
106
+ koala
107
+ wombat
108
+ jellyfish
109
+ sea anemone
110
+ brain coral
111
+ flatworm
112
+ nematode
113
+ conch
114
+ snail
115
+ slug
116
+ sea slug
117
+ chiton
118
+ chambered nautilus
119
+ Dungeness crab
120
+ rock crab
121
+ fiddler crab
122
+ king crab
123
+ American lobster
124
+ spiny lobster
125
+ crayfish
126
+ hermit crab
127
+ isopod
128
+ white stork
129
+ black stork
130
+ spoonbill
131
+ flamingo
132
+ little blue heron
133
+ American egret
134
+ bittern
135
+ crane
136
+ limpkin
137
+ European gallinule
138
+ American coot
139
+ bustard
140
+ ruddy turnstone
141
+ red-backed sandpiper
142
+ redshank
143
+ dowitcher
144
+ oystercatcher
145
+ pelican
146
+ king penguin
147
+ albatross
148
+ grey whale
149
+ killer whale
150
+ dugong
151
+ sea lion
152
+ Chihuahua
153
+ Japanese spaniel
154
+ Maltese dog
155
+ Pekinese
156
+ Shih-Tzu
157
+ Blenheim spaniel
158
+ papillon
159
+ toy terrier
160
+ Rhodesian ridgeback
161
+ Afghan hound
162
+ basset
163
+ beagle
164
+ bloodhound
165
+ bluetick
166
+ black-and-tan coonhound
167
+ Walker hound
168
+ English foxhound
169
+ redbone
170
+ borzoi
171
+ Irish wolfhound
172
+ Italian greyhound
173
+ whippet
174
+ Ibizan hound
175
+ Norwegian elkhound
176
+ otterhound
177
+ Saluki
178
+ Scottish deerhound
179
+ Weimaraner
180
+ Staffordshire bullterrier
181
+ American Staffordshire terrier
182
+ Bedlington terrier
183
+ Border terrier
184
+ Kerry blue terrier
185
+ Irish terrier
186
+ Norfolk terrier
187
+ Norwich terrier
188
+ Yorkshire terrier
189
+ wire-haired fox terrier
190
+ Lakeland terrier
191
+ Sealyham terrier
192
+ Airedale
193
+ cairn
194
+ Australian terrier
195
+ Dandie Dinmont
196
+ Boston bull
197
+ miniature schnauzer
198
+ giant schnauzer
199
+ standard schnauzer
200
+ Scotch terrier
201
+ Tibetan terrier
202
+ silky terrier
203
+ soft-coated wheaten terrier
204
+ West Highland white terrier
205
+ Lhasa
206
+ flat-coated retriever
207
+ curly-coated retriever
208
+ golden retriever
209
+ Labrador retriever
210
+ Chesapeake Bay retriever
211
+ German short-haired pointer
212
+ vizsla
213
+ English setter
214
+ Irish setter
215
+ Gordon setter
216
+ Brittany spaniel
217
+ clumber
218
+ English springer
219
+ Welsh springer spaniel
220
+ cocker spaniel
221
+ Sussex spaniel
222
+ Irish water spaniel
223
+ kuvasz
224
+ schipperke
225
+ groenendael
226
+ malinois
227
+ briard
228
+ kelpie
229
+ komondor
230
+ Old English sheepdog
231
+ Shetland sheepdog
232
+ collie
233
+ Border collie
234
+ Bouvier des Flandres
235
+ Rottweiler
236
+ German shepherd
237
+ Doberman
238
+ miniature pinscher
239
+ Greater Swiss Mountain dog
240
+ Bernese mountain dog
241
+ Appenzeller
242
+ EntleBucher
243
+ boxer
244
+ bull mastiff
245
+ Tibetan mastiff
246
+ French bulldog
247
+ Great Dane
248
+ Saint Bernard
249
+ Eskimo dog
250
+ malamute
251
+ Siberian husky
252
+ dalmatian
253
+ affenpinscher
254
+ basenji
255
+ pug
256
+ Leonberg
257
+ Newfoundland
258
+ Great Pyrenees
259
+ Samoyed
260
+ Pomeranian
261
+ chow
262
+ keeshond
263
+ Brabancon griffon
264
+ Pembroke
265
+ Cardigan
266
+ toy poodle
267
+ miniature poodle
268
+ standard poodle
269
+ Mexican hairless
270
+ timber wolf
271
+ white wolf
272
+ red wolf
273
+ coyote
274
+ dingo
275
+ dhole
276
+ African hunting dog
277
+ hyena
278
+ red fox
279
+ kit fox
280
+ Arctic fox
281
+ grey fox
282
+ tabby
283
+ tiger cat
284
+ Persian cat
285
+ Siamese cat
286
+ Egyptian cat
287
+ cougar
288
+ lynx
289
+ leopard
290
+ snow leopard
291
+ jaguar
292
+ lion
293
+ tiger
294
+ cheetah
295
+ brown bear
296
+ American black bear
297
+ ice bear
298
+ sloth bear
299
+ mongoose
300
+ meerkat
301
+ tiger beetle
302
+ ladybug
303
+ ground beetle
304
+ long-horned beetle
305
+ leaf beetle
306
+ dung beetle
307
+ rhinoceros beetle
308
+ weevil
309
+ fly
310
+ bee
311
+ ant
312
+ grasshopper
313
+ cricket
314
+ walking stick
315
+ cockroach
316
+ mantis
317
+ cicada
318
+ leafhopper
319
+ lacewing
320
+ dragonfly
321
+ damselfly
322
+ admiral
323
+ ringlet
324
+ monarch
325
+ cabbage butterfly
326
+ sulphur butterfly
327
+ lycaenid
328
+ starfish
329
+ sea urchin
330
+ sea cucumber
331
+ wood rabbit
332
+ hare
333
+ Angora
334
+ hamster
335
+ porcupine
336
+ fox squirrel
337
+ marmot
338
+ beaver
339
+ guinea pig
340
+ sorrel
341
+ zebra
342
+ hog
343
+ wild boar
344
+ warthog
345
+ hippopotamus
346
+ ox
347
+ water buffalo
348
+ bison
349
+ ram
350
+ bighorn
351
+ ibex
352
+ hartebeest
353
+ impala
354
+ gazelle
355
+ Arabian camel
356
+ llama
357
+ weasel
358
+ mink
359
+ polecat
360
+ black-footed ferret
361
+ otter
362
+ skunk
363
+ badger
364
+ armadillo
365
+ three-toed sloth
366
+ orangutan
367
+ gorilla
368
+ chimpanzee
369
+ gibbon
370
+ siamang
371
+ guenon
372
+ patas
373
+ baboon
374
+ macaque
375
+ langur
376
+ colobus
377
+ proboscis monkey
378
+ marmoset
379
+ capuchin
380
+ howler monkey
381
+ titi
382
+ spider monkey
383
+ squirrel monkey
384
+ Madagascar cat
385
+ indri
386
+ Indian elephant
387
+ African elephant
388
+ lesser panda
389
+ giant panda
390
+ barracouta
391
+ eel
392
+ coho
393
+ rock beauty
394
+ anemone fish
395
+ sturgeon
396
+ gar
397
+ lionfish
398
+ puffer
399
+ abacus
400
+ abaya
401
+ academic gown
402
+ accordion
403
+ acoustic guitar
404
+ aircraft carrier
405
+ airliner
406
+ airship
407
+ altar
408
+ ambulance
409
+ amphibian
410
+ analog clock
411
+ apiary
412
+ apron
413
+ ashcan
414
+ assault rifle
415
+ backpack
416
+ bakery
417
+ balance beam
418
+ balloon
419
+ ballpoint
420
+ Band Aid
421
+ banjo
422
+ bannister
423
+ barbell
424
+ barber chair
425
+ barbershop
426
+ barn
427
+ barometer
428
+ barrel
429
+ barrow
430
+ baseball
431
+ basketball
432
+ bassinet
433
+ bassoon
434
+ bathing cap
435
+ bath towel
436
+ bathtub
437
+ beach wagon
438
+ beacon
439
+ beaker
440
+ bearskin
441
+ beer bottle
442
+ beer glass
443
+ bell cote
444
+ bib
445
+ bicycle-built-for-two
446
+ bikini
447
+ binder
448
+ binoculars
449
+ birdhouse
450
+ boathouse
451
+ bobsled
452
+ bolo tie
453
+ bonnet
454
+ bookcase
455
+ bookshop
456
+ bottlecap
457
+ bow
458
+ bow tie
459
+ brass
460
+ brassiere
461
+ breakwater
462
+ breastplate
463
+ broom
464
+ bucket
465
+ buckle
466
+ bulletproof vest
467
+ bullet train
468
+ butcher shop
469
+ cab
470
+ caldron
471
+ candle
472
+ cannon
473
+ canoe
474
+ can opener
475
+ cardigan
476
+ car mirror
477
+ carousel
478
+ carpenter's kit
479
+ carton
480
+ car wheel
481
+ cash machine
482
+ cassette
483
+ cassette player
484
+ castle
485
+ catamaran
486
+ CD player
487
+ cello
488
+ cellular telephone
489
+ chain
490
+ chainlink fence
491
+ chain mail
492
+ chain saw
493
+ chest
494
+ chiffonier
495
+ chime
496
+ china cabinet
497
+ Christmas stocking
498
+ church
499
+ cinema
500
+ cleaver
501
+ cliff dwelling
502
+ cloak
503
+ clog
504
+ cocktail shaker
505
+ coffee mug
506
+ coffeepot
507
+ coil
508
+ combination lock
509
+ computer keyboard
510
+ confectionery
511
+ container ship
512
+ convertible
513
+ corkscrew
514
+ cornet
515
+ cowboy boot
516
+ cowboy hat
517
+ cradle
518
+ crane
519
+ crash helmet
520
+ crate
521
+ crib
522
+ Crock Pot
523
+ croquet ball
524
+ crutch
525
+ cuirass
526
+ dam
527
+ desk
528
+ desktop computer
529
+ dial telephone
530
+ diaper
531
+ digital clock
532
+ digital watch
533
+ dining table
534
+ dishrag
535
+ dishwasher
536
+ disk brake
537
+ dock
538
+ dogsled
539
+ dome
540
+ doormat
541
+ drilling platform
542
+ drum
543
+ drumstick
544
+ dumbbell
545
+ Dutch oven
546
+ electric fan
547
+ electric guitar
548
+ electric locomotive
549
+ entertainment center
550
+ envelope
551
+ espresso maker
552
+ face powder
553
+ feather boa
554
+ file
555
+ fireboat
556
+ fire engine
557
+ fire screen
558
+ flagpole
559
+ flute
560
+ folding chair
561
+ football helmet
562
+ forklift
563
+ fountain
564
+ fountain pen
565
+ four-poster
566
+ freight car
567
+ French horn
568
+ frying pan
569
+ fur coat
570
+ garbage truck
571
+ gasmask
572
+ gas pump
573
+ goblet
574
+ go-kart
575
+ golf ball
576
+ golfcart
577
+ gondola
578
+ gong
579
+ gown
580
+ grand piano
581
+ greenhouse
582
+ grille
583
+ grocery store
584
+ guillotine
585
+ hair slide
586
+ hair spray
587
+ half track
588
+ hammer
589
+ hamper
590
+ hand blower
591
+ hand-held computer
592
+ handkerchief
593
+ hard disc
594
+ harmonica
595
+ harp
596
+ harvester
597
+ hatchet
598
+ holster
599
+ home theater
600
+ honeycomb
601
+ hook
602
+ hoopskirt
603
+ horizontal bar
604
+ horse cart
605
+ hourglass
606
+ iPod
607
+ iron
608
+ jack-o'-lantern
609
+ jean
610
+ jeep
611
+ jersey
612
+ jigsaw puzzle
613
+ jinrikisha
614
+ joystick
615
+ kimono
616
+ knee pad
617
+ knot
618
+ lab coat
619
+ ladle
620
+ lampshade
621
+ laptop
622
+ lawn mower
623
+ lens cap
624
+ letter opener
625
+ library
626
+ lifeboat
627
+ lighter
628
+ limousine
629
+ liner
630
+ lipstick
631
+ Loafer
632
+ lotion
633
+ loudspeaker
634
+ loupe
635
+ lumbermill
636
+ magnetic compass
637
+ mailbag
638
+ mailbox
639
+ maillot
640
+ maillot
641
+ manhole cover
642
+ maraca
643
+ marimba
644
+ mask
645
+ matchstick
646
+ maypole
647
+ maze
648
+ measuring cup
649
+ medicine chest
650
+ megalith
651
+ microphone
652
+ microwave
653
+ military uniform
654
+ milk can
655
+ minibus
656
+ miniskirt
657
+ minivan
658
+ missile
659
+ mitten
660
+ mixing bowl
661
+ mobile home
662
+ Model T
663
+ modem
664
+ monastery
665
+ monitor
666
+ moped
667
+ mortar
668
+ mortarboard
669
+ mosque
670
+ mosquito net
671
+ motor scooter
672
+ mountain bike
673
+ mountain tent
674
+ mouse
675
+ mousetrap
676
+ moving van
677
+ muzzle
678
+ nail
679
+ neck brace
680
+ necklace
681
+ nipple
682
+ notebook
683
+ obelisk
684
+ oboe
685
+ ocarina
686
+ odometer
687
+ oil filter
688
+ organ
689
+ oscilloscope
690
+ overskirt
691
+ oxcart
692
+ oxygen mask
693
+ packet
694
+ paddle
695
+ paddlewheel
696
+ padlock
697
+ paintbrush
698
+ pajama
699
+ palace
700
+ panpipe
701
+ paper towel
702
+ parachute
703
+ parallel bars
704
+ park bench
705
+ parking meter
706
+ passenger car
707
+ patio
708
+ pay-phone
709
+ pedestal
710
+ pencil box
711
+ pencil sharpener
712
+ perfume
713
+ Petri dish
714
+ photocopier
715
+ pick
716
+ pickelhaube
717
+ picket fence
718
+ pickup
719
+ pier
720
+ piggy bank
721
+ pill bottle
722
+ pillow
723
+ ping-pong ball
724
+ pinwheel
725
+ pirate
726
+ pitcher
727
+ plane
728
+ planetarium
729
+ plastic bag
730
+ plate rack
731
+ plow
732
+ plunger
733
+ Polaroid camera
734
+ pole
735
+ police van
736
+ poncho
737
+ pool table
738
+ pop bottle
739
+ pot
740
+ potter's wheel
741
+ power drill
742
+ prayer rug
743
+ printer
744
+ prison
745
+ projectile
746
+ projector
747
+ puck
748
+ punching bag
749
+ purse
750
+ quill
751
+ quilt
752
+ racer
753
+ racket
754
+ radiator
755
+ radio
756
+ radio telescope
757
+ rain barrel
758
+ recreational vehicle
759
+ reel
760
+ reflex camera
761
+ refrigerator
762
+ remote control
763
+ restaurant
764
+ revolver
765
+ rifle
766
+ rocking chair
767
+ rotisserie
768
+ rubber eraser
769
+ rugby ball
770
+ rule
771
+ running shoe
772
+ safe
773
+ safety pin
774
+ saltshaker
775
+ sandal
776
+ sarong
777
+ sax
778
+ scabbard
779
+ scale
780
+ school bus
781
+ schooner
782
+ scoreboard
783
+ screen
784
+ screw
785
+ screwdriver
786
+ seat belt
787
+ sewing machine
788
+ shield
789
+ shoe shop
790
+ shoji
791
+ shopping basket
792
+ shopping cart
793
+ shovel
794
+ shower cap
795
+ shower curtain
796
+ ski
797
+ ski mask
798
+ sleeping bag
799
+ slide rule
800
+ sliding door
801
+ slot
802
+ snorkel
803
+ snowmobile
804
+ snowplow
805
+ soap dispenser
806
+ soccer ball
807
+ sock
808
+ solar dish
809
+ sombrero
810
+ soup bowl
811
+ space bar
812
+ space heater
813
+ space shuttle
814
+ spatula
815
+ speedboat
816
+ spider web
817
+ spindle
818
+ sports car
819
+ spotlight
820
+ stage
821
+ steam locomotive
822
+ steel arch bridge
823
+ steel drum
824
+ stethoscope
825
+ stole
826
+ stone wall
827
+ stopwatch
828
+ stove
829
+ strainer
830
+ streetcar
831
+ stretcher
832
+ studio couch
833
+ stupa
834
+ submarine
835
+ suit
836
+ sundial
837
+ sunglass
838
+ sunglasses
839
+ sunscreen
840
+ suspension bridge
841
+ swab
842
+ sweatshirt
843
+ swimming trunks
844
+ swing
845
+ switch
846
+ syringe
847
+ table lamp
848
+ tank
849
+ tape player
850
+ teapot
851
+ teddy
852
+ television
853
+ tennis ball
854
+ thatch
855
+ theater curtain
856
+ thimble
857
+ thresher
858
+ throne
859
+ tile roof
860
+ toaster
861
+ tobacco shop
862
+ toilet seat
863
+ torch
864
+ totem pole
865
+ tow truck
866
+ toyshop
867
+ tractor
868
+ trailer truck
869
+ tray
870
+ trench coat
871
+ tricycle
872
+ trimaran
873
+ tripod
874
+ triumphal arch
875
+ trolleybus
876
+ trombone
877
+ tub
878
+ turnstile
879
+ typewriter keyboard
880
+ umbrella
881
+ unicycle
882
+ upright
883
+ vacuum
884
+ vase
885
+ vault
886
+ velvet
887
+ vending machine
888
+ vestment
889
+ viaduct
890
+ violin
891
+ volleyball
892
+ waffle iron
893
+ wall clock
894
+ wallet
895
+ wardrobe
896
+ warplane
897
+ washbasin
898
+ washer
899
+ water bottle
900
+ water jug
901
+ water tower
902
+ whiskey jug
903
+ whistle
904
+ wig
905
+ window screen
906
+ window shade
907
+ Windsor tie
908
+ wine bottle
909
+ wing
910
+ wok
911
+ wooden spoon
912
+ wool
913
+ worm fence
914
+ wreck
915
+ yawl
916
+ yurt
917
+ web site
918
+ comic book
919
+ crossword puzzle
920
+ street sign
921
+ traffic light
922
+ book jacket
923
+ menu
924
+ plate
925
+ guacamole
926
+ consomme
927
+ hot pot
928
+ trifle
929
+ ice cream
930
+ ice lolly
931
+ French loaf
932
+ bagel
933
+ pretzel
934
+ cheeseburger
935
+ hotdog
936
+ mashed potato
937
+ head cabbage
938
+ broccoli
939
+ cauliflower
940
+ zucchini
941
+ spaghetti squash
942
+ acorn squash
943
+ butternut squash
944
+ cucumber
945
+ artichoke
946
+ bell pepper
947
+ cardoon
948
+ mushroom
949
+ Granny Smith
950
+ strawberry
951
+ orange
952
+ lemon
953
+ fig
954
+ pineapple
955
+ banana
956
+ jackfruit
957
+ custard apple
958
+ pomegranate
959
+ hay
960
+ carbonara
961
+ chocolate sauce
962
+ dough
963
+ meat loaf
964
+ pizza
965
+ potpie
966
+ burrito
967
+ red wine
968
+ espresso
969
+ cup
970
+ eggnog
971
+ alp
972
+ bubble
973
+ cliff
974
+ coral reef
975
+ geyser
976
+ lakeside
977
+ promontory
978
+ sandbar
979
+ seashore
980
+ valley
981
+ volcano
982
+ ballplayer
983
+ groom
984
+ scuba diver
985
+ rapeseed
986
+ daisy
987
+ yellow lady's slipper
988
+ corn
989
+ acorn
990
+ hip
991
+ buckeye
992
+ coral fungus
993
+ agaric
994
+ gyromitra
995
+ stinkhorn
996
+ earthstar
997
+ hen-of-the-woods
998
+ bolete
999
+ ear
1000
+ toilet tissue
requirements.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --extra-index-url https://download.pytorch.org/whl/cpu
2
+
3
+ fastapi==0.115.6
4
+ uvicorn[standard]==0.30.6
5
+ python-multipart==0.0.9
6
+
7
+ torch==2.5.1
8
+ torchvision==0.20.1
9
+ timm==0.9.16
10
+
11
+ pillow==10.4.0
12
+ numpy==2.1.3
13
+ huggingface-hub==0.24.7
14
+ safetensors==0.4.5