Open malfonsoNeoris opened 2 years ago
here the error.. for resnet34
Traceback (most recent call last):
File "train.py", line 707, in
It is because the building blocks of R50/R101 is different from R18/R34: https://pytorch.org/hub/pytorch_vision_resnet/ So you need to modify basic block so that the backbone architecture is compatible with the pretrained weights.
hi, thanks for the info. i have added the BasicBlock similar to the one on pytorch to the backbone.py file and updated the config file when running resnet50/100 on 256/550 image size.. everything looks good. but with resnet 34/18 i'm getting 0 results on testing/inference. but while training.. the evaluation and map are up to 80%. Probably im doing something wrong.
In config for resnet18/34 i created the backbones resnet34_backbone = resnet101_backbone.copy({ 'name': 'ResNet34', 'path': 'resnet34-333f7ec4.pth', 'type': ResNetBackbone, 'args': ([3, 4, 6, 3],[],BasicBlock), 'transform': resnet_transform, })
then created specific confings this is the "default" for 101 yolact_edge_config = yolact_base_config.copy({ 'name': 'yolact_edge', #################### 'torch2trt_max_calibration_images': 0,
'torch2trt_backbone_int8': True,
'torch2trt_protonet_int8': True,
'torch2trt_fpn': True,
'torch2trt_prediction_module': True,
'use_fast_nms': False,
'dataset' : my_custom_dataset,
'num_classes':1+1,
# Image Size
'max_size': 256,
'min_size':200,
# Discard detections with width and height smaller than this (in absolute width and height)
'discard_box_width': 4 / 256,
'discard_box_height': 4 / 256,
# Training params
'lr_schedule': 'step',
'lr_steps': (4000, 6000, 8000, 9000),
'max_iter': 10000,
###################
})
then for example for 34 yolact_edge_resnet34_550_config = yolact_edge_config.copy({ 'name': 'yolact_edge_resnet34_550', 'backbone': yolact_resnet34_config.backbone,
# Image Size
'max_size': 550,
'min_size':200,
# Discard detections with width and height smaller than this (in absolute width and height)
'discard_box_width': 4 / 550,
'discard_box_height': 4 / 550,
})
attached. the config file, a test file, and the updated backbone with the BasicBlock example.zip
can you giveme a hint for where to look ?
You might want to confirm that the model runs well with no TensorRT enabled first.
You might want to confirm that the model runs well with no TensorRT enabled first.
I have trained the resnet18 and get the result, but when I try to eval the model with weights, here report the error: "Backbone: ResNet18 is not currently supported with TenSorRT. "
can you teach me how to modify the code?
Hi. great library. i have managed to run it on a nvidia Xavier NX with ~15FPS with 500 size images. Same "problem" of the others with also around 3G or ram consumed i was wondering if its possible to use/add resnet 18/34? which should giveme better fps and smaller memory footprint i have
failed Here my steps i have downloaded the pths for them from pytorch ( i saw that the resnet50 was of the same name of the pytorch models.. so i tryed!) Added config (basically just copy paste resnet50 and changed path and args accordanlly) resnet18_backbone = resnet101_backbone.copy({ 'name': 'ResNet18', 'path': 'resnet18-5c106cde.pth', 'type': ResNetBackbone, 'args': ([2, 2, 2, 2],), 'transform': resnet_transform, }) yolact_resnet18_config = yolact_base_config.copy({ 'name': 'yolact_resnet18',
'backbone': resnet18_backbone.copy({ 'selected_layers': list(range(1, 4)),
}),
}) yolact_edge_resnet18_config = yolact_edge_config.copy({ 'name': 'yolact_edge_resnet18', 'backbone': yolact_resnet18_config.backbone, })
and them tried to train, but a lot of error for the layers with different input/ouput sizes occurred ( sorry i deleted the messages and now i'm training other stuff.. but latter i will update with corresponding messages