Slideflow

Latest version: v2.3.1

Safety actively analyzes 638773 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 10

0.8

_New features:_
- Can specify project directory in summarize script
- in get_training_and_validation_tfrecords, new argument "read_only" prevents accidental k-fold plans from being written if the validations plans are merely being queried
- new tfrecords.get_tfrecords_from_model_manifest() function that returns list of either training or validation tfrecords from a given model manifest file
- New force_gpu argument allows manual specification of which GPU to use in SlideflowProject
- In SFP.generate_activations_analytics() and SFP.generate_mosaic(), the umap_cache and activations_cache may be explicitly set
- SFP.generate_mosaic() can now display predictions as the output class on the 2D umap
- SFP.generate_mosaic() now accepts mosaic_filename and umap_filename as arguments to explicitly name the generated mosaic map & UMAPs
- SFP.generate_mosaic() now accepts map_centroid as an argument; if True, only the centroid tiles for each slide will be mapped on the UMAP & corresponding mosaic.
- SFP.generate_mosaic() now accepts a colormap for the 2D UMAP via argument cmap
- SFP.generate_mosaic_from_predictions now requires "x" and "y" arguments, to specify which outcome categories should correspond to UMAP-x and UMAP-y
- ActivationsVisualizer can have caching disabled through argument use_activations_cache
- New function AV.slide_tile_dict() which returns dictionary mapping slide names to a list of node activations (one list of node activations corresponding to each tile within the slide)
- Mosaic now accepts argument relative_size; if true, will size each tile relative to the number of points within that grid space
- New argument tile_select helps specify behavior of how to choose which tile for display, when multiple image tiles map to a given Mosaic grid:
- If 'nearest' (default), the tile/point nearest to the Mosaic grid center will be chosen for display
- If 'centroid', then the argument 'tile_meta' -- a dictionary mapping slides to a a list of some variables (list of length = number of tiles) -- is used to calculcate the centroid tile for all eligible tiles in the given Mosaic grid space. This could be used, for example, to pass penultimate activations via tile_meta, and for each grid space, to display centroid tiles with respect to these activations
- Mosaic.save() now saves to the specified filename
- New function TFRecordUMAP.calculate_from_centroid() allows for the display of centroid tiles for each slide using a given dictionary ("slide_activations") mapping slide names to a list of activations for the centroid tile. "tile_indices" is a dict mapping slide names to the index of the centroid tile.
- TFRecordUMAP.save_2d_plot() now accepts a colormap via arg cmap
- statistics.calculate_centroid allows for calculating centroid indices for each slide via the dictionary slide_node_dict (as provided by ActivationsVisualizer)
- statistics.get_centroid_index() finds the centroid index of a given array of arrays
- SFP.generate_activations_analytics() replaces boolean argument "export_csv" with "activations_export" string; if provided, will export CSV activations to the provided filename
- Same functionality as above to SFP.generate_mosaic(); also with argument "umap_export"
- In ActivationsVisualizer, there is now no default location for activations CSV export; it must be explicitly provided
- New TFRecordUMAP.export_to_csv()
- sf.models.HyperParameters object is now used to detect model_type, rather than using what is stored in hyperparameters.json under "model_type"
- Hyperparameter validation checks now happens within the HP object, instead of the SlideflowProject
- Heatmap generator will now skip already-completed heatmaps instead of overwriting
- Manifest automatically updates after extracting tiles
- Mosaic can now show predictions and restrict predictions to a subset of outcomes
- Mosaic/UMAP can now show linear predictions
- umaps are now created from either TFRecord.from_precalculated() or TFRecord.from_activations()
- New SFP.generate_thumbnails() function
- New AV.get_slide_level_predictions() function
- calculate_umap() removed from AV; now these functions are performed in TFRecord.from_activations()
- Heatmaps can now skip thumbnail generation to save time
- Heatmaps can now be provided a colormap function for manually specifying display parameters
- Mosaic now saves report of which tfrecords/tiles were used
- New sfutil.read_predictions_from_csv()
- Added support for NASNetLarge
- Added grayscale normalization for mosaic maps

_Code improvements:_
- Reduced verbosity: getting a TFRecord/slide dataset within a given SlideflowProject can now be accomplished with SFP.get_dataset()
- Better error handling in get_tfrecord_by_index, in case a TFRecord is queried for an index it does not have
- In ActivationsVisualizer: logits_dict and activations_dict are now both stored in the same pickle cache file
- AV.generate_mosaic() function now removed; Mosaics are now generated directly from TFRecordUMAP
- Mosaic generator overhaul
- TFRecordUMAP overhaul
- Improved error handling
- Mosaic error handling improvements

_Bug fixes:_
- Fix in automatic slide annotations association
- Fix in map caching
- Fix in UMAP 2D plotting where colors would be reused if >8 categories
- Fix in Mosaic.focus()
- Fix in linear model training
- Fix in 3D node plot generation

0.7

_New Features_
- ProgressBar can display text at beginning of bar
- New merge_split_tfrecords function can be used to merge TFRecords with the same name in different folders (e.g. if TFRecords were split for training/validation)
- can manually specify how many steps of validation to perform during training with validation_steps argument
- can resume training at a given starting_epoch
- summarize.py can now show tile-level or slide-level ROCs
- option in extract_tiles() to skip slides with missing ROIs
- added JPG support for slides
- TFRecordUMAP can now show predicted categories (must provide sldie_logits_dict to calculate_from_nodes() and show_prediction=True to save_2d_plot())
- Tiles can now be extracted directly into TFRecords, saving on disk writes (defaults to this behavior unless "save_tiles" is true in SFP.extract_tiles)

_Enhancements_
- Tile extraction will now skip slides that already have TFRecords/tiles generated
- extract_tiles() now accepts "roi_method" argument; if 'inside', extracts tiles within ROIs; if 'outside', will only extract tiles outside ROIs
- Logging improvements
- Streamlined dataset manifests
- Tile extraction from slides now occurs using quality=100% to avoid compression artifacts
- Can provide dataset name to extract_tiles
- Slides can now cache thumbnails in specified folder (default is project root)
- can run heatmap generator in single thread mode
- heatmap_generator() now accepts interpolation, whole_slide, show_roi, and thumb_folder as arguments
- improved heatmap logging & progress bar
- improved Heatmap performance (thumbnail calculation now happens asynchronously during model predictions)
- better logging of validation checking strategy during model training
- Overhaul of ProgressBar with new support for ETA
- Improved tile extraction progress bar monitoring
- Auto detection and removal of corrupt TFRecords during validation at project initiation

_Code cleanup_
- Improvements to Slide tile extraction and generators, with improved readability/comprehension and support for tfrecord splitting
- Removed redundant "generate_tfrecords" argument in extract_tiles
- Improved/cleaned up tile extraction code in SlideReader class
- simplification of sfutil.get_slide_paths
- GPU autoselection occurs at project initialization; no need to manually call SFP.autoselect_gpu()
- Mosaic generator is no longer process encapsulated
- Updated requirements.txt, specified pyvips version requirements

_Bug fixes_
- Fixed false GPU selection warnings
- Fixed bugs in datasets and tile extraction
- Fixed bug in automatic slide annotations assocation
- Fixed bug during training when linear models are attempted to be used with accuracy-based early stopping
- Fixed rare bug in Mosaic if only one point is in a single grid

0.6

- Training can now perform validation checks mid-epoch, at every X batches, defined by the argument "validate_on_batch"
- If HP "early_stop" is True, will stop training if exponential moving average (EMA) of validation accuracy does not increase after 3 successive validation checks (previously checks were performed at epoch end)
- Separated mosaic functions in ActivationsVisualizer into separate mosaic.Mosaic class
- Separated UMAP functions from ActivationsVisualizer into separate statistics.TFRecordUMAP class
- Streamlined Dataset class with apply_filters function
- Added ability to customize model regularizer, including L2 implementation
- Added hyperparameters: hidden_layer_width, trainable_layers, L2_weight
- Added training arguments max_ and min_tiles_per_slide (either filters out TFRecords not meeting criteria or caps maximum of tiles to take)
- Additional arguments for model.train(): ema_smoothing (df=2) and ema_observations (df=8)
- By specifying annotation header_x and header_y, SFP.generate_mosaic_from_annotations will create a mosaic map from prespecified coordinates in the annotations file

Page 10 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.