Imagedraw fixes & update logging#1431
Merged
Merged
Conversation
Collaborator
Author
|
Example cellpose GUI stdout: [GUI INFO] : WRITING LOG OUTPUT TO /home/raridenm/.cellpose/run.log
cellpose version: 4.0.10.dev27+g74b6ba06c.d20260320
platform: linux
python version: 3.13.3
torch version: 2.8.0+cu128
GUI_INFO: image shape: (600, 600, 3)
GUI_INFO: normalization checked: computing saturation levels (and optionally filtered image)
{'lowhigh': None, 'percentile': [1.0, 99.0], 'normalize': True, 'norm3D': True, 'sharpen_radius': 0.0, 'smooth_radius': 0.0, 'tile_norm_blocksize': 0.0, 'tile_norm_smooth3D': 1.0, 'invert': False}
[0, 255.0]
(1, 600, 600, 3)
2026-04-09 17:16:54,652 [io INFO] 53 masks found
2026-04-09 17:16:54,654 [io INFO] creating cellcolors and drawing masks
2026-04-09 17:16:54,660 [io INFO] loaded in previous changes
2026-04-09 17:17:01,886 [io INFO] 54 ROIs saved to /mnt/stringerlab/janelia_images/fromMark_Shaohe_SG/G4_SG2_3XEx_Ribo_647_nDAPI_RLS_6x6_05x.czi - G4_SG2_3XEx_Ribo_647_nDAPI_RLS_6x6_05x#09-crop1-slice_seg.npy
2026-04-09 17:17:02,972 [io INFO] 55 ROIs saved to /mnt/stringerlab/janelia_images/fromMark_Shaohe_SG/G4_SG2_3XEx_Ribo_647_nDAPI_RLS_6x6_05x.czi - G4_SG2_3XEx_Ribo_647_nDAPI_RLS_6x6_05x#09-crop1-slice_seg.npy
{'lowhigh': None, 'percentile': [1.0, 99.0], 'normalize': True, 'norm3D': True, 'sharpen_radius': 0.0, 'smooth_radius': 0.0, 'tile_norm_blocksize': 0.0, 'tile_norm_smooth3D': 1.0, 'invert': False}
2026-04-09 17:17:09,785 [gui INFO] 53 cells found with model in 1.724 sec
2026-04-09 17:17:09,788 [io INFO] 53 masks found
2026-04-09 17:17:09,790 [io INFO] creating cellcolors and drawing masksExample logfile output for same session: 2026-04-09 17:16:53,454 INFO [io.py:109 - logger_setup()] WRITING LOG OUTPUT TO /home/raridenm/.cellpose/run.log
2026-04-09 17:16:53,454 INFO [io.py:110 - logger_setup()]
cellpose version: 4.0.10.dev27+g74b6ba06c.d20260320
platform: linux
python version: 3.13.3
torch version: 2.8.0+cu128
2026-04-09 17:16:53,670 INFO [core.py:50 - _use_gpu_torch()] ** TORCH CUDA version installed and working. **
2026-04-09 17:16:54,652 INFO [io.py:435 - _masks_to_gui()] 53 masks found
2026-04-09 17:16:54,654 INFO [io.py:473 - _masks_to_gui()] creating cellcolors and drawing masks
2026-04-09 17:16:54,660 INFO [io.py:322 - _load_seg()] loaded in previous changes
2026-04-09 17:17:01,886 INFO [io.py:632 - _save_sets()] 54 ROIs saved to /mnt/stringerlab/janelia_images/fromMark_Shaohe_SG/G4_SG2_3XEx_Ribo_647_nDAPI_RLS_6x6_05x.czi - G4_SG2_3XEx_Ribo_647_nDAPI_RLS_6x6_05x#09-crop1-slice_seg.npy
2026-04-09 17:17:02,972 INFO [io.py:632 - _save_sets()] 55 ROIs saved to /mnt/stringerlab/janelia_images/fromMark_Shaohe_SG/G4_SG2_3XEx_Ribo_647_nDAPI_RLS_6x6_05x.czi - G4_SG2_3XEx_Ribo_647_nDAPI_RLS_6x6_05x#09-crop1-slice_seg.npy
2026-04-09 17:17:08,067 INFO [core.py:50 - _use_gpu_torch()] ** TORCH CUDA version installed and working. **
2026-04-09 17:17:08,067 INFO [core.py:84 - assign_device()] >>>> using GPU (CUDA)
2026-04-09 17:17:08,888 INFO [models.py:147 - __init__()] >>>> loading model /home/raridenm/.cellpose/models/cpsam
2026-04-09 17:17:09,785 INFO [gui.py:1997 - compute_segmentation()] 53 cells found with model in 1.724 sec
2026-04-09 17:17:09,788 INFO [io.py:435 - _masks_to_gui()] 53 masks found
2026-04-09 17:17:09,790 INFO [io.py:473 - _masks_to_gui()] creating cellcolors and drawing masks |
Collaborator
Author
Tests passing on
GUI manual testing:Image loading
Network
GUI: display
GUI: mouse/ROIs
GUI: menus
Filtering
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should fix the bug where drawing fails because the scatter was removed but drawing didn't end. Also added a
try/catchblock to end the GUI when a drawing error occurs.Migrated print statements to logs and set up logging to behave different for stdout vs log file, with the log file setting to debug mode by default. Adding logging debug statements won't affect the GUI output behavior but will get caught in the log file. This should be helpful for debugging.
Need to
--verboseflag in CLI