asanakoy / deeppose_tf

DeepPose implementation on TensorFlow. Original Paper http://arxiv.org/abs/1312.4659
Other
144 stars 61 forks source link

Error "Invalid argument" running on windows, python 3.5 #15

Closed tuan-seoultech closed 6 years ago

tuan-seoultech commented 6 years ago

I try to run the implementation with python 3.5 on windows 10. I have to change some function to change from python 2.x to python 3.5 such as: print "hello" ---> print("hello") xrange() --> range() izip --> zip Change some import style Finally, I can run data preparation. Then when I try to train network from lsp dataset and pretrained AlexNet. +It load the input data successfully. +Then, the error come when it run the code in function evaluate_pcp in regressionnet.py. for i, batch in tqdm(enumerate(test_it), total=num_batches): I think it comes from the reading data with multithread, but I don't know where the bug come from, and how can I debug the error. Please guide me how can I check the error, thank you.

The following is the stack trace:

Reading dataset from datasets/lsp_ext/train_joints.csv
8046it [00:43, 184.71it/s]G:\Pose\deeppose_tf-master\scripts\dataset.py:111: Use
rWarning: Skipping joint with incorrect joints coordinates. They are out of the
image.
image: G:/Pose/deeppose_tf-master\datasets/lsp_ext\images\im08075.jpg, joint: [
386.32211538  150.625     ], im.shape: (161, 241)
  'image: {}, joint: {}, im.shape: {}'.format(img_path, joints[i_joint], image_s
hape[:2]))
11000it [00:59, 186.13it/s]
Joints shape: (14, 2)
Reading dataset from datasets/lsp_ext/test_joints.csv
1000it [00:11, 83.85it/s]
Joints shape: (14, 2)
Reading dataset from datasets/lsp_ext/train_lsp_small_joints.csv
1000it [00:10, 99.88it/s]
Joints shape: (14, 2)
1000
<enumerate object at 0x000000002BE6D168>
  0%|                                                    | 0/8 [00:00<?, ?it/s]
Traceback (most recent call last):
File "scripts/train.py", line 242, in <module>
    main(sys.argv[1:])
  File "scripts/train.py", line 237, in main
    output_dir=args.o_dir
  File "scripts/train.py", line 77, in train_loop
    tag_prefix='test')
  File "G:\Pose\deeppose_tf-master\scripts\regressionnet.py", line 279, in evalu
ate_pcp
    for i, batch in tqdm(enumerate(test_it), total=num_batches):
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\site-package
s\tqdm\_tqdm.py", line 959, in __iter__
    for obj in iterable:
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\site-package
s\chainer\iterators\multiprocess_iterator.py", line 87, in __next__
    self._thread = self._prefetch_loop.launch_thread()
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\site-package
s\chainer\iterators\multiprocess_iterator.py", line 307, in launch_thread
    initargs=(self.dataset, self.mem_size, self.mem_bulk))
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\context.py", line 118, in Pool
    context=self.get_context())
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\pool.py", line 168, in __init__
    self._repopulate_pool()
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\pool.py", line 233, in _repopulate_pool
    w.start()
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\process.py", line 105, in start
    self._popen = self._Popen(self)
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\context.py", line 313, in _Popen
    return Popen(process_obj)
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\popen_spawn_win32.py", line 66, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\reduction.py", line 59, in dump
    ForkingPickler(file, protocol).dump(obj)
# OSError: [Errno 22] Invalid argument

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\spawn.py", line 106, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\icomlab\AppData\Local\Programs\Python\Python35\lib\multiprocess
ing\spawn.py", line 116, in _main
    self = pickle.load(from_parent)
# EOFError: Ran out of input
asanakoy commented 6 years ago

Sorry, the code is written in python 2.7. I'm not planning to support 3.5. It might happen that some more thing should be changed to be compatible with python 3.5.