nejyeah / DeepPicker-python

This is the source code for the paper DeepPicker.
31 stars 21 forks source link

unpack requires a string argument of length 1024 #5

Open SanatMoharir opened 5 years ago

SanatMoharir commented 5 years ago

@nejyeah Whenever I am doing step 1 python autoPick.py --inputDir '/home/vidya/Desktop/Deeppicker' --pre_trained_model './trained_model/model_demo_type3' --particle_size 50 --mrc_number -1 --outputDir '../autopick-results-by-demo-type3' --coordinate_symbol '_cnnPick' --threshold 0.5

(I have mrc file of 55 mb)

This is the error erupting:

I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-03-01 16:51:41.825040: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:964] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2019-03-01 16:51:41.825609: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties: name: GeForce 930MX major: 5 minor: 0 memoryClockRate(GHz): 1.0195 pciBusID: 0000:01:00.0 totalMemory: 1.96GiB freeMemory: 1.70GiB 2019-03-01 16:51:41.825627: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0 2019-03-01 16:51:42.466682: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-03-01 16:51:42.466722: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0 2019-03-01 16:51:42.466731: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N 2019-03-01 16:51:42.466896: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1453 MB memory) -> physical GPU (device: 0, name: GeForce 930MX, pci bus id: 0000:01:00.0, compute capability: 5.0) /home/vidya/Desktop/Deeppicker/mrc1.mrc Traceback (most recent call last): File "autoPick.py", line 101, in main() File "autoPick.py", line 98, in main pick_particle() File "autoPick.py", line 87, in pick_particle coordinate = autopicker.pick(mrc_file_all[i]) File "/home/vidya/Desktop/Deeppicker/autoPicker.py", line 134, in pick header, body = DataLoader.readMrcFile(mrc_filename) File "/home/vidya/Desktop/Deeppicker/dataLoader.py", line 227, in readMrcFile header = struct.unpack(header_fmt,data[0:1024]) struct.error: unpack requires a string argument of length 1024

Please can you help me with the issue ? Thank you in advance !!!!

nejyeah commented 5 years ago

Hi It seems related to the python package 'struct' and mrc format. I am not sure whether the mrc header format has changed or not. Maybe you can try another way to read the header information of mrc file.

header_fmt = '10i6f3i3f2i100c3f4cifi800c'  # more information about the header please refer to mrc format in Internet.
header = struct.unpack(header_fmt,data[0:1024])
SanatMoharir commented 5 years ago

Hi, can you please tell me your system information used for running the deeppicker ie. Ubuntu version , tensorflow version, cuda version, cudnn version, Python version. Because I am not able to run deeppicker. My system information is: Ubuntu 18.4 , Tensorflow 1.12.0 -GPU, Cuda 9.0, cudNN 7.05, Python 3.6, GTX 840M Can you please guide me with this.

nejyeah commented 5 years ago

Sorry, I have lost the original system information.
It may be built on Ubuntu12.04, Tensorflow 0.x, cuda 7.5 , python2.7 etc. For now, it is hard to run successfully without fixing the old API of Tensorflow. Sorry for missing the target version of Tensorflow. The 'struct.uppack' error seems to have relationship with the version of python. You can try python2.7. All errors should be related to the Tensorflow API.

SanatMoharir commented 5 years ago

@nejyeah I am very confused with the flow of running the Deeppicker can you please help me with that ? I have one MRC file I just want to directly pick particles from it. So which step should I follow ? Please refer the following link for MRC file: https://drive.google.com/drive/folders/12FDYd676x6UWF78RCoGcfWyIAeeiJBjB?usp=sharing

SanatMoharir commented 5 years ago

@nejyeah Do you have any updated version available or any other method you can suggest which is supported by the current tensorflow version or my current system.

nejyeah commented 5 years ago

Maybe you can try this docker image: Issue #2

SanatMoharir commented 5 years ago

Hi @nejyeah I tried running the docker image but it won't run. I have pulled the docker image and it is showing as my repository but, after I enter the "docker run thorstenwagner/docker-deeppicker" command it won't just run and it is exiting. Can you please help me with that ?

SanatMoharir commented 5 years ago

Hi @nejyeah Hey, I just found the way on stackoverflow docker run -i -t thorstenwagner/docker-deeppicker:latest /bin/bash worked for me for the above issue.

I have another issue: How do I run the deeppicker (which Commands to use for program be able to pick the particles from given MRC image) Can you please help me with that ? Thank you in advance !!!!

nejyeah commented 5 years ago

You can try the step 4. Picking in readme.md. The picked coordinate results will be save in relion .star format. Then check the picked results in relion. If the results seems too bad, it may caused by the big difference within the pretrained-model particles and the target particles. You need to train a new model based on labeled particles. If the results seems not that bad, you can refer to 3.4 train type4 to use relion 2D classification to clean the results and re-train the model based on the 2D classification results. Then do picking again.