asatheesh/TransRAC main
PYTHON
Verdict: BENIGN
AI
Legitimate ML model evaluation script
Local reference
Suspicious dependency
Inferred
| 7:46 |
…/Qwen3-VL-2B-Instruct # all videos |
|
| 8 |
""" |
|
| 9 |
|
|
| 10 |
import argparse |
|
| 11 |
import base64 |
Imports Python's base64 module |
| 12 |
import csv |
|
| 13 |
import gc |
|
| 14 |
import io |
|
| 15 |
import json |
|
| 16 |
import os |
|
| 17 |
import re |
|
| 18 |
import sys |
|
| 19 |
import time |
|
| 20 |
|
|
| 21 |
import cv2 |
|
| 22 |
import numpy as np |
|
| 23 |
|
|
| 24 |
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) |
Modifies module search path (sys.path) |
| 25 |
from config import ( |
|
| 26 |
TEST_CSV, VIDEO_DIR, RESULTS_DIR, PROMPTS, DEFAULT_PROM… |
|
| 95:18 |
…sformers import Qwen3VLForConditionalGeneration |
|
| 96 |
model = Qwen3VLForConditionalGeneration.from_pretrained( |
Transformers model loader enables remote code |
| 97 |
args.model, torch_dtype=torch.bfloat16, |
|
| 98 |
device_map="cuda:0", low_cpu_mem_usage=True, |
|
| 99 |
) |
|
| 100 |
eli… |
|
| 101:21 |
…rmers import Qwen2_5_VLForConditionalGeneration |
|
| 102 |
model = Qwen2_5_VLForConditionalGeneration.from_pretrained( |
Transformers model loader enables remote code |
| 103 |
args.model, torch_dtype=torch.bfloat16, |
|
| 104 |
device_map="cuda:0", low_cpu_mem_usage=True, |
|
| 105 |
) |
|
| 106 |
els… |
|
| 107:9 |
…from transformers import AutoModelForVision2Seq |
|
| 108 |
model = AutoModelForVision2Seq.from_pretrained( |
Transformers model loader enables remote code |
| 109 |
args.model, torch_dtype=torch.bfloat16, |
|
| 110 |
device_map="cuda:0", low_cpu_mem_usage=True, |
|
| 111 |
trust_remote_code=True, |
Enables a Python remote-code loading option |
| 112 |
) |
|
| 113 |
|
|
| 114 |
processor = AutoProcessor.from_pretrained(args.model) |
|
| 115 |
model.eval() |
|
| 116 |
gc.collect() |
|
| 117 |
torch.cuda.empty_cache() |
|
| 118 |
print(f"Model loaded. GPU memory: {torch.cuda.memory_allocated()/1e9:.1f}GB")… |
|
| 184:56 |
…d_count']} ({status})") |
|
| 185 |
|
|
| 186 |
# Save results |
|
| 187 |
os.makedirs(RESULTS_DIR, exist_ok=True) |
|
| 188 |
model_safe = args.model.split("/")[-1] |
|
| 189 |
filepath = os.path.join(RESULTS_DIR, f"{model_safe}_{args.prompt}.json") |
|
| 190 |
with open(filepath, "w") as f: |
|
| 191 |
json.dump({ |
Serializes to a stream with json.dump() |
| 192 |
"model": model_safe, |
|
| 193 |
"prompt": args.prompt, |
|
| 194 |
"timestamp": time.strftime("%Y-%m-%d %H:%M:%S… |
|
Identity
| SHA-256 |
4e8be27279bbdd42f8b7adb8226ab198499fc9f4dc810628512522ff63bfabaa |
| Canonical SHA-256 |
3098ab4988cd2f6b60e19fa7d3b99fc4ca08ede782f02b4d1dead8bebd050921 |
| Filename |
run_local.py |
| Package |
asatheesh/TransRAC |
| Version |
main |
| PURL |
pkg:huggingface/asatheesh/TransRAC@main |
Timeline
| First seen |
26 Jul 2026 21:39 UTC |
| First analyzed |
27 Jul 2026 02:08 UTC |
| Last analyzed |
27 Jul 2026 02:08 UTC |
| Last updated |
27 Jul 2026 02:08 UTC |
Labeling
| Label |
unknown |
| Label source |
forager |
| Traits version |
9266e |