Giter Club home page Giter Club logo

cnn-lstm-caption-generator's People

Contributors

mosessoh 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  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  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  avatar

Watchers

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

cnn-lstm-caption-generator's Issues

Import Error

When running eval_captions.py there is an ImportError: No module named pycocoevalcap.eval

I got the following error while running caption image file.Someone help me resolve this

Img: (256, 1, 512)
Sent: (256, ?, 512)
Combined: (256, ?, 512)
Traceback (most recent call last):
File "caption_image.py", line 47, in
main(sys.argv[1:])
File "caption_image.py", line 32, in main
model = Model(config)
File "/home/abc/caffe/cnnlstm/model.py", line 57, in init
lstm = tf.nn.rnn_cell.BasicLSTMCell(self.config.hidden_dim,forget_bias=1,input_size=self.config.embed_dim)
TypeError: init() got an unexpected keyword argument 'input_size'

can't down ./download files

Hey, I tried downloading it, but I am getting the above mentioned 404 Error. Can you please reupload the model?

SyntaxError: Missing parentheses in call to 'print'

Hi,
I am facing

**(tensorflow) [user@hostname CNN-LSTM-Caption-Generator]$ python3.4 caption_image.py -i images/pizza.jpg

File "caption_image.py", line 25
print '-'20
^
SyntaxError: Missing parentheses in call to 'print'
*

this error.

I am using conda in oracle linux 6.9.

Can you suggest what I am doing wrong?

The loss is NAN

Hi, author. I trained the model on the ubuntu 14.04 with CUDA 7.5, cudnn 0.4 and tensorflow 0.10, but the returned loss is always NAN. I don't know how to fix it.

a cuda runtime call was likely performed without using a streamExecutor context

Hey, when I use your demo, and run: python caption -i images/pizza.jpg, But get the problem: "a cuda runtime call was likely performed without using a streamExecutor context" which caused by the code of "with tf.Session as session", I know it because the file use caffe to extract cnn features and causes the cuda conflicting with tensorflow , what can I do?

The link in the download.sh can not be accessed

Hello, I am a senior student, thank you for providing this model, I need to study this model in order to do my graduation project. But download.sh does not work, I use google to visit inside the link, return 404. So can you provide the .pkl file for this model, thanks

connectivity issue

The connection is refused in download.sh.Can someone provide the new connection?

Unable to download model-37 file

Hello , I got a problem like this when I ran the project:

tensorflow/core/util/tensor_slice_reader.cc:93] Could not open best_model/model-37: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?

and I tried to download from google drive , it turned out that 404 error.

Model building environment

hi, because this model is implemented in python2, but the tensorflow installed on windows can only be based on python3.5, so the installation of this model can only be in linux?

NotFoundError

Tensor name "CNNLSTM/LSTM/multi_rnn_cell/cell_0/basic_lstm_cell/bias" not found in checkpoint files best_model/model-37
[[Node: save/RestoreV2_2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_2/tensor_names, save/RestoreV2_2/shape_and_slices)]]
[[Node: save/RestoreV2_21/_33 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_82_save/RestoreV2_21", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]]

This happens when I try to run this python caption_image.py -i images/pizza.jpg with tensorflow 1.2.0. What should I do to solve this problem? Thanks!

how to train?

thanks the author! and i wanna train new model , but don't know how to do it, could you please tell me or give a insutruction in the readme file?

Can you share the code to generate 'pkl' files?

I use the downloaded 'pkl' files your provided, and when loading them, I have encountered some issues:

with open('data_files/train_image_id2feature.pkl','rb') as f:
               self.train_image_id2feature = pickle.load(f)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd2 in position 1: ordinal not in range(128)

if I add 'encoding='latin1', another error raises:

with open('data_files/train_image_id2feature.pkl','rb') as f:
               self.train_image_id2feature = pickle.load(f, encoding='latin1')

_pickle.UnpicklingError: pickle data was truncated

val_image_id2feature.pkl also has the same problem
but index2token.pkl , preprocessed_train_captions.pkl files can be read successfully use the same way.

I use Python3.6, can you tell me how to solve it, and can you provide the original code to generate 'pkl' files?

Thank you very much!

Type error

When I run the caption-image file I am getting the following error
Img: (256, 1, 512)
Sent: (256, ?, 512)
Traceback (most recent call last):
File "caption_image.py", line 47, in
main(sys.argv[1:])
File "caption_image.py", line 32, in main
model = Model(config)
File "/home/abc/caffe/cnnlstm/model.py", line 52, in init
all_inputs = tf.concat(1, [img_input, sent_inputs])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1127, in concat
dtype=dtypes.int32).get_shape().assert_is_compatible_with(
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 932, in convert_to_tensor
as_ref=False)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1022, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 233, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 212, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 413, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 328, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
Please someone help me resolve this

Check failed: ReadProtoFromBinaryFile(param_file, param)

I'm very interested in your work and I try to run it. But I got <Failed to parse NetParameter file: /home/nemare/caffe-master/models/bvlc_googlenet/bvlc_googlenet.caffemodel> error.
I already downloaded bvlc_googlenet.caffemodel. Could you tell me how to solve this problem.

WARNING: Logging before InitGoogleLogging() is written to STDERR
F0727 14:30:36.093981 19138 upgrade_proto.cpp:86] Check failed: ReadProtoFromBinaryFile(param_file, param) Failed to parse NetParameter file: /home/nemare/caffe-master/models/bvlc_googlenet/bvlc_googlenet.caffemodel
*** Check failure stack trace: ***
Aborted (core dumped)

' failed: Connection refused' when run ' bash download.sh '

rzai@rzai00:/prj/CNN-LSTM-Caption-Generator$ bash download.sh
--2016-12-20 10:33:35-- https://googledrive.com/host/0B8-CPllE3RJqaHlRTWxxSTI3cW8/index2token.pkl
Resolving googledrive.com (googledrive.com)... 172.217.24.1, 2404:6800:4008:803::2001
Connecting to googledrive.com (googledrive.com)|172.217.24.1|:443... failed: Connection refused.
Connecting to googledrive.com (googledrive.com)|2404:6800:4008:803::2001|:443... failed: Network is unreachable.
--2016-12-20 10:34:38-- https://googledrive.com/host/0B8-CPllE3RJqaHlRTWxxSTI3cW8/preprocessed_train_captions.pkl
Resolving googledrive.com (googledrive.com)... 216.58.200.225, 2404:6800:4008:803::2001
Connecting to googledrive.com (googledrive.com)|216.58.200.225|:443... failed: Connection refused.
Connecting to googledrive.com (googledrive.com)|2404:6800:4008:803::2001|:443... failed: Network is unreachable.
--2016-12-20 10:35:41-- https://googledrive.com/host/0B8-CPllE3RJqaHlRTWxxSTI3cW8/train_image_id2feature.pkl
Resolving googledrive.com (googledrive.com)... 216.58.200.225, 2404:6800:4008:803::2001
Connecting to googledrive.com (googledrive.com)|216.58.200.225|:443... failed: Connection refused.
Connecting to googledrive.com (googledrive.com)|2404:6800:4008:803::2001|:443... failed: Network is unreachable.
--2016-12-20 10:36:44-- https://googledrive.com/host/0B8-CPllE3RJqaHlRTWxxSTI3cW8/val_image_id2feature.pkl
Resolving googledrive.com (googledrive.com)... 216.58.200.225, 2404:6800:4008:803::2001
Connecting to googledrive.com (googledrive.com)|216.58.200.225|:443... failed: Connection refused.
Connecting to googledrive.com (googledrive.com)|2404:6800:4008:803::2001|:443... failed: Network is unreachable.
--2016-12-20 10:37:47-- https://googledrive.com/host/0B8-CPllE3RJqaHlRTWxxSTI3cW8/checkpoint
Resolving googledrive.com (googledrive.com)... 216.58.200.225, 2404:6800:4008:803::2001
Connecting to googledrive.com (googledrive.com)|216.58.200.225|:443... failed: Connection refused.
Connecting to googledrive.com (googledrive.com)|2404:6800:4008:803::2001|:443... failed: Network is unreachable.
--2016-12-20 10:38:50-- https://googledrive.com/host/0B8-CPllE3RJqaHlRTWxxSTI3cW8/model-37
Resolving googledrive.com (googledrive.com)... 216.58.200.225, 2404:6800:4008:803::2001
Connecting to googledrive.com (googledrive.com)|216.58.200.225|:443... failed: Connection refused.
Connecting to googledrive.com (googledrive.com)|2404:6800:4008:803::2001|:443... failed: Network is unreachable.
--2016-12-20 10:39:52-- https://googledrive.com/host/0B8-CPllE3RJqaHlRTWxxSTI3cW8/model-37.meta
Resolving googledrive.com (googledrive.com)... 172.217.24.1, 2404:6800:4008:803::2001
Connecting to googledrive.com (googledrive.com)|172.217.24.1|:443... failed: Connection refused.
Connecting to googledrive.com (googledrive.com)|2404:6800:4008:803::2001|:443... failed: Network is unreachable.
rzai@rzai00:
/prj/CNN-LSTM-Caption-Generator$

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.