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

problem when training a deformable detr on cocodataset if the dataset is not downloaded on the machine #50

Closed
LucBourrat1 opened this issue Sep 8, 2021 · 2 comments · Fixed by #58
Assignees
Labels
alonet bug Something isn't working quick-fix

Comments

@LucBourrat1
Copy link
Contributor

if coco dataset does not exist in config file, user is asked to download and use a sample. If we answer yes there is a problem with the path.

Code to regenerate the bug (coco dataset need to not be on the machine):

from alonet.deformable_detr import LitDeformableDetr, DeformableDetrR50Finetune
from argparse import ArgumentParser, Namespace
import alonet
from alonet.detr import CocoDetection2Detr

import torch

def params2Namespace(litdetr, level):
print(f"[INFO] LEVEL {level}:", Namespace(
accumulate_grad_batches=litdetr.accumulate_grad_batches,
gradient_clip_val=litdetr.gradient_clip_val,
model_name=litdetr.model_name,
weights=litdetr.weights
))

TRAINING PIPELINE

device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")

Parameters definition

Build parser (concatenates arguments to modify the entire project)

parser = ArgumentParser(conflict_handler="resolve")
parser = alonet.common.add_argparse_args(parser) # Add common arguments in train process
parser = CocoDetection2Detr.add_argparse_args(parser)
parser = LitDeformableDetr.add_argparse_args(parser)
args = parser.parse_args()

Dataset use to train

coco_loader = CocoDetection2Detr(args)
lit_deformable = LitDeformableDetr(args)

Train process

args.save = True # Uncomment this line to store trained weights
lit_deformable.run_train(
data_loader=coco_loader,
args=args,
project="deformable",
expe_name="coco_detr",
)

@LucBourrat1 LucBourrat1 added bug Something isn't working alonet labels Sep 8, 2021
@thibo73800
Copy link
Contributor

this should probably be addressed by @Johansmm

@Johansmm
Copy link
Contributor

Johansmm commented Sep 9, 2021

Yes. I will handle this error and will make a new pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alonet bug Something isn't working quick-fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants