add new deep dream stuff from aws repo

This commit is contained in:
Marina von Steinkirch 2016-08-20 00:12:32 -07:00
parent 0d8220a392
commit 305e85e8b7
25 changed files with 30870 additions and 517 deletions

View file

@ -1,517 +0,0 @@
All code in this repository is licensed under Apache License 2.0.
All images and derivatives thereof contained in this repository
are licensed under Creative Commons License 3.0. Original photo by Mohammed Tawsif Salam,
https://en.wikipedia.org/wiki/Sky#/media/File:Appearance_of_sky_for_weather_forecast,_Dhaka,_Bangladesh.JPG
Full text of Apache License 2.0 and Creative Commons License 3.0 below:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Creative Commons
Attribution-ShareAlike 3.0 Unported
https://creativecommons.org/licenses/by-sa/3.0/legalcode
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL
SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT
RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS.
CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND
DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE
BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE
CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE
IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
"Adaptation" means a work based upon the Work, or upon the Work and other
pre-existing works, such as a translation, adaptation, derivative work,
arrangement of music or other alterations of a literary or artistic work, or
phonogram or performance and includes cinematographic adaptations or any other
form in which the Work may be recast, transformed, or adapted including in any
form recognizably derived from the original, except that a work that
constitutes a Collection will not be considered an Adaptation for the purpose
of this License. For the avoidance of doubt, where the Work is a musical work,
performance or phonogram, the synchronization of the Work in timed-relation
with a moving image ("synching") will be considered an Adaptation for the
purpose of this License.
"Collection" means a collection of literary or artistic works, such as
encyclopedias and anthologies, or performances, phonograms or broadcasts, or
other works or subject matter other than works listed in Section 1(f) below,
which, by reason of the selection and arrangement of their contents, constitute
intellectual creations, in which the Work is included in its entirety in
unmodified form along with one or more other contributions, each constituting
separate and independent works in themselves, which together are assembled into
a collective whole. A work that constitutes a Collection will not be considered
an Adaptation (as defined below) for the purposes of this License.
"Creative Commons Compatible License" means a license that is listed at
https://creativecommons.org/compatiblelicenses that has been approved by
Creative Commons as being essentially equivalent to this License, including, at
a minimum, because that license: (i) contains terms that have the same purpose,
meaning and effect as the License Elements of this License; and, (ii)
explicitly permits the relicensing of adaptations of works made available under
that license under this License or a Creative Commons jurisdiction license with
the same License Elements as this License.
"Distribute" means to make available to the public the original and copies of
the Work or Adaptation, as appropriate, through sale or other transfer of
ownership.
"License Elements" means the following high-level license attributes as
selected by Licensor and indicated in the title of this License: Attribution,
ShareAlike.
"Licensor" means the individual, individuals, entity or entities that offer(s)
the Work under the terms of this License.
"Original Author" means, in the case of a literary or artistic work, the
individual, individuals, entity or entities who created the Work or if no
individual or entity can be identified, the publisher; and in addition (i) in
the case of a performance the actors, singers, musicians, dancers, and other
persons who act, sing, deliver, declaim, play in, interpret or otherwise
perform literary or artistic works or expressions of folklore; (ii) in the case
of a phonogram the producer being the person or legal entity who first fixes
the sounds of a performance or other sounds; and, (iii) in the case of
broadcasts, the organization that transmits the broadcast.
"Work" means the literary and/or artistic work offered under the terms of this
License including without limitation any production in the literary, scientific
and artistic domain, whatever may be the mode or form of its expression
including digital form, such as a book, pamphlet and other writing; a lecture,
address, sermon or other work of the same nature; a dramatic or
dramatico-musical work; a choreographic work or entertainment in dumb show; a
musical composition with or without words; a cinematographic work to which are
assimilated works expressed by a process analogous to cinematography; a work of
drawing, painting, architecture, sculpture, engraving or lithography; a
photographic work to which are assimilated works expressed by a process
analogous to photography; a work of applied art; an illustration, map, plan,
sketch or three-dimensional work relative to geography, topography,
architecture or science; a performance; a broadcast; a phonogram; a compilation
of data to the extent it is protected as a copyrightable work; or a work
performed by a variety or circus performer to the extent it is not otherwise
considered a literary or artistic work.
"You" means an individual or entity exercising rights under this License who
has not previously violated the terms of this License with respect to the Work,
or who has received express permission from the Licensor to exercise rights
under this License despite a previous violation.
"Publicly Perform" means to perform public recitations of the Work and to
communicate to the public those public recitations, by any means or process,
including by wire or wireless means or public digital performances; to make
available to the public Works in such a way that members of the public may
access these Works from a place and at a place individually chosen by them; to
perform the Work to the public by any means or process and the communication to
the public of the performances of the Work, including by public digital
performance; to broadcast and rebroadcast the Work by any means including
signs, sounds or images.
"Reproduce" means to make copies of the Work by any means including without
limitation by sound or visual recordings and the right of fixation and
reproducing fixations of the Work, including storage of a protected performance
or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit,
or restrict any uses free from copyright or rights arising from limitations or
exceptions that are provided for in connection with the copyright protection
under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License,
Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual
(for the duration of the applicable copyright) license to exercise the rights
in the Work as stated below:
to Reproduce the Work, to incorporate the Work into one or more Collections,
and to Reproduce the Work as incorporated in the Collections;
to create and Reproduce Adaptations provided that any such Adaptation,
including any translation in any medium, takes reasonable steps to clearly
label, demarcate or otherwise identify that changes were made to the original
Work. For example, a translation could be marked "The original work was
translated from English to Spanish," or a modification could indicate "The
original work has been modified.";
to Distribute and Publicly Perform the Work including as incorporated in
Collections; and,
to Distribute and Publicly Perform Adaptations.
For the avoidance of doubt:
Non-waivable Compulsory License Schemes. In those jurisdictions in which the
right to collect royalties through any statutory or compulsory licensing scheme
cannot be waived, the Licensor reserves the exclusive right to collect such
royalties for any exercise by You of the rights granted under this License;
Waivable Compulsory License Schemes. In those jurisdictions in which the right
to collect royalties through any statutory or compulsory licensing scheme can
be waived, the Licensor waives the exclusive right to collect such royalties
for any exercise by You of the rights granted under this License; and,
Voluntary License Schemes. The Licensor waives the right to collect royalties,
whether individually or, in the event that the Licensor is a member of a
collecting society that administers voluntary licensing schemes, via that
society, from any exercise by You of the rights granted under this License.
The above rights may be exercised in all media and formats whether now known
or hereafter devised. The above rights include the right to make such
modifications as are technically necessary to exercise the rights in other
media and formats. Subject to Section 8(f), all rights not expressly granted by
Licensor are hereby reserved.
4. Restrictions. The license granted in Section 3 above is expressly made
subject to and limited by the following restrictions:
You may Distribute or Publicly Perform the Work only under the terms of this
License. You must include a copy of, or the Uniform Resource Identifier (URI)
for, this License with every copy of the Work You Distribute or Publicly
Perform. You may not offer or impose any terms on the Work that restrict the
terms of this License or the ability of the recipient of the Work to exercise
the rights granted to that recipient under the terms of the License. You may
not sublicense the Work. You must keep intact all notices that refer to this
License and to the disclaimer of warranties with every copy of the Work You
Distribute or Publicly Perform. When You Distribute or Publicly Perform the
Work, You may not impose any effective technological measures on the Work that
restrict the ability of a recipient of the Work from You to exercise the rights
granted to that recipient under the terms of the License. This Section 4(a)
applies to the Work as incorporated in a Collection, but this does not require
the Collection apart from the Work itself to be made subject to the terms of
this License. If You create a Collection, upon notice from any Licensor You
must, to the extent practicable, remove from the Collection any credit as
required by Section 4(c), as requested. If You create an Adaptation, upon
notice from any Licensor You must, to the extent practicable, remove from the
Adaptation any credit as required by Section 4(c), as requested.
You may Distribute or Publicly Perform an Adaptation only under the terms of:
(i) this License; (ii) a later version of this License with the same License
Elements as this License; (iii) a Creative Commons jurisdiction license (either
this or a later license version) that contains the same License Elements as
this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons
Compatible License. If you license the Adaptation under one of the licenses
mentioned in (iv), you must comply with the terms of that license. If you
license the Adaptation under the terms of any of the licenses mentioned in (i),
(ii) or (iii) (the "Applicable License"), you must comply with the terms of the
Applicable License generally and the following provisions: (I) You must include
a copy of, or the URI for, the Applicable License with every copy of each
Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose
any terms on the Adaptation that restrict the terms of the Applicable License
or the ability of the recipient of the Adaptation to exercise the rights
granted to that recipient under the terms of the Applicable License; (III) You
must keep intact all notices that refer to the Applicable License and to the
disclaimer of warranties with every copy of the Work as included in the
Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or
Publicly Perform the Adaptation, You may not impose any effective technological
measures on the Adaptation that restrict the ability of a recipient of the
Adaptation from You to exercise the rights granted to that recipient under the
terms of the Applicable License. This Section 4(b) applies to the Adaptation as
incorporated in a Collection, but this does not require the Collection apart
from the Adaptation itself to be made subject to the terms of the Applicable
License.
If You Distribute, or Publicly Perform the Work or any Adaptations or
Collections, You must, unless a request has been made pursuant to Section 4(a),
keep intact all copyright notices for the Work and provide, reasonable to the
medium or means You are utilizing: (i) the name of the Original Author (or
pseudonym, if applicable) if supplied, and/or if the Original Author and/or
Licensor designate another party or parties (e.g., a sponsor institute,
publishing entity, journal) for attribution ("Attribution Parties") in
Licensor's copyright notice, terms of service or by other reasonable means, the
name of such party or parties; (ii) the title of the Work if supplied; (iii) to
the extent reasonably practicable, the URI, if any, that Licensor specifies to
be associated with the Work, unless such URI does not refer to the copyright
notice or licensing information for the Work; and (iv) , consistent with
Ssection 3(b), in the case of an Adaptation, a credit identifying the use of
the Work in the Adaptation (e.g., "French translation of the Work by Original
Author," or "Screenplay based on original Work by Original Author"). The credit
required by this Section 4(c) may be implemented in any reasonable manner;
provided, however, that in the case of a Adaptation or Collection, at a minimum
such credit will appear, if a credit for all contributing authors of the
Adaptation or Collection appears, then as part of these credits and in a manner
at least as prominent as the credits for the other contributing authors. For
the avoidance of doubt, You may only use the credit required by this Section
for the purpose of attribution in the manner set out above and, by exercising
Your rights under this License, You may not implicitly or explicitly assert or
imply any connection with, sponsorship or endorsement by the Original Author,
Licensor and/or Attribution Parties, as appropriate, of You or Your use of the
Work, without the separate, express prior written permission of the Original
Author, Licensor and/or Attribution Parties.
Except as otherwise agreed in writing by the Licensor or as may be otherwise
permitted by applicable law, if You Reproduce, Distribute or Publicly Perform
the Work either by itself or as part of any Adaptations or Collections, You
must not distort, mutilate, modify or take other derogatory action in relation
to the Work which would be prejudicial to the Original Author's honor or
reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which
any exercise of the right granted in Section 3(b) of this License (the right to
make Adaptations) would be deemed to be a distortion, mutilation, modification
or other derogatory action prejudicial to the Original Author's honor and
reputation, the Licensor will waive or not assert, as appropriate, this
Section, to the fullest extent permitted by the applicable national law, to
enable You to reasonably exercise Your right under Section 3(b) of this License
(right to make Adaptations) but not otherwise.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS
THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND
CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING,
WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A
PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE.
SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH
EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW,
IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS
LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
7. Termination
This License and the rights granted hereunder will terminate automatically
upon any breach by You of the terms of this License. Individuals or entities
who have received Adaptations or Collections from You under this License,
however, will not have their licenses terminated provided such individuals or
entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7,
and 8 will survive any termination of this License.
Subject to the above terms and conditions, the license granted here is
perpetual (for the duration of the applicable copyright in the Work).
Notwithstanding the above, Licensor reserves the right to release the Work
under different license terms or to stop distributing the Work at any time;
provided, however that any such election will not serve to withdraw this
License (or any other license that has been, or is required to be, granted
under the terms of this License), and this License will continue in full force
and effect unless terminated as stated above.
8. Miscellaneous
Each time You Distribute or Publicly Perform the Work or a Collection, the
Licensor offers to the recipient a license to the Work on the same terms and
conditions as the license granted to You under this License.
Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to
the recipient a license to the original Work on the same terms and conditions
as the license granted to You under this License.
If any provision of this License is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this License, and without further action by the parties to this
agreement, such provision shall be reformed to the minimum extent necessary to
make such provision valid and enforceable.
No term or provision of this License shall be deemed waived and no breach
consented to unless such waiver or consent shall be in writing and signed by
the party to be charged with such waiver or consent.
This License constitutes the entire agreement between the parties with respect
to the Work licensed here. There are no understandings, agreements or
representations with respect to the Work not specified here. Licensor shall not
be bound by any additional provisions that may appear in any communication from
You. This License may not be modified without the mutual written agreement of
the Licensor and You.
The rights granted under, and the subject matter referenced, in this License
were drafted utilizing the terminology of the Berne Convention for the
Protection of Literary and Artistic Works (as amended on September 28, 1979),
the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO
Performances and Phonograms Treaty of 1996 and the Universal Copyright
Convention (as revised on July 24, 1971). These rights and subject matter take
effect in the relevant jurisdiction in which the License terms are sought to be
enforced according to the corresponding provisions of the implementation of
those treaty provisions in the applicable national law. If the standard suite
of rights granted under applicable copyright law includes additional rights not
granted under this License, such additional rights are deemed to be included in
the License; this License is not intended to restrict the license of any rights
under applicable law.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,947 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Fine-tuning a Pretrained Network for Style Recognition\n",
"\n",
"In this example, we'll explore a common approach that is particularly useful in real-world applications: take a pre-trained Caffe network and fine-tune the parameters on your custom data.\n",
"\n",
"The upside of such approach is that, since pre-trained networks are learned on a large set of images, the intermediate layers capture the \"semantics\" of the general visual appearance. Think of it as a very powerful feature that you can treat as a black box. On top of that, only a few layers will be needed to obtain a very good performance of the data."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, we will need to prepare the data. This involves the following parts:\n",
"(1) Get the ImageNet ilsvrc pretrained model with the provided shell scripts.\n",
"(2) Download a subset of the overall Flickr style dataset for this demo.\n",
"(3) Compile the downloaded Flickr dataset into a database that Caffe can then consume."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import os\n",
"os.chdir('..')\n",
"import sys\n",
"sys.path.insert(0, './python')\n",
"\n",
"import caffe\n",
"import numpy as np\n",
"from pylab import *\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# This downloads the ilsvrc auxiliary data (mean file, etc),\n",
"# and a subset of 2000 images for the style recognition task.\n",
"!data/ilsvrc12/get_ilsvrc_aux.sh\n",
"!scripts/download_model_binary.py models/bvlc_reference_caffenet\n",
"!python examples/finetune_flickr_style/assemble_data.py \\\n",
" --workers=-1 --images=2000 --seed=1701 --label=5"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's show what is the difference between the fine-tuning network and the original caffe model."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1c1\r\n",
"< name: \"CaffeNet\"\r\n",
"---\r\n",
"> name: \"FlickrStyleCaffeNet\"\r\n",
"4c4\r\n",
"< type: \"Data\"\r\n",
"---\r\n",
"> type: \"ImageData\"\r\n",
"15,26c15,19\r\n",
"< # mean pixel / channel-wise mean instead of mean image\r\n",
"< # transform_param {\r\n",
"< # crop_size: 227\r\n",
"< # mean_value: 104\r\n",
"< # mean_value: 117\r\n",
"< # mean_value: 123\r\n",
"< # mirror: true\r\n",
"< # }\r\n",
"< data_param {\r\n",
"< source: \"examples/imagenet/ilsvrc12_train_lmdb\"\r\n",
"< batch_size: 256\r\n",
"< backend: LMDB\r\n",
"---\r\n",
"> image_data_param {\r\n",
"> source: \"data/flickr_style/train.txt\"\r\n",
"> batch_size: 50\r\n",
"> new_height: 256\r\n",
"> new_width: 256\r\n",
"31c24\r\n",
"< type: \"Data\"\r\n",
"---\r\n",
"> type: \"ImageData\"\r\n",
"42,51c35,36\r\n",
"< # mean pixel / channel-wise mean instead of mean image\r\n",
"< # transform_param {\r\n",
"< # crop_size: 227\r\n",
"< # mean_value: 104\r\n",
"< # mean_value: 117\r\n",
"< # mean_value: 123\r\n",
"< # mirror: true\r\n",
"< # }\r\n",
"< data_param {\r\n",
"< source: \"examples/imagenet/ilsvrc12_val_lmdb\"\r\n",
"---\r\n",
"> image_data_param {\r\n",
"> source: \"data/flickr_style/test.txt\"\r\n",
"53c38,39\r\n",
"< backend: LMDB\r\n",
"---\r\n",
"> new_height: 256\r\n",
"> new_width: 256\r\n",
"323a310\r\n",
"> # Note that lr_mult can be set to 0 to disable any fine-tuning of this, and any other, layer\r\n",
"360c347\r\n",
"< name: \"fc8\"\r\n",
"---\r\n",
"> name: \"fc8_flickr\"\r\n",
"363c350,351\r\n",
"< top: \"fc8\"\r\n",
"---\r\n",
"> top: \"fc8_flickr\"\r\n",
"> # lr_mult is set to higher than for other layers, because this layer is starting from random while the others are already trained\r\n",
"365c353\r\n",
"< lr_mult: 1\r\n",
"---\r\n",
"> lr_mult: 10\r\n",
"369c357\r\n",
"< lr_mult: 2\r\n",
"---\r\n",
"> lr_mult: 20\r\n",
"373c361\r\n",
"< num_output: 1000\r\n",
"---\r\n",
"> num_output: 20\r\n",
"384a373,379\r\n",
"> name: \"loss\"\r\n",
"> type: \"SoftmaxWithLoss\"\r\n",
"> bottom: \"fc8_flickr\"\r\n",
"> bottom: \"label\"\r\n",
"> top: \"loss\"\r\n",
"> }\r\n",
"> layer {\r\n",
"387c382\r\n",
"< bottom: \"fc8\"\r\n",
"---\r\n",
"> bottom: \"fc8_flickr\"\r\n",
"393,399d387\r\n",
"< }\r\n",
"< layer {\r\n",
"< name: \"loss\"\r\n",
"< type: \"SoftmaxWithLoss\"\r\n",
"< bottom: \"fc8\"\r\n",
"< bottom: \"label\"\r\n",
"< top: \"loss\"\r\n"
]
}
],
"source": [
"!diff models/bvlc_reference_caffenet/train_val.prototxt models/finetune_flickr_style/train_val.prototxt"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For your record, if you want to train the network in pure C++ tools, here is the command:\n",
"\n",
"<code>\n",
"build/tools/caffe train \\\n",
" -solver models/finetune_flickr_style/solver.prototxt \\\n",
" -weights models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel \\\n",
" -gpu 0\n",
"</code>\n",
"\n",
"However, we will train using Python in this example."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"iter 0, finetune_loss=3.360094, scratch_loss=3.136188\n",
"iter 10, finetune_loss=2.672608, scratch_loss=9.736364\n",
"iter 20, finetune_loss=2.071996, scratch_loss=2.250404\n",
"iter 30, finetune_loss=1.758295, scratch_loss=2.049553\n",
"iter 40, finetune_loss=1.533391, scratch_loss=1.941318\n",
"iter 50, finetune_loss=1.561658, scratch_loss=1.839706\n",
"iter 60, finetune_loss=1.461696, scratch_loss=1.880035\n",
"iter 70, finetune_loss=1.267941, scratch_loss=1.719161\n",
"iter 80, finetune_loss=1.192778, scratch_loss=1.627453\n",
"iter 90, finetune_loss=1.541176, scratch_loss=1.822061\n",
"iter 100, finetune_loss=1.029039, scratch_loss=1.654087\n",
"iter 110, finetune_loss=1.138547, scratch_loss=1.735837\n",
"iter 120, finetune_loss=0.917412, scratch_loss=1.851918\n",
"iter 130, finetune_loss=0.971519, scratch_loss=1.801927\n",
"iter 140, finetune_loss=0.868252, scratch_loss=1.745545\n",
"iter 150, finetune_loss=0.790020, scratch_loss=1.844925\n",
"iter 160, finetune_loss=1.092668, scratch_loss=1.695591\n",
"iter 170, finetune_loss=1.055344, scratch_loss=1.661715\n",
"iter 180, finetune_loss=0.969769, scratch_loss=1.823639\n",
"iter 190, finetune_loss=0.780566, scratch_loss=1.820862\n",
"done\n"
]
}
],
"source": [
"niter = 200\n",
"# losses will also be stored in the log\n",
"train_loss = np.zeros(niter)\n",
"scratch_train_loss = np.zeros(niter)\n",
"\n",
"caffe.set_device(0)\n",
"caffe.set_mode_gpu()\n",
"# We create a solver that fine-tunes from a previously trained network.\n",
"solver = caffe.SGDSolver('models/finetune_flickr_style/solver.prototxt')\n",
"solver.net.copy_from('models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel')\n",
"# For reference, we also create a solver that does no finetuning.\n",
"scratch_solver = caffe.SGDSolver('models/finetune_flickr_style/solver.prototxt')\n",
"\n",
"# We run the solver for niter times, and record the training loss.\n",
"for it in range(niter):\n",
" solver.step(1) # SGD by Caffe\n",
" scratch_solver.step(1)\n",
" # store the train loss\n",
" train_loss[it] = solver.net.blobs['loss'].data\n",
" scratch_train_loss[it] = scratch_solver.net.blobs['loss'].data\n",
" if it % 10 == 0:\n",
" print 'iter %d, finetune_loss=%f, scratch_loss=%f' % (it, train_loss[it], scratch_train_loss[it])\n",
"print 'done'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's look at the training loss produced by the two training procedures respectively."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7fbb36f0ad50>,\n",
" <matplotlib.lines.Line2D at 0x7fbb36f0afd0>]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": [
"iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n",
"AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcXFWd9/HPtzt7AlkkJCGAgbCIqCSyuIDaRECEYZvB\n",
"EQRFB5iMo8CjzuMwOlpdioo4IM4iM6wTgdHhgRFBRAhLM6gQtgQCIQQkYc8CJIEQQpb+PX+c01hp\n",
"eqmqrl5SfN+vV7266tZdzr11+3tPnXvuLUUEZmZWHxr6uwBmZlY7DnUzszriUDczqyMOdTOzOuJQ\n",
"NzOrIw51M7M6UlaoS2qUNFfS9fn1OEmzJS2SdLOkMb1bTDMzK0e5NfUzgAVAW6f2M4HZEbEbcGt+\n",
"bWZm/azbUJe0PXAYcDGgPPhIYFZ+Pgs4uldKZ2ZmFSmnpv5j4P8CrSXDJkTEsvx8GTCh1gUzM7PK\n",
"dRnqkv4MWB4Rc/lTLX0zke4z4HsNmJkNAIO6ef/DwJGSDgOGAVtLuhxYJmliRCyVNAlY3tHEkhz2\n",
"ZmZViIgOK9LdUbk39JL0MeDvIuIISecAL0XEDyWdCYyJiLecLJUU1RbMNiepOSKa+7sc9cLbs7a8\n",
"PWurJ9lZaT/1tiPA2cDBkh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a37J3hbdisilkbEvPx8\n",
"DemCzcnUaP/sjVD3RUm1EcAtku6TdGoeNiEi/eA16X4RE/qnaFuszrbfdmzeHdf7bHlOk/SgpEtK\n",
"mgq8LSsgaQrpW9AcarR/9kao+8xrbewfEdNJv+f6JUkfKX0z0vcyb+sqlbH9vG27dgHp132mkW4a\n",
"dm4X43pbdkDSKNJNwc6IiM1uPNeT/bM3Qr2si5KsaxHxQv67Avgl6evWMkkTASRNgrf+nqt1qbPt\n",
"136f3T4Ps05ExPLISD/R1tYc4G1ZBkmDSYF+eURcmwfXZP/sjVC/D9hV0hRJQ4BPk+5hbGWSNELS\n",
"Vvn5SNJ9pNt+5Lrt5kUnAdd2PAfrRGfb7zrgOElDJO1E+r3Oe/qhfFuMHDptjiHtn+Bt2S1JIt1y\n",
"eEFEnF/yVk32z57cJqBD4YuSamEC8Mv02TMIuDIibpZ0H3CVpJNJP3j7l/1XxIFN0s9J99zeRtIz\n",
"pB8EPpsOtl9ELJB0FenHhzcCf5troEaH27IANEmaRmoGWAzMBG/LMu0PnAg8JKntzo7/QI32T198\n",
"ZGZWR3rl4iMzM+sfDnUzszriUDczqyMOdTOzOuJQNzOrIw51M7M64lA3M6sjDnUzszry/wFBsEB8\n",
"UlvRigAAAABJRU5ErkJggg==\n"
],
"text/plain": [
"<matplotlib.figure.Figure at 0x7fbb37f20990>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plot(np.vstack([train_loss, scratch_train_loss]).T)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Notice how the fine-tuning procedure produces a more smooth loss function change, and ends up at a better loss. A closer look at small values, clipping to avoid showing too large loss during training:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7fbb347a8310>,\n",
" <matplotlib.lines.Line2D at 0x7fbb347a8590>]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
},
{
"data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Vr7gy10TEmfznJGnx4DHgnKTFAJJup/iK75Z0il9rf70rH7MOIuJ8ZMA7XHlk4FgWIGke\n",
"Kbm/HxG78+FS+ucgEvz/hVKS5pMKpfYM4HNrQdICSbfk/ZuB1cARUgw35Ms2kKaHsOI6xW8PsE7S\n",
"fElLgWXAvgraN2fkBNTwEKl/gmPZkyQB24GjEfFG06lS+mffl+yLDoVS/f7cGhkCPk39gJuADyJi\n",
"r6T9wC5JTwATwKPVNXF2k7QTuA+4TdIp4GVgG23iFxFHJe0CjgKXgafznanRNpZbgHFJK0iPCk4C\n",
"jSJIx7K3lcDjwGFJB/KxTZTUP13oZGZWU16T1cysppzgzcxqygnezKymnODNzGrKCd7MrKac4M3M\n",
"asoJ3sysppzgzcxq6j+vUsbacqJa4gAAAABJRU5ErkJggg==\n"
],
"text/plain": [
"<matplotlib.figure.Figure at 0x7fbb37f207d0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plot(np.vstack([train_loss, scratch_train_loss]).clip(0, 4).T)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's take a look at the testing accuracy after running 200 iterations. Note that we are running a classification task of 5 classes, thus a chance accuracy is 20%. As we will reasonably expect, the finetuning result will be much better than the one from training from scratch. Let's see."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy for fine-tuning: 0.570000001788\n",
"Accuracy for training from scratch: 0.224000000954\n"
]
}
],
"source": [
"test_iters = 10\n",
"accuracy = 0\n",
"scratch_accuracy = 0\n",
"for it in arange(test_iters):\n",
" solver.test_nets[0].forward()\n",
" accuracy += solver.test_nets[0].blobs['accuracy'].data\n",
" scratch_solver.test_nets[0].forward()\n",
" scratch_accuracy += scratch_solver.test_nets[0].blobs['accuracy'].data\n",
"accuracy /= test_iters\n",
"scratch_accuracy /= test_iters\n",
"print 'Accuracy for fine-tuning:', accuracy\n",
"print 'Accuracy for training from scratch:', scratch_accuracy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Huzzah! So we did finetuning and it is awesome. Let's take a look at what kind of results we are able to get with a longer, more complete run of the style recognition dataset. Note: the below URL might be occassionally down because it is run on a research machine.\n",
"\n",
"http://demo.vislab.berkeleyvision.org/"
]
}
],
"metadata": {
"description": "Fine-tune the ImageNet-trained CaffeNet on new data.",
"example_name": "Fine-tuning for Style Recognition",
"include_in_docs": true,
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
},
"priority": 4
},
"nbformat": 4,
"nbformat_minor": 0
}

View file

@ -0,0 +1,31 @@
file(GLOB_RECURSE examples_srcs "${PROJECT_SOURCE_DIR}/examples/*.cpp")
foreach(source_file ${examples_srcs})
# get file name
get_filename_component(name ${source_file} NAME_WE)
# get folder name
get_filename_component(path ${source_file} PATH)
get_filename_component(folder ${path} NAME_WE)
add_executable(${name} ${source_file})
target_link_libraries(${name} ${Caffe_LINK})
caffe_default_properties(${name})
# set back RUNTIME_OUTPUT_DIRECTORY
set_target_properties(${name} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/examples/${folder}")
caffe_set_solution_folder(${name} examples)
# install
install(TARGETS ${name} DESTINATION bin)
if(UNIX OR APPLE)
# Funny command to make tutorials work
# TODO: remove in future as soon as naming is standartaized everywhere
set(__outname ${PROJECT_BINARY_DIR}/examples/${folder}/${name}${Caffe_POSTFIX})
add_custom_command(TARGET ${name} POST_BUILD
COMMAND ln -sf "${__outname}" "${__outname}.bin")
endif()
endforeach()

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 KiB

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,537 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "AeF9mG-COZNE"
},
"source": [
"## Loading DNN model\n",
"In this notebook we are going to use a [GoogLeNet](https://github.com/BVLC/caffe/tree/master/models/bvlc_googlenet) model trained on [ImageNet](http://www.image-net.org/) dataset, which is set in the ```model_path``` variable:\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "RMhGdYHuOZM8"
},
"source": [
"# Deep Dreams (with Caffe) adapted by marina von steinkirch\n",
"\n",
"This notebook demonstrates how to use the [Caffe](http://caffe.berkeleyvision.org/) neural network framework to \n",
"produce \"dream\" visuals shown in the \n",
"[Google Research blog post](http://googleresearch.blogspot.ch/2015/06/inceptionism-going-deeper-into-neural.html). **#deepdream**\n",
"\n",
"## Dependencies\n",
"\n",
"* Standard Python scientific stack: [NumPy](http://www.numpy.org/), [SciPy](http://www.scipy.org/), [PIL](http://www.pythonware.com/products/pil/), [IPython](http://ipython.org/). \n",
"* [Caffe](http://caffe.berkeleyvision.org/) deep learning framework ([installation instructions](http://caffe.berkeleyvision.org/installation.html)).\n",
"* Google [protobuf](https://developers.google.com/protocol-buffers/) library that is used for Caffe model manipulation.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"id": "Pqz5k4syOZNA"
},
"outputs": [],
"source": [
"import os\n",
"import numpy as np\n",
"import scipy.ndimage as nd\n",
"import PIL.Image\n",
"from cStringIO import StringIO\n",
"from IPython.display import clear_output, Image, display\n",
"from google.protobuf import text_format\n",
"\n",
"import caffe\n",
"\n",
"# GPU support for CUDA and Caffe.\n",
"caffe.set_mode_gpu()\n",
"# Select GPU device if multiple devices exist.\n",
"caffe.set_device(0)\n",
"\n",
"# Set the background image to build the dream on top of it.\n",
"BACKGROUND_IMG = 'd2.jpg'\n",
"\n",
"# Set the image to control the dream on.\n",
"CONTROL_IMAGE = 'd3.jpg'\n",
"\n",
"def showarray(a, fmt='jpeg'):\n",
" \"\"\" Display the image in the notebook. \"\"\"\n",
" a = np.uint8(np.clip(a, 0, 255))\n",
" f = StringIO()\n",
" PIL.Image.fromarray(a).save(f, fmt)\n",
" display(Image(data=f.getvalue()))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"id": "i9hkSm1IOZNR"
},
"outputs": [],
"source": [
"model_path = '../models/bvlc_googlenet/'\n",
"net_fn = os.path.join(model_path, 'deploy.prototxt')\n",
"param_fn = os.path.join(model_path, 'bvlc_googlenet.caffemodel')\n",
"\n",
"# Patching model to be able to compute gradients.\n",
"# Note that you can also manually add \"force_backward: true\" line to \"deploy.prototxt\".\n",
"model = caffe.io.caffe_pb2.NetParameter()\n",
"text_format.Merge(open(net_fn).read(), model)\n",
"model.force_backward = True\n",
"open('tmp.prototxt', 'w').write(str(model))\n",
"\n",
"net = caffe.Classifier('tmp.prototxt', param_fn,\n",
" mean = np.float32([104.0, 116.0, 122.0]), # ImageNet mean, training set dependent\n",
" channel_swap = (2,1,0)) # the reference model has channels in BGR order instead of RGB\n",
"\n",
"# A couple of utility functions for converting to and from Caffe's input image layout.\n",
"def preprocess(net, img):\n",
" return np.float32(np.rollaxis(img, 2)[::-1]) - net.transformer.mean['data']\n",
"\n",
"def deprocess(net, img):\n",
" return np.dstack((img + net.transformer.mean['data'])[::-1])"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "UeV_fJ4QOZNb"
},
"source": [
"## Producing dreams"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "9udrp3efOZNd"
},
"source": [
"The \"dream\" images is just a gradient ascent process that tries to maximize the **L2** norm of activations of a particular DNN layer. \n",
"\n",
"Here are a few simple tricks that we found useful for getting good images:\n",
"\n",
"* offset image by a random jitter,\n",
"* normalize the magnitude of gradient ascent steps,\n",
"* apply ascent across multiple scales (octaves),\n",
"\n",
"First, we implement a basic gradient ascent step function, applying the first two tricks:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"id": "pN43nMsHOZNg"
},
"outputs": [],
"source": [
"def objective_L2(dst):\n",
" dst.diff[:] = dst.data \n",
"\n",
"def make_step(net, step_size=1.5, end='inception_4c/output', \n",
" jitter=32, clip=True, objective=objective_L2):\n",
" '''Basic gradient ascent step.'''\n",
"\n",
" src = net.blobs['data'] # input image is stored in Net's 'data' blob\n",
" dst = net.blobs[end]\n",
"\n",
" ox, oy = np.random.randint(-jitter, jitter+1, 2)\n",
" src.data[0] = np.roll(np.roll(src.data[0], ox, -1), oy, -2) # apply jitter shift\n",
" \n",
" net.forward(end=end)\n",
" objective(dst) # specify the optimization objective\n",
" net.backward(start=end)\n",
" g = src.diff[0]\n",
" # apply normalized ascent step to the input image\n",
" src.data[:] += step_size/np.abs(g).mean() * g\n",
"\n",
" src.data[0] = np.roll(np.roll(src.data[0], -ox, -1), -oy, -2) # unshift image\n",
" \n",
" if clip:\n",
" bias = net.transformer.mean['data']\n",
" src.data[:] = np.clip(src.data, -bias, 255-bias) "
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "nphEdlBgOZNk"
},
"source": [
"Next we implement an ascent through different scales. We call these scales \"octaves\"."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"id": "ZpFIn8l0OZNq"
},
"outputs": [],
"source": [
"def deepdream(net, base_img, iter_n=10, octave_n=4, octave_scale=1.4, \n",
" end='inception_4c/output', clip=True, **step_params):\n",
" \n",
" # prepare base images for all octaves\n",
" octaves = [preprocess(net, base_img)]\n",
" for i in xrange(octave_n-1):\n",
" octaves.append(nd.zoom(octaves[-1], (1, 1.0/octave_scale,1.0/octave_scale), order=1))\n",
" \n",
" src = net.blobs['data']\n",
" detail = np.zeros_like(octaves[-1]) # allocate image for network-produced details\n",
" for octave, octave_base in enumerate(octaves[::-1]):\n",
" h, w = octave_base.shape[-2:]\n",
" if octave > 0:\n",
" # upscale details from the previous octave\n",
" h1, w1 = detail.shape[-2:]\n",
" detail = nd.zoom(detail, (1, 1.0*h/h1,1.0*w/w1), order=1)\n",
"\n",
" src.reshape(1,3,h,w) # resize the network's input image size\n",
" src.data[0] = octave_base+detail\n",
" for i in xrange(iter_n):\n",
" make_step(net, end=end, clip=clip, **step_params)\n",
" \n",
" # visualization\n",
" vis = deprocess(net, src.data[0])\n",
" if not clip: # adjust image contrast if clipping is disabled\n",
" vis = vis*(255.0/np.percentile(vis, 99.98))\n",
" showarray(vis)\n",
" print octave, i, end, vis.shape\n",
" clear_output(wait=True)\n",
" \n",
" # extract details produced on the current octave\n",
" detail = src.data[0]-octave_base\n",
" # returning the resulting image\n",
" return deprocess(net, src.data[0])"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "QrcdU-lmOZNx"
},
"source": [
"Now we are ready to let the neural network reveal its dreams! Let's take a Dali image as a starting point:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"executionInfo": null,
"id": "40p5AqqwOZN5",
"outputId": "f62cde37-79e8-420a-e448-3b9b48ee1730",
"pinned": false
},
"outputs": [],
"source": [
"img = np.float32(PIL.Image.open(BACKGROUND_IMG))\n",
"showarray(img)"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "Z9_215_GOZOL"
},
"source": [
"Running the next code cell starts the detail generation process. You may see how new patterns start to form, iteration by iteration, octave by octave."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"executionInfo": null,
"id": "HlnVnDTlOZOL",
"outputId": "425dfc83-b474-4a69-8386-30d86361bbf6",
"pinned": false
},
"outputs": [],
"source": [
"_=deepdream(net, img)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "Rp9kOCQTOZOQ"
},
"source": [
"The complexity of the details generated depends on which layer's activations we try to maximize. Higher layers produce complex features, while lower ones enhance edges and textures, giving the image an impressionist feeling:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"executionInfo": null,
"id": "eHOX0t93OZOR",
"outputId": "0de0381c-4681-4619-912f-9b6a2cdec0c6",
"pinned": false
},
"outputs": [],
"source": [
"_=deepdream(net, img, end='inception_3b/5x5_reduce')"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "rkzHz9E8OZOb"
},
"source": [
"We encourage readers to experiment with layer selection to see how it affects the results. Execute the next code cell to see the list of different layers. You can modify the `make_step` function to make it follow some different objective, say to select a subset of activations to maximize, or to maximize multiple layers at once. There is a huge design space to explore!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"id": "OIepVN6POZOc"
},
"outputs": [],
"source": [
"net.blobs.keys()"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "vs2uUpMCOZOe"
},
"source": [
"What if we feed the `deepdream` function its own output, after applying a little zoom to it? It turns out that this leads to an endless stream of impressions of the things that the network saw during training. Some patterns fire more often than others, suggestive of basins of attraction.\n",
"\n",
"We will start the process from the same sky image as above, but after some iteration the original image becomes irrelevant; even random noise can be used as the starting point."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"id": "IB48CnUfOZOe"
},
"outputs": [],
"source": [
"!mkdir frames\n",
"frame = img\n",
"frame_i = 0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"id": "fj0E-fKDOZOi"
},
"outputs": [],
"source": [
"h, w = frame.shape[:2]\n",
"s = 0.05 # scale coefficient\n",
"\n",
"for i in xrange(1):\n",
" frame = deepdream(net, frame)\n",
" PIL.Image.fromarray(np.uint8(frame)).save(\"frames/%04d.jpg\"%frame_i)\n",
" frame = nd.affine_transform(frame, [1-s,1-s,1], [h*s/2,w*s/2,0], order=1)\n",
" frame_i += 1"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "XzZGGME_OZOk"
},
"source": [
"Be careful running the code above, it can bring you into very strange realms!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "both",
"colab_type": "code",
"collapsed": false,
"executionInfo": null,
"id": "ZCZcz2p1OZOt",
"outputId": "d3773436-2b5d-4e79-be9d-0f12ab839fff",
"pinned": false
},
"outputs": [],
"source": [
"Image(filename='frames/0029.jpg')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Controlling dreams\n",
"\n",
"The image detail generation method described above tends to produce some patterns more often the others. One easy way to improve the generated image diversity is to tweak the optimization objective. Here we show just one of many ways to do that. Let's use one more input image. We'd call it a \"*guide*\"."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"guide = np.float32(PIL.Image.open(CONTROL_IMAGE))\n",
"showarray(guide)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that the neural network we use was trained on images downscaled to 224x224 size. So high resolution images might have to be downscaled, so that the network could pick up their features. The image we use here is already small enough.\n",
"\n",
"Now we pick some target layer and extract guide image features."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"end = 'inception_3b/output'\n",
"h, w = guide.shape[:2]\n",
"src, dst = net.blobs['data'], net.blobs[end]\n",
"src.reshape(1,3,h,w)\n",
"src.data[0] = preprocess(net, guide)\n",
"net.forward(end=end)\n",
"guide_features = dst.data[0].copy()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Instead of maximizing the L2-norm of current image activations, we try to maximize the dot-products between activations of current image, and their best matching correspondences from the guide image."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"def objective_guide(dst):\n",
" x = dst.data[0].copy()\n",
" y = guide_features\n",
" ch = x.shape[0]\n",
" x = x.reshape(ch,-1)\n",
" y = y.reshape(ch,-1)\n",
" A = x.T.dot(y) # compute the matrix of dot-products with guide features\n",
" dst.diff[0].reshape(ch,-1)[:] = y[:,A.argmax(1)] # select ones that match best\n",
"\n",
"_=deepdream(net, img, end=end, objective=objective_guide)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This way we can affect the style of generated images without using a different training set."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"colabVersion": "0.3.1",
"default_view": {},
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
},
"views": {}
},
"nbformat": 4,
"nbformat_minor": 0
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

File diff suppressed because it is too large Load diff

85
Numpy/nn_simple.ipynb Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,36 @@
import numpy as np
import tensorflow as tf
# Model linear regression y = Wx + b
x = tf.placeholder(tf.float32, [None, 1])
W = tf.Variable(tf.zeros([1,1]))
b = tf.Variable(tf.zeros([1]))
product = tf.matmul(x,W)
y = product + b
y_ = tf.placeholder(tf.float32, [None, 1])
# Cost function sum((y_-y)**2)
cost = tf.reduce_mean(tf.square(y_-y))
# Training using Gradient Descent to minimize cost
train_step = tf.train.GradientDescentOptimizer(0.0000001).minimize(cost)
sess = tf.Session()
init = tf.initialize_all_variables()
sess.run(init)
steps = 1000
for i in range(steps):
# Create fake data for y = W.x + b where W = 2, b = 0
xs = np.array([[i]])
ys = np.array([[2*i]])
# Train
feed = { x: xs, y_: ys }
sess.run(train_step, feed_dict=feed)
print("After %d iteration:" % i)
print("W: %f" % sess.run(W))
print("b: %f" % sess.run(b))
print("cost: %f" % sess.run(cost, feed_dict=feed))