Recent Releases of pystiche

pystiche - Fix usage examples

Bug fix release targeting the usage examples:

  • fix download links for usage example without pystiche (#517)
  • fix docs version string (#526)
  • remove version warning from MLE example (#527)
  • remove MLE handler from optim functions (#528)
  • remove paragraph explaining no longer existing parameter (#529)

Scientific Software - Peer-reviewed - Python
Published by pmeier over 4 years ago

pystiche - Stable PyPI release

Minimal follow-up to 1.0.0 since the release was rejected by PyPI due to incorrect meta data that was fixed in #508.

Scientific Software - Peer-reviewed - Python
Published by pmeier over 4 years ago

pystiche - First stable release

It is finally here: the first stable release of pystiche :tada:

Logo

It have been quite some (internal) iterations, but thanks to @irinafumarel we finally have a logo after #503:

logo

What do you think?

Multi-layer encoder

Before the implementation of a pystiche.enc.MultiLayerEncoder required to encode all images upfront so the intermediate encodings can be cached. In a series of PRs (#466, #467, #470, #471, #499) this was refactored to now provide the same caching functionality on the fly. For an in-depth look at this, a new usage example showcasing this was added in #468.

Merger of pystiche.ops and pystiche.loss

The only difference between operators and losses was the fact that losses handled the upfront encoding of images. After the rework discussed above this was no longer necessary so there was no longer any reason to keep these two modules separate. With this release, pystiche.ops was merged into pystiche.loss in #500.

Optimization logging

pystiche featured a custom logging system for the optimization loops. To keep the scope of this library narrow, this was replaced by tqdm in #451.

Versioning

After this release pystiche will adhere to semantic versioning. Without going into details, this means:

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards compatible manner, and
  3. PATCH version when you make backwards compatible bug fixes.

BC-breaking changes

All of these changes issued a warning for at least one release.

  • Functionality in pystiche.optim.log and pystiche.optim.meter were removed in favor of tqdm (#451)
  • The deprecated functions default_image_optim_loop, default_image_pyramid_optim_loop, default_transformer_optimizer, default_transformer_optim_loop, and default_transformer_epoch_optim_loop were removed from the pystiche.optim namespace. (#465)
  • The keyword argument get_optimizer was removed from pystiche.optim.image_optimization. (#465)
  • pystiche.image.transforms was removed in favor of functionality provided by torchvision. (#472, #502)
  • pystiche.data.Unsupervised was removed. (#504)
  • pystiche.demo.demo_images was removed. (#504)
  • The keyword argument weights was removed from pystiche.enc.alexnet_multi_layer_encoder() and pystiche.enc.vgg_*_multi_layer_encoder(). (#504)
  • The keyword argument user_agent was removed from pystiche.misc.download_file. (#504)
  • The default behavior of pystiche.extract_patches*d() and derivatives pystiche.loss.MRFLoss and pystiche.loss.functional.mrf_loss (formerly pystiche.ops.MRFOperator and pystiche.ops.functional.mrf_loss) changed from non-batched to batched. (#506)

Scientific Software - Peer-reviewed - Python
Published by pmeier over 4 years ago

pystiche - v0.7.2.post0

Another small maintenance release with these minimal changes:

  • revert default for allow_inplace from True to False (#479)
  • make images and guides saved on Ops non-persistent (#490)
  • add demo transformer (#492)
  • add official support for Python 3.9 (#494)

Scientific Software - Peer-reviewed - Python
Published by pmeier almost 5 years ago

pystiche - v0.7.1

This is a small maintenance release that unpins PyTorch (#488). Now all PyTorch versions that satisfy torch>=1.6.0 are supported.

Scientific Software - Peer-reviewed - Python
Published by pmeier almost 5 years ago

pystiche - v0.7.0

This release brings better support for model optimization:

  • add auto batch size matching for comparison operators (#432, #433)
  • add a default criterion_update_fn for optim.model_optimization (former optim.default_transformer_optim_lopp, see below) (#460)
  • add support for supervised datasets in model optimization (#461)
  • add usage example for model optimization (#462, #463)

Additionally,

  • Enable to pass an optimizer to pystiche.optim.image_optimization (#431)
  • Split handling of multi-layer encoders into a separate class (#438)

Finally. this release marks the last beta release. In the future pystiche will be trimmed of funtionalities that can be handled by other specialized librarys. An example would be replacing pystiche.optim.log with tqdm or pystiche.image.transforms with kornia.

Deprecations

As detailed above, this release deprecates a good amount of functionalities. It was made sure that these deprecations are only emitted if the deprecated functionalities are used directly rather than through default values from other pystiche parts (#441, #442, #452, #456).

pystiche.extract_patches*d

The functions currently have no supported for batched inputs in that sense that the batch dimensions doubled for the number of patches. In the future the output shape will change from B*Px... to BxPx... where B denotes the batch size and P the number of patches (#446). As a prerequisite a parameter batched_input was added to pystiche.cosine_similarity and pystiche.ops.functional.mrf_loss. For now it defaults to the old behavior, but that will be changed in the future. If these functions are used directly, a FutureWarning is emitted.

pystiche.image.transforms

pystiche.image.transforms is a remnant of the distant path. The complete functionality can be replaced by specialized computer vision libraries such as kornia.

pystiche.enc.MultiLayerEncoder

The functionalities of __call__() and encode() will swap in some sense. __call__() will be usually called only with a single layer. encode() on the other hand will return the encodings of the given layers without storing them. If you use these methodes directly, they will emit a FutureWarning. For more details see #435.

pystiche.optim

pystiche.optim has capabilities for custom logging during the optimization. This is far off pystiche's goal and thus we decided to replace it with tqdm.

  • deprecate pystiche.optim.log (#452)
  • deprecate pystiche.optim.meter (#452)
  • renamed default_image_optim_loop to image_optimization (#430)
  • renamed default_image_pyramid_optim_loop to pyramid_image_optimization (#430)
  • renamed default_transformer_optimizer to default_model_optimizer (#430)
  • renamed default_transformer_optim_loop to model_optimization (#430)
  • renamed default_transformer_epoch_optim_loop to multi_epoch_model_optimization (#430)
  • renamed parameter get_optimizer to optimizer in image_optimization (#431, #452)

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - v0.6.3

  • update citation after JOSS publication (#429)
  • pin PyTorch versions (#437)

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - v0.6.2

  • Add a Statement of Need to the JOSS Paper (#425)
  • Use published version instead of preprint for MV2014 (now MV2015) (#423, #426)
  • Fix Zenodo metadata (#427, #428)

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - v0.6.1

Minor release that updates the installation instructions after the first PyPI release.

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - Accepted in pyOpenSci

This is the first release after the successful (:tada:) peer review (#418). It mainly contains small bug fixes and improvements to the documentation detailed below. Furthermore, as of this release pystiche will be published to PyPI easing the installation process.

Bug Fixes

  • fix pystiche.image.edge_to_image_size for horizontal edges (#381)
  • fix and robustify pystiche.misc.download_file in case of an error or corrupt download (#410, #412)
  • fix demo images from Pixabay (#411)

Documentation

  • generic improvements to the README and the contributing guidelines (#400)
  • fix installation instructions (#406)
  • add citation information to the README (#408)
  • add an example image and usage snippet to the README (#413)
  • add inline examples to core functionalities (#415)

Deprecations

  • remove the double namespacing from pystiche.demo (#414)
    • pystiche.demo.demo_images() was renamed to pystiche.demo.images()
    • pystiche.demo.demo_logger() was renamed to pystiche.demo.logger()

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - v0.5.1.post0

This post release includes some minor changes that limits versions of externals tools in order for all checks (lint and test suite) to pass.

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - v0.5.1

  • Add the ability to retrieve images and guides directly from pystiche.ops.OperatorContainer (#347)

Dependencies

  • Fix compatibility with the newest PyTorch releases (torch==1.6.0, torchvision==0.7.0) (#348)

Contributing

  • Introduce tox for most development tasks such as linting, testing, and documentation building (#339, #356). Check out the revised Contributing guidelines for a detailed explanation of the new workflow (#360).
  • Switch from Travis CI and AppVeyor to GitHub Actions (#329)

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - v0.5.0.post0

This pins the required torch<1.6 since the release of torch==1.6.0 broke the compatibility with pystiche==0.5.0.

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - v0.5.0

This is small release that is the basis for the pyOpenSci review. The following minor changes were made:

  • Added paper.md for the Journal of Open Source Software (JOSS) (#237)
  • Removed deprecated code announced in v0.4.0 (#300)
  • pystiche.__version__ is now generated during installation and remains static afterwards (#301, #308, #327)
  • pystiche is now PEP561 compliant (#310)
  • The documentation now includes contributing guidelines to help others contribute (#314)

BC breaking changes

As discussed in the pre-submission inquiry for pyOpenSci pystiche.papers was outsourced in #331 to pystiche_papers to narrow the scope of pystiche. The hierarchy was retained, i.e. you should be able to use pystiche_papers as a drop-in replacement for pystiche.papers. pystiche.papers.common_utils was replaced by pystiche_papers.utils.

Furthermore, some functionality was mainly used for the reference implementations and thus was outsourced as well. The following functions and classes were moved:

  • from pystiche.data to pystiche_papers.data:
    • InfiniteCycleBatchSampler
    • FiniteCycleBatchSampler
    • NPRgeneral
  • from pystiche.misc to pystiche_papers.utils:
    • make_reproducible
    • get_tmp_dir
    • get_sha256_hash
    • save_state_dict
    • CudaOutOfMemoryError
    • CudaOutOfMemoryWarning
    • use_cuda_out_of_memory_error
    • abort_if_cuda_memory_exausts

Finally, pystiche_papers is now also the new home of the replication scripts previously contained in pystiche_replication.

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche - v0.4.0

This release matures pystiche quite a bit. The following steps were taken to achieve this:

  • The versioning scheme was changed to include the patch version. pystiche.__version__ now additionally contains information if it is a development version and optionally which git hash was used to build it.
  • The test suite was expanded to cover ~68% of the code. The coverage is automatically checked by codecov.io. Furthermore tests are now run on Linux, Windows, and macOS with the CI.
  • A documentation comprising 2 beginner and 2 advanced usage examples was added. The documentation is hosted on readthedocs.io.
  • Type annotations were added. Their correctness is enforced by mypy as part of the CI.

New Features

  • The paper "Texture Networks: Feed-forward Synthesis of Textures and Stylized Images" by Dmitry Ulyanov, Vadim Lebedev, Andrea Vedaldi, Victor Lempitsky" was added to the reference implementations. (#88 by @jbueltemeier).
  • pystiche.loss.PerceptualLoss and pystiche.loss.GuidedPerceptualLoss were added as a convinient interface to pystiche.loss.MultiOperatorLoss. (#136, #282)

Deprecations

  • Parameter num_batches in pystiche.optim.ProgressMeter.reset was renamed to total_count (#100)
  • pystiche.optim.TimeMeter (#100)
  • Attribute val of pystiche.optim.AverageMeter. was renamed to last_val (#100)
  • Attribute avg of pystiche.optim.AverageMeter. was renamed to global_avg (#100)
  • Attribute min of pystiche.optim.AverageMeter. was renamed to global_min (#100)
  • Attribute max of pystiche.optim.AverageMeter. was renamed to global_max (#100)
  • Attribute running_avg of pystiche.optim.AverageMeter. was renamed to local_avg (#100)
  • Parameter pystiche.optim.AverageMeter.show_avg was removed. The average is now always shown (#100)
  • Parameter use_running_avg of pystiche.optim.AverageMeter was renamed to show_local_avg (#100)
  • Parameters **resize_kwargs besides interpolation_mode of read_image and show_image in pystiche.image (#114, #198)
  • The first underscore was removed in the layer names of the VGGEncoder (for example "relu_4_2" to "relu4_2") to match the names in the paper (#131)
  • Bracket indexing and del statement to access or delete children of pystiche.loss.MultiOperatorLoss (#136)
  • Constructing pystiche.loss.MultiOperatorLoss with a dictionary or variable number of operators was replaced by a sequence of tuples. (#136, #183)
  • pystiche.image.processing was moved to pystiche.image.transforms.processing (#156)
  • pystiche.Object was renamed to pystiche.ComplexObject (#181)
  • Constructing pystiche.Module with a dictionary was replaced by a sequence of tuples. (#183)
  • Functionality of pystiche.core._meta and pystiche.typing was merged into pystiche.meta (#186)
  • Method clear_cache() was renamed to empty_storage in pystiche.enc.MultiLayerEncoder (#187)
  • MSEEncodingOperator was renamed to FeatureReconstructionOperator in pystiche.ops (#202)
  • Function build_obj_str in pystiche.misc was renamed to build_complex_obj_repr (#212)
  • Parameter property_threshold of pystiche.misc.build_obj_str (#212)
  • Passing None to to_1d_arg, to_2d_arg, and to_3d_arg (#233)
  • pystiche.possqrt was renamed to pystiche.nonnegsqrt (#272)
  • patch_matching_loss was renamed to mrf_loss in pystiche.ops.functional (#277)
  • Defining the target transformations via the constructor of pystiche.ops.MRFOperator was replaced by the parameter target_transforms. The static method pystiche.ops.MRFOperator.scale_and_rotate_transforms can be used to achieve the same functionality. (#278)
  • Bracket indexing pystiche.enc.MultiLayerEncoder was replaced by pystiche.enc.extract_encoder (#133, #284)
  • AlexNetEncoder and VGGEncoder were renamed to AlexNetMultiLayerEncoder and VGGMultiLayerEncoder in pystiche.enc (#128, #285)
  • Parameter processing of AlexNetEncoder was renamed to internal_preprocessing (#285)
  • default_epoch_header_fn was renamed to default_epoch_header in pystiche.optim (#291)
  • pystiche.misc.is_almost (#296)
  • to_eng, to_engstr, to_tuplestr, and to_engtuplestr from pystiche.misc (#297)
  • pystiche.misc.format_dict (#298)
  • pystiche.LossDict.format() (#298)
  • Bracket indexing of pystiche.ops.OperatorContainer to access the children operators.

BC breaking changes

  • The ability to create guided operators by double-inheriting from the proper class of pystiche.ops.guidance and the actual operator was removed. The functionality with the same was merged into the operators itself. (#)
  • read_guides was moved from pystiche.image.io to pystiche.image.guides. If you import it as from pystiche.image import read_guides the behavior stays the same. (#200)
  • The images pystiche.data.DownloadableImageCollection are no longer downloaded at creation. (#207)
  • image.transform is now applied after the image is read rather and before it is saved. (#207)
  • PublicDomainLicense was replaced by ExpiredCopyrightLicense. Now PublicDomainLicense should be used if the author deliberately released his work in the public domain. (#211)
  • pystiche.TensorStorage was removed. This was a relic of the concept phase and never used internally. (#242)
  • If a torch.Tensor is passed to pystiche.misc.get_input_image as starting_point it is now cloned rather than returned as is. (#250)
  • TensorMeta, ConvModuleMeta, and PoolModuleMeta were removed from pystiche.typing. They were intended to help the type annotations but proved useless. (#258)
  • Parameter device was removed from pystiche.optim.default_transformer_optim_loop and is now extracted transformer.parameters(). (#290)

Scientific Software - Peer-reviewed - Python
Published by pmeier over 5 years ago

pystiche -

pystiche==0.3 is the last alpha release. As such a lot has changed compared to v0.2. Some major changes:

  • Complete rewrite of the pystiche internals #39
  • Move the paper reference implementations back in from pystiche_replication #71
  • Data module that helps handling datasets as well as image collections #60, #62, #74

From now on, the API should not change by much. If it does the label breaks BC should be used as a tag. The upcoming versions will focus on maturing pystiche, i.e. extending the test suite and adding documentation.

Scientific Software - Peer-reviewed - Python
Published by pmeier almost 6 years ago

pystiche -

This release adds several bug fixes as well as BC breaking interface changes.

Scientific Software - Peer-reviewed - Python
Published by pmeier about 6 years ago