Giter Site home page Giter Site logo

gsrnet's People

Contributors

pengzhou1108 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gsrnet's Issues

OutOfRangeError for another dataset

Hi, thank you for your great job, the code is worked fine in the CAISA dataset. However, I am struggling with an issue when the code is applied in another dataset (COVER). The tfrecords file of COVER is generated according to the "im_pre_casia_pair.py", but get an error when I use the "train_ad_tamper_aug_vgg16_fusion_2D.py". The early version of TF is hard for me. Any help would be appreciated!
2021-10-18 09-43-19屏幕截图

about directory name

{ _NQ 65(G5U$4M4A0 C)%G

can you explain the mean of each directory?
e.g:train_dir、train_dir2、dataset、mask_dir、test_dir

Unable to use pretrained model

When attempting to do a dry run of the network using the pretrained model checkpoint from Google Drive I am met with the traceback below. I am using Tensorflow 1.4 and Python 3.4 on Ubuntu 18.04.

Command: python3.4 dry_run.py --model_weights='./ckpt/model.ckpt-pretrained' --vis=True --dataset='single_img' --save-dir='./output'

WARNING:tensorflow:From dry_run.py:300: calling argmax (from tensorflow.python.ops.math_ops) with dimension is deprecated and will be removed in a future version.
Instructions for updating:
Use the `axis` argument instead
2020-10-27 22:17:21.911705: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1323, in _do_call
    return fn(*args)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1302, in _run_fn
    status, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: Tensor name "discriminator/conv1_batchnorm1/pop_var" not found in checkpoint files ./ckpt/model.ckpt-pretrained
	 [[Node: save/RestoreV2_6 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_6/tensor_names, save/RestoreV2_6/shape_and_slices)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "dry_run.py", line 443, in <module>
    main()
  File "dry_run.py", line 325, in main
    load(loader, sess, args.model_weights)
  File "dry_run.py", line 89, in load
    saver.restore(sess, ckpt_path)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 1666, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 889, in run
    run_metadata_ptr)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1120, in _run
    feed_dict_tensor, options, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1317, in _do_run
    options, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1336, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Tensor name "discriminator/conv1_batchnorm1/pop_var" not found in checkpoint files ./ckpt/model.ckpt-pretrained
	 [[Node: save/RestoreV2_6 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_6/tensor_names, save/RestoreV2_6/shape_and_slices)]]

Caused by op 'save/RestoreV2_6', defined at:
  File "dry_run.py", line 443, in <module>
    main()
  File "dry_run.py", line 324, in main
    loader = tf.train.Saver(var_list=restore_var_2)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 1218, in __init__
    self.build()
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 1227, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 1263, in _build
    build_save=build_save, build_restore=build_restore)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 751, in _build_internal
    restore_sequentially, reshape)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 427, in _AddRestoreOps
    tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 267, in restore_op
    [spec.tensor.dtype])[0])
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 1021, in restore_v2
    shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
    op_def=op_def)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 1470, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

NotFoundError (see above for traceback): Tensor name "discriminator/conv1_batchnorm1/pop_var" not found in checkpoint files ./ckpt/model.ckpt-pretrained
	 [[Node: save/RestoreV2_6 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_6/tensor_names, save/RestoreV2_6/shape_and_slices)]]

It is worth noting that the tensor not being found is not always the same. I have also gotten this error for "discriminator/conv1_1/b", "discriminator/conv5_batchnorm1/scale", "discriminator/fc9_voc12/filter", and "discriminator/conv5_batchnorm2/pop_mean" to name a few.

OutOfRangeError

Sorry to be a bother. I am running the train_default.sh using the tfrecord file in the google drive link. However, when the training progress goes to 195 steps, an error occured.
I am confused about this error, is there anything wrong with the tfrecord file?

Traceback (most recent call last):
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
    return fn(*args)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_3_create_inputs/target_queue_1/fifo_queue' is closed and has insufficient elements (requested 4, current size 3)
	 [[{{node create_inputs/target_queue_1}}]]
	 [[{{node sparse_softmax_cross_entropy_loss/assert_broadcastable/AssertGuard/Assert/data_1}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "train_ad_tamper_aug_vgg16_fusion_2D.py", line 884, in <module>
    main()
  File "train_ad_tamper_aug_vgg16_fusion_2D.py", line 867, in main
    D_loss_value, _ = sess.run([D_loss, D_train_op], feed_dict=feed_dict)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 929, in run
    run_metadata_ptr)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1152, in _run
    feed_dict_tensor, options, run_metadata)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run
    run_metadata)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_3_create_inputs/target_queue_1/fifo_queue' is closed and has insufficient elements (requested 4, current size 3)
	 [[node create_inputs/target_queue_1 (defined at train_ad_tamper_aug_vgg16_fusion_2D.py:202) ]]
	 [[node sparse_softmax_cross_entropy_loss/assert_broadcastable/AssertGuard/Assert/data_1 (defined at train_ad_tamper_aug_vgg16_fusion_2D.py:648) ]]

Caused by op 'create_inputs/target_queue_1', defined at:
  File "train_ad_tamper_aug_vgg16_fusion_2D.py", line 884, in <module>
    main()
  File "train_ad_tamper_aug_vgg16_fusion_2D.py", line 435, in main
    target_gt_batch, target_batch,target_label_batch, target_image_ids, target_distort_batch, _ =build_input(args, is_authentic=False, queue_name='target_queue',input_queue_name='target_input_queue')
  File "train_ad_tamper_aug_vgg16_fusion_2D.py", line 202, in build_input
    name=queue_name)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 324, in new_func
    return func(*args, **kwargs)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/training/input.py", line 1186, in batch_join
    name=name)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/training/input.py", line 828, in _batch_join
    dequeued = queue.dequeue_many(batch_size, name=name)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/data_flow_ops.py", line 488, in dequeue_many
    self._queue_ref, n=n, component_types=self._dtypes, name=name)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 3645, in queue_dequeue_many_v2
    timeout_ms=timeout_ms, name=name)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
    op_def=op_def)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
    op_def=op_def)
  File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1801, in __init__
    self._traceback = tf_stack.extract_stack()

OutOfRangeError (see above for traceback): FIFOQueue '_3_create_inputs/target_queue_1/fifo_queue' is closed and has insufficient elements (requested 4, current size 3)
	 [[node create_inputs/target_queue_1 (defined at train_ad_tamper_aug_vgg16_fusion_2D.py:202) ]]
	 [[node sparse_softmax_cross_entropy_loss/assert_broadcastable/AssertGuard/Assert/data_1 (defined at train_ad_tamper_aug_vgg16_fusion_2D.py:648) ]]

image

I would like to cite your paper. Can you send me this original image? Thank you very much. My email : [email protected]
微信图片_GSR

about model.ckpt-pretrained

i can not find the path of model.ckpt-pretrained.Can you provide a URL for model.ckpt-pretrained file? Thank you very much

net_skeleton.ckpt

hi, I can't find the "net_skeleton.ckpt".Can you help me? thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.