researchmm / img2poem Goto Github PK
View Code? Open in Web Editor NEW[MM'18] Beyond Narrative Description: Generating Poetry from Images by Multi-Adversarial Training
[MM'18] Beyond Narrative Description: Generating Poetry from Images by Multi-Adversarial Training
Anyone have a version of this repos for Tensorflow 2 and Python 3?
There is no training code. Could you provide the code for training?
Really great tool. I'm noticing that the default setting seems to use "Show and Tell ( 1 CNN } ) [ 29 ]", but I would like to use "I2P-GAN" method for improved results.
Loading Extracting Feature Module...
Loading Extracting Feature Module...
Traceback (most recent call last):
File "", line 1, in
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 106, in spawn_main
exitcode = _main(fd)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 115, in _main
prepare(preparation_data)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 226, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 278, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users-\Anaconda3\envs\py35\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users-\Anaconda3\envs\py35\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users-\Anaconda3\envs\py35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users-\Downloads\img2poem-master\code\src\test.py", line 7, in
extract_feature = nn_process.create('extract_feature')
File "C:\Users-\Downloads\img2poem-master\code\src\nn_process.py", line 19, in create
proc.start()
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\context.py", line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\context.py", line 313, in _Popen
return Popen(process_obj)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\popen_spawn_win32.py", line 34, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 144, in get_preparation_data
_check_not_importing_main()
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 137, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
Hi Would you please release the code for training process, if convenient. Thanks a lot!
Super interesting work!
I am getting this error when I try to run the test script. I can't seem to find the problem in other mxnet repos. I installed mxnet with pip install mxnet-cu90
for cuda 9.0.
$ python test.py
Loading Extracting Feature Module...
Process Process-1:
Traceback (most recent call last):
File "/mnt/drive1/tools/anaconda2/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
self.run()
File "/mnt/drive1/tools/anaconda2/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/mnt/drive3/gene/img2poem/code/src/nn_process.py", line 6, in pipe_process
lib = importlib.import_module(module_name)
File "/mnt/drive1/tools/anaconda2/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/mnt/drive3/gene/img2poem/code/src/extract_feature.py", line 56, in <module>
object_model = get_mod()
File "/mnt/drive3/gene/img2poem/code/src/extract_feature.py", line 41, in get_mod
(3, 512)])
File "/mnt/drive3/gene/img2poem/code/src/vgg_mx/symbol_vgg.py", line 26, in get_symbol
x = mx.sym.FullyConnected(data = x, num_hidden = 4096, flatten = True, name = 'fc6')
File "/home/gene/.local/lib/python2.7/site-packages/mxnet/_ctypes/symbol.py", line 181, in creator
ctypes.byref(sym_handle)))
File "/home/gene/.local/lib/python2.7/site-packages/mxnet/base.py", line 84, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
MXNetError: Cannot find argument 'flatten', Possible Arguments:
----------------
num_hidden : int, required
Number of hidden nodes of the output.
no_bias : boolean, optional, default=False
Whether to disable bias parameter.
, in operator FullyConnected(name="", flatten="True", num_hidden="4096")
run the test in the window 10.Error is:
Loading Extracting Feature Module...
Traceback (most recent call last):
File "../img2poem/code/src/test.py", line 7, in
extract_feature = nn_process.create('extract_feature')
File "..\img2poem\code\src\nn_process.py", line 19, in create
proc.start()
File "D:\ProgramData\Anaconda3\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 89, in init
reduction.dump(process_obj, to_child)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'create..pipe_process
Excuse me, could you please provide the training code? Thanks a lot.
Hi there!
Trying to get the code running on a M1 mac. I am running the command 'python test.py test.jpg' (after putting a test.png in the code/src folder).
I am getting this runtime error:
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
What is going wrong?
Thank you very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.