Skip to content

Commit 0291899

Browse files
committed
model name update
1 parent 92d5140 commit 0291899

7 files changed

+10
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.tar

analysis_multi_nC.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333

3434

3535
## input arguments
36-
parser = argparse.ArgumentParser(description='Hierarchical Entropy Rate Superpixel (HERS) Segmentation on a folder of images',
36+
parser = argparse.ArgumentParser(description='DAL-HERS Superpixel Segmentation on a folder of images',
3737
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
38-
parser.add_argument('--pretrained', default='./pretrained/DGSS_loss=bce-rgb_date=23Feb2021.tar', help='path to the pretrained model')
38+
parser.add_argument('--pretrained', default='./pretrained/DAL_loss=bce-rgb_date=23Feb2021.tar', help='path to the pretrained model')
3939
parser.add_argument('--input_dir', default='./sample_imgs/input/', help='path to images folder')
4040
parser.add_argument('--output_dir', default='./sample_imgs/output/', help='path to output folder')
4141
parser.add_argument('--output_suff', default='', help='suffix to the output file')
@@ -57,7 +57,7 @@ def main():
5757

5858
# load the model
5959
network_data = torch.load(args.pretrained, map_location=args.device)
60-
model = DGSS(nr_channel=8, conv1_size=7)
60+
model = DAL(nr_channel=8, conv1_size=7)
6161
model.load_state_dict(network_data['state_dict'])
6262
model.eval()
6363

analysis_multi_nC.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MAIN_DIR="."
44
INPUT_DIR="${MAIN_DIR}/sample_imgs/input/"
55
OUTPUT_DIR="${MAIN_DIR}/sample_imgs/output/"
6-
PRETRAINED="${MAIN_DIR}/pretrained/DGSS_loss=bce-rgb_date=23Feb2021.tar"
6+
PRETRAINED="${MAIN_DIR}/pretrained/DAL_loss=bce-rgb_date=23Feb2021.tar"
77

88
python3 analysis_multi_nC.py \
99
--pretrained $PRETRAINED \

analysis_single_nC.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434

3535
## input arguments
36-
parser = argparse.ArgumentParser(description='Hierarchical Entropy Rate Superpixel (HERS) Segmentation on a folder of images',
36+
parser = argparse.ArgumentParser(description='DAL-HERS Superpixel Segmentation on a folder of images',
3737
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
3838
parser.add_argument('--nC', default=200, type=int, help='the number of desired superpixels')
3939
parser.add_argument('--pretrained', default='./pretrained/DGSS_loss=bce-rgb_date=23Feb2021.tar', help='path to the pretrained model')
@@ -58,7 +58,7 @@ def main():
5858

5959
# load the model
6060
network_data = torch.load(args.pretrained, map_location=args.device)
61-
model = DGSS(nr_channel=8, conv1_size=7)
61+
model = DAL(nr_channel=8, conv1_size=7)
6262
model.load_state_dict(network_data['state_dict'])
6363
model.eval()
6464

analysis_single_nC.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MAIN_DIR="."
44
INPUT_DIR="${MAIN_DIR}/sample_imgs/input/"
55
OUTPUT_DIR="${MAIN_DIR}/sample_imgs/output/"
6-
PRETRAINED="${MAIN_DIR}/pretrained/DGSS_loss=bce-rgb_date=23Feb2021.tar"
6+
PRETRAINED="${MAIN_DIR}/pretrained/DAL_loss=bce-rgb_date=23Feb2021.tar"
77

88
python3 analysis_single_nC.py \
99
--pretrained $PRETRAINED \
21 Bytes
Binary file not shown.

model/network.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ def forward(self, x):
139139
return out
140140

141141

142-
class DGSS(nn.Module):
142+
class DAL(nn.Module):
143143

144144
def __init__(self, nr_channel, conv1_size):
145145

146-
super(DGSS, self).__init__()
146+
super(DAL, self).__init__()
147147

148148
pad_size = int((conv1_size - 1) / 2)
149149
self.pad1 = nn.ReplicationPad2d((pad_size, pad_size, pad_size, pad_size)) # left, right, top, bottom

0 commit comments

Comments
 (0)