yrcong / RelTR

RelTR: Relation Transformer for Scene Graph Generation: https://arxiv.org/abs/2201.11460v2
248 stars 49 forks source link

Evaluation on Colab failing #17

Closed IamShubhamGupto closed 1 year ago

IamShubhamGupto commented 1 year ago

Hello Authors,

As instructed, we have created a conda environment (python 3.6) to run inference and evaluation of RelTR. However, we are getting some unexpected errors and are not sure how to proceed.

Any feedback would be appreciated!

Error Stackstrace:

Not using distributed mode
git:
  sha: 4c9557165e8a8d9c90ca263aa9d2be82f70c1ace, status: has uncommited changes, branch: main

Namespace(ann_path='./data/vg/', aux_loss=True, backbone='resnet50', batch_size=1, bbox_loss_coef=5, clip_max_norm=0.1, dataset='vg', dec_layers=6, device='cuda', dilation=False, dim_feedforward=2048, dist_url='env://', distributed=False, dropout=0.1, enc_layers=6, eos_coef=0.1, epochs=150, eval=True, frozen_weights=None, giou_loss_coef=2, hidden_dim=256, img_folder='data/vg/images/', lr=0.0001, lr_backbone=1e-05, lr_drop=100, nheads=8, num_entities=100, num_triplets=200, num_workers=2, output_dir='', position_embedding='sine', pre_norm=False, rel_loss_coef=1, resume='ckpt/checkpoint0149.pth', return_interm_layers=False, seed=42, set_cost_bbox=5, set_cost_class=1, set_cost_giou=2, set_iou_threshold=0.7, start_epoch=0, weight_decay=0.0001, world_size=1)
number of params: 63679528
loading annotations into memory...
Done (t=2.56s)
creating index...
index created!
loading annotations into memory...
Done (t=1.17s)
creating index...
index created!
Traceback (most recent call last):
  File "main.py", line 239, in <module>
    main(args)
  File "main.py", line 171, in main
    checkpoint = torch.load(args.resume, map_location='cpu')
  File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 585, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 755, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.
Screenshot 2022-12-15 at 10 45 31 PM
IamShubhamGupto commented 1 year ago

Issue was with the downloaded checkpoint file, refer #16

yrcong commented 1 year ago

Is there still any problem? I can download the checkpoint with the given link.

IamShubhamGupto commented 1 year ago

Is there still any problem? I can download the checkpoint with the given link.

Nope, it's all good. My code was the issue. The command to download weights from the links is

!gdown "1id6oD_iwiNDD6HyCn2ORgRTIKkPD3tUD&confirm=t" -O ckpt/checkpoint0149.pth