Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to infer the SGs on my own dataset? #2

Open
ZihaoZheng98 opened this issue Jun 22, 2024 · 1 comment
Open

How to infer the SGs on my own dataset? #2

ZihaoZheng98 opened this issue Jun 22, 2024 · 1 comment

Comments

@ZihaoZheng98
Copy link

No description provided.

@jinbae
Copy link
Collaborator

jinbae commented Jun 25, 2024

For inference, you have to prepare your data loader.
Please refer to these lines:

egtr/evaluate_egtr.py

Lines 178 to 204 in b3f7b41

# Dataset
if "visual_genome" in args.data_path:
test_dataset = VGDataset(
data_folder=args.data_path,
feature_extractor=feature_extractor,
split=args.split,
num_object_queries=args.num_queries,
)
id2label = {
k - 1: v["name"] for k, v in test_dataset.coco.cats.items()
} # 0 ~ 149
coco_evaluator = CocoEvaluator(
test_dataset.coco, ["bbox"]
) # initialize evaluator with ground truths
oi_evaluator = None
elif "open-image" in args.data_path:
test_dataset = OIDataset(
data_folder=args.data_path,
feature_extractor=feature_extractor,
split=args.split,
num_object_queries=args.num_queries,
)
id2label = test_dataset.classes_to_ind # 0 ~ 600
oi_evaluator = OIEvaluator(
test_dataset.rel_categories, test_dataset.ind_to_classes
)
coco_evaluator = None

You do not need to develop your evaluator, but you need your data processing code.
Please refer to the data folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants