Skip to content

Commit

Permalink
ss
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsaxmafia committed May 15, 2016
1 parent a7672a4 commit a41f5f0
Show file tree
Hide file tree
Showing 103 changed files with 6 additions and 5 deletions.
Binary file modified results/imagenet/img_0.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_0.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_1.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_1.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_10.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_10.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_11.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_11.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_12.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_12.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_13.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_13.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_14.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_14.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_15.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_15.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_16.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_16.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_17.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_17.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_18.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_18.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_19.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_19.ori.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_2.0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/imagenet/img_2.ori.jpg
Binary file modified results/imagenet/img_20.0.jpg
Binary file modified results/imagenet/img_20.ori.jpg
Binary file modified results/imagenet/img_21.0.jpg
Binary file modified results/imagenet/img_21.ori.jpg
Binary file modified results/imagenet/img_22.0.jpg
Binary file modified results/imagenet/img_22.ori.jpg
Binary file modified results/imagenet/img_23.0.jpg
Binary file modified results/imagenet/img_23.ori.jpg
Binary file modified results/imagenet/img_24.0.jpg
Binary file modified results/imagenet/img_24.ori.jpg
Binary file modified results/imagenet/img_25.0.jpg
Binary file modified results/imagenet/img_25.ori.jpg
Binary file modified results/imagenet/img_26.0.jpg
Binary file modified results/imagenet/img_26.ori.jpg
Binary file modified results/imagenet/img_27.0.jpg
Binary file modified results/imagenet/img_27.ori.jpg
Binary file modified results/imagenet/img_28.0.jpg
Binary file modified results/imagenet/img_28.ori.jpg
Binary file modified results/imagenet/img_29.0.jpg
Binary file modified results/imagenet/img_29.ori.jpg
Binary file modified results/imagenet/img_3.0.jpg
Binary file modified results/imagenet/img_3.ori.jpg
Binary file modified results/imagenet/img_30.0.jpg
Binary file modified results/imagenet/img_30.ori.jpg
Binary file modified results/imagenet/img_31.0.jpg
Binary file modified results/imagenet/img_31.ori.jpg
Binary file modified results/imagenet/img_32.0.jpg
Binary file modified results/imagenet/img_32.ori.jpg
Binary file modified results/imagenet/img_33.0.jpg
Binary file modified results/imagenet/img_33.ori.jpg
Binary file modified results/imagenet/img_34.0.jpg
Binary file modified results/imagenet/img_34.ori.jpg
Binary file modified results/imagenet/img_35.0.jpg
Binary file modified results/imagenet/img_35.ori.jpg
Binary file modified results/imagenet/img_36.0.jpg
Binary file modified results/imagenet/img_36.ori.jpg
Binary file modified results/imagenet/img_37.0.jpg
Binary file modified results/imagenet/img_37.ori.jpg
Binary file modified results/imagenet/img_38.0.jpg
Binary file modified results/imagenet/img_38.ori.jpg
Binary file modified results/imagenet/img_39.0.jpg
Binary file modified results/imagenet/img_39.ori.jpg
Binary file modified results/imagenet/img_4.0.jpg
Binary file modified results/imagenet/img_4.ori.jpg
Binary file modified results/imagenet/img_40.0.jpg
Binary file modified results/imagenet/img_40.ori.jpg
Binary file modified results/imagenet/img_41.0.jpg
Binary file modified results/imagenet/img_41.ori.jpg
Binary file modified results/imagenet/img_42.0.jpg
Binary file modified results/imagenet/img_42.ori.jpg
Binary file modified results/imagenet/img_43.0.jpg
Binary file modified results/imagenet/img_43.ori.jpg
Binary file modified results/imagenet/img_44.0.jpg
Binary file modified results/imagenet/img_44.ori.jpg
Binary file modified results/imagenet/img_45.0.jpg
Binary file modified results/imagenet/img_45.ori.jpg
Binary file modified results/imagenet/img_46.0.jpg
Binary file modified results/imagenet/img_46.ori.jpg
Binary file modified results/imagenet/img_47.0.jpg
Binary file modified results/imagenet/img_47.ori.jpg
Binary file modified results/imagenet/img_48.0.jpg
Binary file modified results/imagenet/img_48.ori.jpg
Binary file modified results/imagenet/img_49.0.jpg
Binary file modified results/imagenet/img_49.ori.jpg
Binary file modified results/imagenet/img_5.0.jpg
Binary file modified results/imagenet/img_5.ori.jpg
Binary file modified results/imagenet/img_50.0.jpg
Binary file modified results/imagenet/img_50.ori.jpg
Binary file modified results/imagenet/img_6.0.jpg
Binary file modified results/imagenet/img_6.ori.jpg
Binary file modified results/imagenet/img_7.0.jpg
Binary file modified results/imagenet/img_7.ori.jpg
Binary file modified results/imagenet/img_8.0.jpg
Binary file modified results/imagenet/img_8.ori.jpg
Binary file modified results/imagenet/img_9.0.jpg
Binary file modified results/imagenet/img_9.ori.jpg
11 changes: 6 additions & 5 deletions src/train.imagenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
weight_decay_rate = 0.00001
momentum = 0.9
batch_size = 500
lambda_recon = 0.9
lambda_adv = 0.1
lambda_recon = 0.99
lambda_adv = 0.01

overlap_size = 7
hiding_size = 64
Expand Down Expand Up @@ -72,8 +72,8 @@
mask_overlap = 1 - mask_recon

loss_recon_ori = tf.square( images_hiding - reconstruction )
loss_recon_center = tf.reduce_mean(tf.sqrt( 1e-5 + tf.reduce_sum(loss_recon_ori * mask_recon, [1,2,3]))) # Loss for non-overlapping region
loss_recon_overlap = tf.reduce_mean(tf.sqrt( 1e-5 + tf.reduce_sum(loss_recon_ori * mask_overlap, [1,2,3]))) * 10.# Loss for overlapping region
loss_recon_center = tf.reduce_mean(tf.sqrt( 1e-5 + tf.reduce_sum(loss_recon_ori * mask_recon, [1,2,3]))) / 10. # Loss for non-overlapping region
loss_recon_overlap = tf.reduce_mean(tf.sqrt( 1e-5 + tf.reduce_sum(loss_recon_ori * mask_overlap, [1,2,3]))) # Loss for overlapping region
loss_recon = loss_recon_center + loss_recon_overlap

loss_adv_D = tf.reduce_mean( tf.nn.sigmoid_cross_entropy_with_logits(adversarial_all, labels_D))
Expand Down Expand Up @@ -161,8 +161,9 @@

if iters == 0:
ii = 0
for test_image in test_images:
for test_image in test_images_ori:
test_image = (255. * (test_image+1)/2.).astype(int)
test_image[32:32+64,32:32+64] = 0
cv2.imwrite( os.path.join(result_path, 'img_'+str(ii)+'.ori.jpg'), test_image)
ii += 1
if ii > 50: break
Expand Down

0 comments on commit a41f5f0

Please sign in to comment.