Skip to content

Commit

Permalink
resnet
Browse files Browse the repository at this point in the history
  • Loading branch information
cl0ver012 committed Jun 9, 2018
1 parent fed11dc commit 38ff265
Show file tree
Hide file tree
Showing 5 changed files with 6,266 additions and 1,548 deletions.
6 changes: 3 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
img_rows, img_cols = 320, 320
img_rows_half, img_cols_half = 160, 160
img_rows, img_cols = 256, 256
# img_rows_half, img_cols_half = 160, 160
channel = 4
batch_size = 40
batch_size = 8
epochs = 1000
patience = 50
num_samples = 43100
Expand Down
5 changes: 1 addition & 4 deletions data_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def __getitem__(self, idx):

length = min(batch_size, (len(self.names) - i))
batch_x = np.empty((length, img_rows, img_cols, 4), dtype=np.float32)
batch_y = np.empty((length, img_rows, img_cols, 11), dtype=np.float32)
batch_y = np.empty((length, img_rows, img_cols, 2), dtype=np.float32)

for i_batch in range(length):
name = self.names[i]
Expand Down Expand Up @@ -149,9 +149,6 @@ def __getitem__(self, idx):
mask = np.equal(trimap, 128).astype(np.float32)
batch_y[i_batch, :, :, 0] = alpha / 255.
batch_y[i_batch, :, :, 1] = mask
batch_y[i_batch, :, :, 2:5] = image / 255.
batch_y[i_batch, :, :, 5:8] = fg / 255.
batch_y[i_batch, :, :, 8:11] = bg / 255.

i += 1

Expand Down
Loading

0 comments on commit 38ff265

Please sign in to comment.