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:

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:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- 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.logandpystiche.optim.meterwere removed in favor oftqdm(#451) - The deprecated functions
default_image_optim_loop,default_image_pyramid_optim_loop,default_transformer_optimizer,default_transformer_optim_loop, anddefault_transformer_epoch_optim_loopwere removed from thepystiche.optimnamespace. (#465) - The keyword argument
get_optimizerwas removed frompystiche.optim.image_optimization. (#465) pystiche.image.transformswas removed in favor of functionality provided bytorchvision. (#472, #502)pystiche.data.Unsupervisedwas removed. (#504)pystiche.demo.demo_imageswas removed. (#504)- The keyword argument
weightswas removed frompystiche.enc.alexnet_multi_layer_encoder()andpystiche.enc.vgg_*_multi_layer_encoder(). (#504) - The keyword argument
user_agentwas removed frompystiche.misc.download_file. (#504) - The default behavior of
pystiche.extract_patches*d()and derivativespystiche.loss.MRFLossandpystiche.loss.functional.mrf_loss(formerlypystiche.ops.MRFOperatorandpystiche.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.0
This release brings better support for model optimization:
- add auto batch size matching for comparison operators (#432, #433)
- add a default
criterion_update_fnforoptim.model_optimization(formeroptim.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_looptoimage_optimization(#430) - renamed
default_image_pyramid_optim_looptopyramid_image_optimization(#430) - renamed
default_transformer_optimizertodefault_model_optimizer(#430) - renamed
default_transformer_optim_looptomodel_optimization(#430) - renamed
default_transformer_epoch_optim_looptomulti_epoch_model_optimization(#430) - renamed parameter
get_optimizertooptimizerinimage_optimization(#431, #452)
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_sizefor horizontal edges (#381) - fix and robustify
pystiche.misc.download_filein 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 topystiche.demo.images()pystiche.demo.demo_logger()was renamed topystiche.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
toxfor 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.mdfor 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)pysticheis 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.datatopystiche_papers.data:InfiniteCycleBatchSamplerFiniteCycleBatchSamplerNPRgeneral
- from
pystiche.misctopystiche_papers.utils:make_reproducibleget_tmp_dirget_sha256_hashsave_state_dictCudaOutOfMemoryErrorCudaOutOfMemoryWarninguse_cuda_out_of_memory_errorabort_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
mypyas 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.PerceptualLossandpystiche.loss.GuidedPerceptualLosswere added as a convinient interface topystiche.loss.MultiOperatorLoss. (#136, #282)
Deprecations
- Parameter
num_batchesinpystiche.optim.ProgressMeter.resetwas renamed tototal_count(#100) pystiche.optim.TimeMeter(#100)- Attribute
valofpystiche.optim.AverageMeter.was renamed tolast_val(#100) - Attribute
avgofpystiche.optim.AverageMeter.was renamed toglobal_avg(#100) - Attribute
minofpystiche.optim.AverageMeter.was renamed toglobal_min(#100) - Attribute
maxofpystiche.optim.AverageMeter.was renamed toglobal_max(#100) - Attribute
running_avgofpystiche.optim.AverageMeter.was renamed tolocal_avg(#100) - Parameter
pystiche.optim.AverageMeter.show_avgwas removed. The average is now always shown (#100) - Parameter
use_running_avgofpystiche.optim.AverageMeterwas renamed toshow_local_avg(#100) - Parameters
**resize_kwargsbesidesinterpolation_modeofread_imageandshow_imageinpystiche.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
delstatement to access or delete children ofpystiche.loss.MultiOperatorLoss(#136) - Constructing
pystiche.loss.MultiOperatorLosswith a dictionary or variable number of operators was replaced by a sequence of tuples. (#136, #183) pystiche.image.processingwas moved topystiche.image.transforms.processing(#156)pystiche.Objectwas renamed topystiche.ComplexObject(#181)- Constructing
pystiche.Modulewith a dictionary was replaced by a sequence of tuples. (#183) - Functionality of
pystiche.core._metaandpystiche.typingwas merged intopystiche.meta(#186) - Method
clear_cache()was renamed toempty_storageinpystiche.enc.MultiLayerEncoder(#187) MSEEncodingOperatorwas renamed toFeatureReconstructionOperatorinpystiche.ops(#202)- Function
build_obj_strinpystiche.miscwas renamed tobuild_complex_obj_repr(#212) - Parameter
property_thresholdofpystiche.misc.build_obj_str(#212) - Passing
Nonetoto_1d_arg,to_2d_arg, andto_3d_arg(#233) pystiche.possqrtwas renamed topystiche.nonnegsqrt(#272)patch_matching_losswas renamed tomrf_lossinpystiche.ops.functional(#277)- Defining the target transformations via the constructor of
pystiche.ops.MRFOperatorwas replaced by the parametertarget_transforms. The static methodpystiche.ops.MRFOperator.scale_and_rotate_transformscan be used to achieve the same functionality. (#278) - Bracket indexing
pystiche.enc.MultiLayerEncoderwas replaced bypystiche.enc.extract_encoder(#133, #284) AlexNetEncoderandVGGEncoderwere renamed toAlexNetMultiLayerEncoderandVGGMultiLayerEncoderinpystiche.enc(#128, #285)- Parameter
processingofAlexNetEncoderwas renamed tointernal_preprocessing(#285) default_epoch_header_fnwas renamed todefault_epoch_headerinpystiche.optim(#291)pystiche.misc.is_almost(#296)to_eng,to_engstr,to_tuplestr, andto_engtuplestrfrompystiche.misc(#297)pystiche.misc.format_dict(#298)pystiche.LossDict.format()(#298)- Bracket indexing of
pystiche.ops.OperatorContainerto access the children operators.
BC breaking changes
- The ability to create guided operators by double-inheriting from the proper class of
pystiche.ops.guidanceand the actual operator was removed. The functionality with the same was merged into the operators itself. (#) read_guideswas moved frompystiche.image.iotopystiche.image.guides. If you import it asfrom pystiche.image import read_guidesthe behavior stays the same. (#200)- The images
pystiche.data.DownloadableImageCollectionare no longer downloaded at creation. (#207) image.transformis now applied after the image is read rather and before it is saved. (#207)PublicDomainLicensewas replaced byExpiredCopyrightLicense. NowPublicDomainLicenseshould be used if the author deliberately released his work in the public domain. (#211)pystiche.TensorStoragewas removed. This was a relic of the concept phase and never used internally. (#242)- If a
torch.Tensoris passed topystiche.misc.get_input_imageasstarting_pointit is now cloned rather than returned as is. (#250) TensorMeta,ConvModuleMeta, andPoolModuleMetawere removed frompystiche.typing. They were intended to help the type annotations but proved useless. (#258)- Parameter
devicewas removed frompystiche.optim.default_transformer_optim_loopand is now extractedtransformer.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
pysticheinternals #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