Deep Picker Inference error


I’m testing the Deep Picker and could run the Deep Train without problems, but get this error when using the inputs for Deep Inference:

[CPU: 2.90 GB]   Traceback (most recent call last):
  File "/data/loewith/tafurpet/software/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/PIL/", line 510, in _save
    fh = fp.fileno()
AttributeError: '_idat' object has no attribute 'fileno'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cryosparc_worker/cryosparc_compute/", line 84, in
  File "cryosparc_worker/cryosparc_compute/jobs/deep_picker/", line 535, in
  File "cryosparc_worker/cryosparc_compute/jobs/deep_picker/", line 861, in
  File "cryosparc_worker/cryosparc_compute/jobs/deep_picker/", line 866, in
  File "cryosparc_worker/cryosparc_compute/jobs/deep_picker/", line 819, in
  File "/data/loewith/tafurpet/software/cryosparc/cryosparc_worker/cryosparc_compute/", line 97, in showarray
    PIL.Image.fromarray(newa, 'RGBA' if cmap is not None else None).save(f, fmt)
  File "/data/loewith/tafurpet/software/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/PIL/", line 2151, in save
    save_handler(self, fp, filename)
  File "/data/loewith/tafurpet/software/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/PIL/", line 1339, in _save
    ImageFile._save(im, _idat(fp, chunk), [("zip", (0, 0) + im.size, 0, rawmode)])
  File "/data/loewith/tafurpet/software/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/PIL/", line 518, in _save
    e.setimage(, b)
SystemError: tile cannot extend outside image

Any help would be greatly appreciated!


I get the exact same error when trying the deep picker out on micrographs collected on a krios in superres mode. Training works fine but the inference job fails.

Me too! Fine during training, but same error during inference. Does anyone have any idea what causes this?

I’m getting the same behavior. Has a solution to this been found yet?

1 Like

Hi @hansenbry, @ben_butt, @gdodge, @LTP,

Can you make sure you’re on the latest version of cryoSPARC?
Also, did you run this job with the “Show plots” parameter turned on? If you did, can you try running the job again with it turned off?

Deep picker inference is now working for me on version v3.2.0+210413 (Optional patches applied).

The particles I used were generated in kind of an unusual way, so I’m not sure if training from template picks/manual picks work.

Initial picks came from CrYOLO. I imported the particles, extracted, ran a few rounds of 2D classification, then trained on ~45 micrographs with at least 10 particles from the best looking classes in each. Training curves pasted below.

1 Like

Patch v3.2.0+210601 released yesterday resolves this issue: Patch 210601 is available for cryoSPARC v3.2.0

Hi @stephan, I am getting different error in deep picker inference job (cs v3.2.0+210803):

[CPU: 2.13 GB]   Traceback (most recent call last): File "cryosparc_worker/cryosparc_compute/", line 84, in 
File "cryosparc_worker/cryosparc_compute/jobs/deep_picker/", line 535, in 
File "cryosparc_master/cryosparc_compute/jobs/deep_picker/", line 875, in 
File "cryosparc_master/cryosparc_compute/jobs/deep_picker/", line 880, in 
File "cryosparc_master/cryosparc_compute/jobs/deep_picker/", line 792, in 
File "/mnt/ape2/cryosparc/software/cryosparc/cryosparc_worker-cu11.3.1/cryosparc_compute/", line 52, in showarray 
  a = a.reshape(-1, a.shape[-2], a.shape[-1]) ValueError: cannot reshape array of size 0 into shape (0,1) 

I do not see any parameters in ‘Compute settings’ section, the only parameters that are listed in the job are in the ‘inference settings’ section (‘Inference pixel threshold’, and ‘show plots’). Is that normal? Train job ran well.

Hi @mbs,

Thanks for reporting. We’ll look into this and get back to you.

Hi @mbs ,

It looks like the job is erroring while trying to display the micrograph. If you turn off the ‘Show plots’ parameter it should proceed past this point. When you run it again, can you paste the whole job log and also the parameters you used for both training and inference?