Slideflow

Latest version: v2.3.1

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

Scan your dependencies

Page 3 of 10

2.0.3post1

This is a *minor*, bug-fix and optimization release. See the [Version 2.0 release notes](https://github.com/jamesdolezal/slideflow/releases/tag/2.0.0) for details about the latest major release.

Bug fixes
- **Fix bug with attention heatmaps**: Fix bug where attention heatmaps were not appropriately displayed.
- Fix 'input tensor too large' error when using PyTorch GPU accelerated normalizers. Fix is applied by capping the batch size for
normalization at 32.

Optimizations
- Improve PyTorch training speed by using channels-last memory format
- Improve quality of slide thumbnails in tile extraction PDF reports by decreasing the rectangle line width.
- Optimizations to PyTorch real-time stain normalization speed, by increasing the number of default threads.
- Minor optimizations for PyTorch dataloaders: file handlers are closed when the dataloader is destroyed.
- Improve `Dataset.build_index()` speed if index files are not missing.

Other changes
- Set required cellpose version to <2.2
- Set pandas version to <2.0 to avoid breaking issues with Seaborn
- Handle linalg errors during PyTorch Macenko normalization, returning the original image instead of raising an error.
- Improve error message for `MIL_fc_mc model` if outcomes are not multi-categorical.
- Update QuPath script to improve compatibility with MRXS files
- Stability improvements in Slideflow Studio when using Libvips backend
- Add additional debug logs during SimCLR training

2.0.2.post1

This is a *minor*, bug-fix release. See the [Version 2.0 release notes](https://github.com/jamesdolezal/slideflow/releases/tag/2.0.0) for details about the latest major release.

Changelog
- Improve Databricks support by saving attention vectors as *.npy instead of *.npz if the environmental variable `SF_ALLOW_ZIP=0` [250]
- Add Python 3.7 and Tensorflow 2.11+ support to SimCLR functions [251]
- Update type hints to support Python <3.9 [252]
- Tile iteration with `WSI.build_generator()` now defaults to using multiprocessing when `SF_BACKEND=libvips`, and threadpools when `SF_BACKEND=cucim`, due to poor performance with libvips and threadpools. This does not affect default behavior of `Dataset.extract_tiles()`, but does improve default speed of `WSI.preview()`.

2.0.1

This is a *minor*, bug-fix release. See the [Version 2.0 release notes](https://github.com/jamesdolezal/slideflow/releases/tag/2.0.0) for details about the latest major release.

Changelog
- Fix "Dataloader does not contain any batches" error when training MIL models, if the number of slides in a dataset is less than the batch size [248]
- Fix "slideflow.norm has no attribute torch" error when training a PyTorch model without stain normalization [246]
- Add support for systems that cannot save *.zip files (Databricks), via the environmental variable `SF_ALLOW_ZIP=0` [245]
- Fix bug where an error is raised if a slide is missing MPP information, rather than the slide being skipped
- Fix bug when generating SimCLR features
- Fix bug when converting XML ROIs to CSV
- Fix bug where cell segmentation masks could not be loaded if a slide was missing ROIs

2.0

- The deprecated `Dataset.training_validation_split()` function has been removed (use `Dataset.split()`)
- The deprecated `Mosaic.focus()` function has been removed
- The deprecated `expanded`, `tile_zoom`, and `relative_size` arguments for `Mosaic` have been removed

Known Issues
- Slideflow Studio does not yet support multiple-instance learning (MIL) models. MIL support is in development.
- Saliency maps can be generated for multi-categorical models (ie, a single outcome with multiple categorical labels), but not multi-outcome categorical models (multiple outcomes each with different labels).
- Whole-slide cell segmentation may result in grid-like artifacts at areas where segmentation masks were stitched. A fix for this is planned for version 2.1.
- The GAN and MIL functionalities require PyTorch <1.12 and <2.0, respectively.

2.0.0

Highlights

We are very excited to announce the release of Slideflow 2.0, a significant update that maintains the familiar, backwards-compatible programming interface while introducing valuable new features. The changes we've made under the hood have put us in a great position for future expansion as we work to support a broader range of tasks, architectures, and training paradigms.

1.25

For a given sigma, the kernel size is calculated as `int(sigma * 4) + 1`.

To use, add `'b'` to the `augment` hyperparameter string (e.g. `'xyrjb'`), or set `augment=True` to include all augmentations.

Open-Source Solver for Site-Preserved Cross-Validation

Slideflow no longer requires CPLEX for solving site-preserved cross-validation splits, which is proprietary software. Instead, the open-source Pyomo (with Bonmin solver) can now be used for those without access to CPLEX. Slideflow will first attempt to use CPLEX if available.

Other New Features
- Enables L2 regularization for models trained in the PyTorch backend.
- Predictions can now be saved in CSV, feather, or parquet format. The `save_predictions` argument can now be a string to specify save format (`'csv'`, `'feather'`, `'parquet'`). By default, will save in parquet format.
- `Project.predict()`will now save tile, slide, and patient-level predictions.
- More than 10-fold speed improvement when calculating metrics for datasets tens of millions of images in size
- Significant performance improvements for `Dataset` functions, particularly for large projects with tens of thousands of slides
- `sf.io.tensorflow.decode_image()` function now accepts `crop_left`, `crop_width`, `resize_target`, `resize_method`, and `resize_aa` methods for cropping and resizing dataset images. These arguments can be passed as keyword arguments to the `dataset.tensorflow(...)` function.
- New utility function `sf.util.get_model_normalizer()` for easily loading the normalizer used to train a given model.
- Support for feature-conditioned GAN training via `sf.io.torch.LocLabelInterleaver`, an extension of the `InterleaveIterator` class which reads a pandas DataFrame for tile-level labels.
- `sf.stats.metrics_from_dataset()` includes new option `categorical_reduce` which determines how slide/patient-level predictions are determined from tile-level predictions. If 'raw' (default), slide-/patient-level predictions are averages of tile-level predictions. If `onehot`, tile-level predictions are converted to onehot via `argmax` prior to average.
- Adds option for specifying UMAP kwargs to `Project.generate_mosaic()`. For example, `P.generate_mosaic(umap_kwargs={'densmap'=True})`
- New function `sf.util.get_tfrecord_by_location()` enables finding a record in a TFRecord by a given location tuple (x, y)
- New function `DatasetFeatures.to_df()` exports activations into a pandas dataframe
- New function `sf.model.tensorflow.unwrap()` returns the input, post-convolutional output, and model output tensors for the model, for easier model surgery.
- New functions `Dataset.find_slide()` and `Dataset.find_tfrecord()` enable finding slide paths or tfrecord locations from a given slide/patient name.
- Compatibility update for Tensorflow 2.9

Bug Fixes and Other Changes
- Updates Otsu's thresholding method to only apply thresholding to areas within ROIs (if supplied). This helps prevent large pen marks and other artifacts outside ROIs from interfering with the foreground/background threshold calculation.
- Adds `method='pca'` for `SlideMap.neighbors()`
- Allows specifying heatmap `img_format` with `P.generate_heatmaps()`
- Logs warning if a dataset source is supplied to `sf.Dataset` (either manually or via project `settings.json`) and that source does not exist in the dataset configuration JSON file.
- Allows import of Slideflow if pyvips or libvips is not installed.
- Fixes error where logs were not being written to the project folder.
- Fixes training bug when `validate_on_batch` is set to 0 in the pytorch backend
- Corrected logging when testing multiple/single linear outcomes during testing
- Fixes a logging message when generating features
- Fixes bug where, in certain environments, tile extraction would hang if started after pyvips was imported and used in another process.
- Fixes bug where models were not being saved if early stopping was triggered.

Breaking Changes
- Replaces `resolution` argument to `.plot()` with `figsize`, so the matplotlib figsize can be specified directly
- Removes the `buffer` argument to `Heatmap` and `Project.generate_heatmaps()`
- Removes `histogram` argument and functionality from evaluation.
- Renames `SlideMap.export_to_csv()` -> `.to_csv()`
- Renames `SlideMap.save_2d_plot()` -> `.save()`
- Renames `SlideMap.save_3d_plot()` -> `.save_3d()`
- Renames `Mosaic.place_tiles()` -> `.plot()`
- Renames `DatasetFeatures.export_to_torch()` -> `to_torch()`

Patch Notes

Page 3 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.