_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