🧠 ReINVenTA: Event Classifier (Fusion WiSE)

Este é o modelo SOTA do Estágio 3. Classifica Eventos Semânticos combinando visão (CLIP) e lógica (YOLO).

📊 Performance

  • Recall@5: 68.1%
  • Arquitetura: Fusion WiSE (Late Fusion MLP)

💻 Como usar (Python API)

1. Instalação

pip install huggingface_hub torch

2. Código de Inferência

import torch
import json
from huggingface_hub import hf_hub_download
import sys
import os

# 1. Baixar arquivos
repo_id = "FrameNetBrasil/reinventa-event-classifier-fusion-wise"
model_path = hf_hub_download(repo_id=repo_id, filename="pytorch_model.pth")
code_path = hf_hub_download(repo_id=repo_id, filename="model.py")
ent_path = hf_hub_download(repo_id=repo_id, filename="entities.json")
evt_path = hf_hub_download(repo_id=repo_id, filename="events.json")

# 2. Importar Classe Customizada
sys.path.append(os.path.dirname(code_path))
from model import FusionWiSE

# 3. Carregar
with open(ent_path) as f: ents = json.load(f)
with open(evt_path) as f: evts = json.load(f)

model = FusionWiSE(clip_dim=512, entity_dim=len(ents), num_classes=len(evts))
model.load_state_dict(torch.load(model_path, map_location='cpu'))
model.eval()
print('✅ Modelo carregado!')
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support