| |
| |
|
|
| |
| backend_config = dict( |
| type='tensorrt', |
| common_config=dict( |
| fp16_mode=True, |
| max_workspace_size=1 << 30, |
| ), |
| model_inputs=[ |
| dict( |
| input_shapes=dict( |
| |
| input=dict( |
| min_shape=[1, 3, 560, 560], |
| opt_shape=[1, 3, 560, 560], |
| max_shape=[1, 3, 800, 1333], |
| ) |
| ) |
| ) |
| ] |
| ) |
|
|
| |
| onnx_config = dict( |
| type='onnx', |
| export_params=True, |
| keep_initializers_as_inputs=False, |
| opset_version=17, |
| save_file='model.onnx', |
| input_names=['input'], |
| output_names=['roi_features', 'dense_features'], |
| input_shape=None, |
| optimize=True, |
| dynamic_axes={ |
| 'input': { |
| 0: 'batch', |
| 2: 'height', |
| 3: 'width' |
| }, |
| 'roi_features': { |
| 0: 'num_rois', |
| }, |
| 'dense_features': { |
| 0: 'batch', |
| 2: 'feat_height', |
| 3: 'feat_width' |
| } |
| } |
| ) |
|
|
| |
| codebase_config = dict( |
| type='mmdet', |
| task='ObjectDetection', |
| model_type='end2end', |
| post_processing=dict( |
| score_threshold=0.05, |
| confidence_threshold=0.005, |
| iou_threshold=0.5, |
| max_output_boxes_per_class=200, |
| pre_top_k=5000, |
| keep_top_k=100, |
| background_label_id=-1, |
| ) |
| ) |
|
|
| |
| evaclip_config = dict( |
| |
| model_name='EVA02-CLIP-B-16', |
| |
| |
| image_size=560, |
| patch_size=16, |
| |
| |
| feature_mode='csa', |
| |
| |
| use_rope=True, |
| |
| |
| disable_xformers=True, |
| ) |
|
|
| |
| model_paths = dict( |
| |
| evaclip_b16='/mnt/SSD8T/home/wjj/code/my_CLIPSelf/checkpoints/EVA02_CLIP_B_psz16_s8B.pt', |
| evaclip_l14_336='/mnt/SSD8T/home/wjj/code/my_CLIPSelf/checkpoints/EVA02_CLIP_L_psz14_336_s8B.pt', |
| |
| |
| declip_csa_b16=None, |
| declip_csa_l14_336=None, |
| ) |
|
|
| |
| data_config = dict( |
| |
| coco_root='/mnt/SSD8T/home/wjj/dataset/standard_coco', |
| train_ann='annotations/instances_train2017.json', |
| val_ann='annotations/panoptic_val2017.json', |
| train_img='train2017', |
| val_img='val2017', |
| panoptic_segm='annotations/panoptic_val2017', |
| |
| |
| embed_path='metadata/coco_panoptic_clip_hand_craft_EVACLIP_ViTB16.npy', |
| ) |
|
|
| |
| benchmark_config = dict( |
| |
| warmup_rounds=10, |
| test_rounds=100, |
| |
| |
| batch_sizes=[1, 4, 8], |
| |
| |
| input_sizes=[(560, 560), (640, 640), (800, 1333)], |
| |
| |
| sync_cuda=True, |
| ) |
|
|