moberweger / deep-prior-pp

Improving Fast And Accurate 3D Hand Pose Estimation
GNU General Public License v3.0
144 stars 40 forks source link

Loading test_1 dataset error #8

Closed weiguochow closed 6 years ago

weiguochow commented 6 years ago

Hi, I have split the test folder into test_1 and test_2, and the train dataset is loading correctly. But there was error when loading the test_1 part. Can you give me some advice? Thank you very much!

regards, weiguo

create data Loading train100%|##########################################################################################################################################################################################| Loaded 72757 samples. Save cache data to ./cache//NYUImporter_train_False_gt_300_cache.pkl Shuffling Loading train100%|##########################################################################################################################################################################################| Loaded 72757 samples. Save cache data to ./cache//NYUImporter_train_False_com_300_cache.pkl Shuffling Traceback (most recent call last): File "main_nyu_com_refine.py", line 55, in Seq2_1 = di.loadSequence('test_1', docom=True) File "/home/alex/PhD/DeepPrior/deep-prior-pp-master/src/data/importers.py", line 958, in loadSequence mat = scipy.io.loadmat(trainlabels) File "/home/alex/anaconda2/envs/tensorflow/lib/python2.7/site-packages/scipy/io/matlab/mio.py", line 141, in loadmat MR, file_opened = mat_reader_factory(file_name, appendmat, **kwargs) File "/home/alex/anaconda2/envs/tensorflow/lib/python2.7/site-packages/scipy/io/matlab/mio.py", line 64, in mat_reader_factory byte_stream, file_opened = _open_file(file_name, appendmat) TypeError: 'NoneType' object is not iterable

moberweger commented 6 years ago

@weiguochow The error looks like there is something wrong with the annotation file. I can open the mat file with scipy 0.13.3 . Did you try opening the mat file with ipython or similar?

weiguochow commented 6 years ago

@moberweger Thank you for your guide, I have fixed the problem. Then I want to rerun the code, for I used tensorflow as the framework, that I am not very familiar with the Theano. Can you give me some advice on the following error? regards weiguo

Save cache data to ./cache//MSRA15Importer_P7_None_gt_160_cache.pkl Shuffling Loading P8100%|#############################################################################################################################################################################################| Loaded 8492 samples. Save cache data to ./cache//MSRA15Importer_P8_None_gt_150_cache.pkl Shuffling training: P1 P2 P3 P4 P5 P6 P7 P8 testing: P0 data size: 4242Mb 1.07752 0.938656 -1.03945 -0.991144 1.0 1.0 -1.0 -1.0 create network setup trainer Train size: 4242.25MB, Memory available: 925.2MB, sample size: 0.0625MB, aligned memory: 920.0MB 67876 train samples, 8499 val samples, batch size 128 5 macro batches, 115 mini batches per macro, 531 full mini batches total 1 data chunks, 67876 train samples total Loading 5 macro batches a 920.0MB Loading 5 macro batches a 920.0MB Loading 5 macro batches a 920.0MB Loading 5 macro batches a 920.0MB compiling train_model() ... Traceback (most recent call last): File "main_msra15_posereg_embedding_crossval.py", line 155, in poseNetTrainer.compileFunctions(compileDebugFcts=False)

TypeError: Cannot convert Type TensorType(float32, 4D) (of Variable Subtensor{int64:int64:}.0) into Type TensorType(float64, 4D). You can try to manually convert Subtensor{int64:int64:}.0 into a TensorType(float64, 4D).

moberweger commented 6 years ago

In theano this is a common problem. The reason is, that the floating point precision does not match the device. In order to solve that problem, you have to run the program like THEANO_FLAGS=device=gpu,floatX=float32

WeihongM commented 6 years ago

@weiguochow I also met your first error above, can you share how you solved the problem? Hope for your help !