-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
201 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from .dataset import LVISDataset, COCODatasets | ||
|
||
from .model import CLIPModel | ||
from .metrics import MutiLabelMetric | ||
from .dataset import * | ||
from .model import * | ||
from .metrics import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,11 @@ | |
|
||
model = dict( | ||
type='CLIPModel', | ||
) | ||
) | ||
|
||
val_evaluator = [ | ||
dict( | ||
type='MutiLabelMetric', | ||
threshold=0.1, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
_base_ = ['base.py'] | ||
|
||
val_dataset = dict( | ||
type='LVISDataset', | ||
data_root='data/lvis_v1', | ||
ann_file='annotations/lvis_v1_val.json', | ||
pipeline=[ | ||
dict(type='LoadImage'), | ||
dict(type='RAMTransforms'), | ||
dict(type='PackData'), | ||
], | ||
) | ||
|
||
val_dataloader = dict( | ||
batch_size=32, | ||
dataset=val_dataset, | ||
sampler=dict(type='DefaultSampler', shuffle=False), | ||
collate_fn=dict(type='default_collate') | ||
) | ||
|
||
model = dict( | ||
type='RAMModel', | ||
model_path='pretrained/ram/ram_plus_swin_large_14m.pth', | ||
llm_tag_des='data/lvis_v1/annotations/openset_label_embedding.pth' | ||
) | ||
|
||
val_evaluator = [ | ||
dict( | ||
type='MutiLabelMetric', | ||
threshold=0.5, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -259,4 +259,4 @@ | |
'scissors', 'teddy bear', 'hair drier', 'toothbrush' | ||
] | ||
|
||
cur_cates = coco_cates | ||
cur_cates = lvis_cates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters