Skip to content

Commit

Permalink
Added WeightGeneration and cleared DWI.
Browse files Browse the repository at this point in the history
Added agg results to file (IoU, Acc, Prec)
  • Loading branch information
fcdl94 authored and fcdl94 committed Feb 22, 2021
1 parent b63dc19 commit b86042f
Show file tree
Hide file tree
Showing 11 changed files with 468 additions and 122 deletions.
3 changes: 2 additions & 1 deletion argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ def modify_command_options(opts):
opts.method = "FT"
elif opts.method == 'RT':
opts.train_only_novel = True
opts.train_only_classifier = True
opts.method = "FT"
opts.lr_cls = 10

if opts.train_only_classifier or opts.train_only_novel:
if opts.train_only_classifier:
opts.freeze = True
opts.lr_head = 0.

Expand Down
Binary file added data/cityscapes/split/inverse_dict_train.pkl
Binary file not shown.
92 changes: 92 additions & 0 deletions data/coco/labels.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
0: unlabeled
1: person
2: bicycle
3: car
4: motorcycle
5: airplane
6: bus
7: train
8: truck
9: boat
10: traffic light
11: fire hydrant
12: street sign
13: stop sign
14: parking meter
15: bench
16: bird
17: cat
18: dog
19: horse
20: sheep
21: cow
22: elephant
23: bear
24: zebra
25: giraffe
26: hat
27: backpack
28: umbrella
29: shoe
30: eye glasses
31: handbag
32: tie
33: suitcase
34: frisbee
35: skis
36: snowboard
37: sports ball
38: kite
39: baseball bat
40: baseball glove
41: skateboard
42: surfboard
43: tennis racket
44: bottle
45: plate
46: wine glass
47: cup
48: fork
49: knife
50: spoon
51: bowl
52: banana
53: apple
54: sandwich
55: orange
56: broccoli
57: carrot
58: hot dog
59: pizza
60: donut
61: cake
62: chair
63: couch
64: potted plant
65: bed
66: mirror
67: dining table
68: window
69: desk
70: toilet
71: door
72: tv
73: laptop
74: mouse
75: remote
76: keyboard
77: cell phone
78: microwave
79: oven
80: toaster
81: sink
82: refrigerator
83: blender
84: book
85: clock
86: vase
87: scissors
88: teddy bear
89: hair drier
90: toothbrush
91: hair brush
9 changes: 6 additions & 3 deletions methods/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
from .trainer import Trainer
from .imprinting import *

methods = {"FT", "SPN", "COS", "WI", 'DWI', 'WM', "AMP", "WG", "GIFS", "LWF", "MIB", "ILT", "RT"}
methods = {"FT", "SPN", "COS", "WI", 'DWI', 'WM', "AMP", "WG", "SWG", "GIFS", "LWF", "MIB", "ILT", "RT"}


def get_method(opts, task, device, logger):
if opts.method == 'WI':
opts.method = 'COS'
return WeightImprinting(task=task, device=device, logger=logger, opts=opts)
if opts.method == 'WG':
elif opts.method == 'WG':
opts.method = 'COS'
return WeightGenerator(task=task, device=device, logger=logger, opts=opts)
return ContextWiseWeightImprinting(task=task, device=device, logger=logger, opts=opts)
elif opts.method == 'SWG':
opts.method = 'COS'
return SpatialWeightGenerator(task=task, device=device, logger=logger, opts=opts)
elif opts.method == 'DWI':
opts.method = 'COS'
return DynamicWI(task=task, device=device, logger=logger, opts=opts)
Expand Down
Loading

0 comments on commit b86042f

Please sign in to comment.