ePSIC-DLS / particlespy

Package for analysing particles in electron microscopy data sets.
GNU General Public License v3.0
19 stars 9 forks source link

Improve training #71

Closed CameronGBell closed 3 years ago

CameronGBell commented 3 years ago

Improves and fleshes out trainable segmentation interface:

codecov[bot] commented 3 years ago

Codecov Report

Merging #71 (b0d17ca) into master (5225e33) will increase coverage by 2.10%. The diff coverage is 94.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
+ Coverage   86.39%   88.49%   +2.10%     
==========================================
  Files          15       15              
  Lines         992     1156     +164     
==========================================
+ Hits          857     1023     +166     
+ Misses        135      133       -2     
Impacted Files Coverage Δ
ParticleSpy/segimgs.py 91.57% <91.07%> (+11.81%) :arrow_up:
ParticleSpy/ParticleAnalysis.py 94.22% <100.00%> (+1.33%) :arrow_up:
ParticleSpy/custom_kernels.py 100.00% <100.00%> (ø)
ParticleSpy/segptcls.py 94.56% <100.00%> (+0.05%) :arrow_up:
ParticleSpy/tests/test_particle_clustering.py 100.00% <100.00%> (ø)
TomSlater commented 3 years ago

I think you'd modified the canvas_size to be larger (1024 vs 512) but if you're using a small screen resolution it's then not possible to see the bottom of the window. I've modified to vary the canvas_size with screen resolution. Maybe canvas_size should be the smaller of 0.8*screen height or 1024?

What do you think?

In the long term it would be great to make segUI resizeable.

CameronGBell commented 3 years ago

I think you'd modified the canvas_size to be larger (1024 vs 512) but if you're using a small screen resolution it's then not possible to see the bottom of the window. I've modified to vary the canvas_size with screen resolution. Maybe canvas_size should be the smaller of 0.8*screen height or 1024?

What do you think?

In the long term it would be great to make segUI resizeable.

I think that makes sense, a resizable segUI would make sense to implement alongside a zoomable canvas

TomSlater commented 3 years ago

Okay, I added an if statement to set to 1024 if smaller than the calculated height. I'll leave a resizeable window to you for another PR.

Everything else seems to work for me, so all looks okay. I will go through and change everything to lower case in a PR next week.

One last thing before merging. Could you add an example of training the classifier using an imported mask and not using the segUI? Just for those who don't want to run segUI (for those using cloud-based services etc).