Error in "Find particles from segmentation"

102 views
Skip to first unread message

Genis Valentin

unread,
Aug 27, 2021, 5:53:06 AM8/27/21
to EMAN2
Hello everyone!

I'm going through the tomography ribosome tutorial dataset and trying to perform the cnn-based segmentation and particle picking. 

I'm running using e2projectmanager.py
e2version.py reports 
EMAN 2.91 final ( GITHUB: 2021-03-08 11:36 - commit: 81caed2 )
Your Python version is: 3.7.9

I could train and apply the neural network, but the "Find particles from segmentation job" fails. This is the command that fails

/opt/eman2-sphire-sparx/bin/e2spt_extractfromseg.py segmentations/mixedCTEM_tomo1__cnn_good_apply.hdf tomograms/mixedCTEM_tomo1__bin4.hdf --thresh=1.0 --boxsz=32 --random=-1 --massthresh=20.0 --edge=4 --sort --ppid=-2

This is the terminal output of the failed job:

NOT Writing notes, ppid=-2
Traceback (most recent call last):
  File "/opt/eman2-sphire-sparx/bin/e2spt_extractfromseg.py", line 154, in <module>
    main()
  File "/opt/eman2-sphire-sparx/bin/e2spt_extractfromseg.py", line 141, in main
    js["class_list"]=clst
  File "/opt/eman2-sphire-sparx/lib/python3.7/site-packages/EMAN2jsondb.py", line 905, in setval
    if not deferupdate : self.sync()
  File "/opt/eman2-sphire-sparx/lib/python3.7/site-packages/EMAN2jsondb.py", line 747, in sync
    jss=json.dumps(self.data,indent=0,sort_keys=True,default=obj_to_json) # write the whole dictionary back to disk
  File "/opt/eman2-sphire-sparx/lib/python3.7/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/opt/eman2-sphire-sparx/lib/python3.7/json/encoder.py", line 201, in encode
    chunks = list(chunks)
  File "/opt/eman2-sphire-sparx/lib/python3.7/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/opt/eman2-sphire-sparx/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/opt/eman2-sphire-sparx/lib/python3.7/json/encoder.py", line 353, in _iterencode_dict
    items = sorted(dct.items(), key=lambda kv: kv[0])
TypeError: '<' not supported between instances of 'int' and 'str'


The training and the segmentation results of the cnn look like this.

cnn.png
segmentation.png

Thanks in advance for the help and for the great software!

Genis

MuyuanChen

unread,
Aug 27, 2021, 8:00:40 AM8/27/21
to em...@googlegroups.com
Maybe putting something in the —featurename option will solve this. Also in 2.91, you can do automatic particle picking with a more dedicated CNN particle picker, bypassing the segmentation step. 


<cnn.png>
<segmentation.png>

Thanks in advance for the help and for the great software!

Genis

--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/75670d25-0b16-4339-86d8-bf66f03de50bn%40googlegroups.com.
<segmentation.png><cnn.png>

Genis Valentin

unread,
Aug 30, 2021, 9:25:31 AM8/30/21
to EMAN2
Thanks for the response!

Adding --featurename did not help, but the automatic particle picking cnn worked!

Best regards

Genis
Reply all
Reply to author
Forward
0 new messages