bisnet0/riftshield-architecture-diagrams
Preview β’ Updated β’ 34
How to use bisnet0/riftshield-architecture-yolo with ultralytics:
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
# pick the weights file from this repo's "Files and versions" tab
weights = hf_hub_download("bisnet0/riftshield-architecture-yolo", "<weights>.pt")
model = YOLO(weights)
source = 'http://images.cocodataset.org/val2017/000000039769.jpg'
model.predict(source=source, save=True)Object detector trained to read software architecture diagrams (UML class diagrams, network topology, cloud diagrams) and turn them into structured elements that an LLM agent can reason about. It is the visual front-end of RiftShield, a threat-modeling platform: the detected elements become the graph that a LangGraph agent walks to apply STRIDE, retrieve mitigations through RAG (FAISS) and simulate attacks.
yolov8n.pt base), Ultralyticscode / diagram page-level classification)weights/yolov8n-architecture-best.ptbisnet0/riftshield-architecture-diagrams| metric | value |
|---|---|
| Precision (B) | 0.7416 |
| Recall (B) | 0.5561 |
| mAP50 (B) | 0.5942 |
| mAP50-95 (B) | 0.4183 |
| epoch | 10 |
Full per-epoch history in training/results.csv; curves in training/.
from ultralytics import YOLO
model = YOLO("weights/yolov8n-architecture-best.pt")
results = model("diagram.png", conf=0.25)
for box in results[0].boxes:
print(model.names[int(box.cls)], [round(v, 1) for v in box.xyxy[0].tolist()])
diagram/code classes.Part of RiftShield (FIAP Software Security Hackathon 2026). Code: https://github.com/bisnet0/RiftShield