Skip to content
 
 

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MedDetect-Graph minimal implementation

This folder contains the compact implementation used for code submission. It preserves the main pipeline:

  1. response-claim extraction and claim typing in two separate model calls, plus trusted query-fact extraction;
  2. separate query-evidence routing and earlier-response dependency linking;
  3. claim-type-specific visual grounding or MedRAG retrieval;
  4. dependency-filtered evidence assembly and typed unified verification;
  5. either full-claim detection or iterative first-error suffix correction and rechecking.

Only one final JSON file is written. No claim lists, evidence packets, traces, caches, timing files, retries, format-repair calls, or fallback results are saved. All remote language/vision calls use the standard OpenAI Python client, which reads OPENAI_API_KEY from the environment. The configs intentionally contain no URL or API-key field. Intern-S1 is not included.

Run

From the repository root:

export OPENAI_API_KEY=YOUR_KEY

# Full detection
python -m pipeline_aaai.run \
  --config pipeline_aaai/config/full_detection.yaml \
  --input /path/to/data.json \
  --image-root /path/to/images \
  --output results/detection.json

# Iterative correction
python -m pipeline_aaai.run \
  --config pipeline_aaai/config/iterative_correction.yaml \
  --input /path/to/data.json \
  --image-root /path/to/images \
  --output results/correction.json

The input can be one JSON object, a JSON list, or JSONL. The runner directly supports the existing hallucinated_report, hallucinated_report_sentence_level, query, target_image, case_id/id, and report-dataset fields. Generic records may instead use uid, response, segments, image_path, and image_modality.

The Qwen3-VL checkpoint and MedRAG database paths remain configurable under local_evidence. Change only those local paths and GPU IDs when moving to another machine.

Output

full_detection records only the number of checked claims, the earliest error, and all final hallucination decisions. iterative_correction additionally records the final corrected response, completed round count, and the first remaining error (or null).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages