commit 21970b730a1cc1e87dbd5ec1ca66b6735606e5c2 Author: Nataniel Ruiz Gutierrez Date: Sat Dec 21 16:37:10 2019 -0500 All diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..1c27dea Binary files /dev/null and b/.DS_Store differ diff --git a/._.DS_Store b/._.DS_Store new file mode 100644 index 0000000..475b548 Binary files /dev/null and b/._.DS_Store differ diff --git a/GANimation/LICENSE b/GANimation/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/GANimation/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/GANimation/README.md b/GANimation/README.md new file mode 100644 index 0000000..e39c75a --- /dev/null +++ b/GANimation/README.md @@ -0,0 +1,48 @@ + + +# GANimation: Anatomically-aware Facial Animation from a Single Image +### [[Project]](http://www.albertpumarola.com/research/GANimation/index.html)[ [Paper]](https://rdcu.be/bPuaJ) +Official implementation of [GANimation](http://www.albertpumarola.com/research/GANimation/index.html). In this work we introduce a novel GAN conditioning scheme based on Action Units (AU) annotations, which describe in a continuous manifold the anatomical facial movements defining a human expression. Our approach permits controlling the magnitude of activation of each AU and combine several of them. For more information please refer to the [paper](https://arxiv.org/abs/1807.09251). + +This code was made public to share our research for the benefit of the scientific community. Do NOT use it for immoral purposes. + +![GANimation](http://www.albertpumarola.com/images/2018/GANimation/teaser.png) + +## Prerequisites +- Install PyTorch (version 0.3.1), Torch Vision and dependencies from http://pytorch.org +- Install requirements.txt (```pip install -r requirements.txt```) + +## Data Preparation +The code requires a directory containing the following files: +- `imgs/`: folder with all image +- `aus_openface.pkl`: dictionary containing the images action units. +- `train_ids.csv`: file containing the images names to be used to train. +- `test_ids.csv`: file containing the images names to be used to test. + +An example of this directory is shown in `sample_dataset/`. + +To generate the `aus_openface.pkl` extract each image Action Units with [OpenFace](https://github.com/TadasBaltrusaitis/OpenFace/wiki/Action-Units) and store each output in a csv file the same name as the image. Then run: +``` +python data/prepare_au_annotations.py +``` + +## Run +To train: +``` +bash launch/run_train.sh +``` +To test: +``` +python test --input_path path/to/img +``` + +## Citation +If you use this code or ideas from the paper for your research, please cite our paper: +``` +@article{Pumarola_ijcv2019, + title={GANimation: One-Shot Anatomically Consistent Facial Animation}, + author={A. Pumarola and A. Agudo and A.M. Martinez and A. Sanfeliu and F. Moreno-Noguer}, + booktitle={International Journal of Computer Vision (IJCV)}, + year={2019} +} +``` diff --git a/GANimation/data/__init__.py b/GANimation/data/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/GANimation/data/custom_dataset_data_loader.py b/GANimation/data/custom_dataset_data_loader.py new file mode 100644 index 0000000..c9774c2 --- /dev/null +++ b/GANimation/data/custom_dataset_data_loader.py @@ -0,0 +1,25 @@ +import torch.utils.data +from data.dataset import DatasetFactory + + +class CustomDatasetDataLoader: + def __init__(self, opt, is_for_train=True): + self._opt = opt + self._is_for_train = is_for_train + self._num_threds = opt.n_threads_train if is_for_train else opt.n_threads_test + self._create_dataset() + + def _create_dataset(self): + self._dataset = DatasetFactory.get_by_name(self._opt.dataset_mode, self._opt, self._is_for_train) + self._dataloader = torch.utils.data.DataLoader( + self._dataset, + batch_size=self._opt.batch_size, + shuffle=not self._opt.serial_batches, + num_workers=int(self._num_threds), + drop_last=True) + + def load_data(self): + return self._dataloader + + def __len__(self): + return len(self._dataset) diff --git a/GANimation/data/dataset.py b/GANimation/data/dataset.py new file mode 100644 index 0000000..9025fbd --- /dev/null +++ b/GANimation/data/dataset.py @@ -0,0 +1,68 @@ +import torch.utils.data as data +from PIL import Image +import torchvision.transforms as transforms +import os +import os.path + + +class DatasetFactory: + def __init__(self): + pass + + @staticmethod + def get_by_name(dataset_name, opt, is_for_train): + if dataset_name == 'aus': + from data.dataset_aus import AusDataset + dataset = AusDataset(opt, is_for_train) + else: + raise ValueError("Dataset [%s] not recognized." % dataset_name) + + print('Dataset {} was created'.format(dataset.name)) + return dataset + + +class DatasetBase(data.Dataset): + def __init__(self, opt, is_for_train): + super(DatasetBase, self).__init__() + self._name = 'BaseDataset' + self._root = None + self._opt = opt + self._is_for_train = is_for_train + self._create_transform() + + self._IMG_EXTENSIONS = [ + '.jpg', '.JPG', '.jpeg', '.JPEG', + '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', + ] + + @property + def name(self): + return self._name + + @property + def path(self): + return self._root + + def _create_transform(self): + self._transform = transforms.Compose([]) + + def get_transform(self): + return self._transform + + def _is_image_file(self, filename): + return any(filename.endswith(extension) for extension in self._IMG_EXTENSIONS) + + def _is_csv_file(self, filename): + return filename.endswith('.csv') + + def _get_all_files_in_subfolders(self, dir, is_file): + images = [] + assert os.path.isdir(dir), '%s is not a valid directory' % dir + + for root, _, fnames in sorted(os.walk(dir)): + for fname in fnames: + if is_file(fname): + path = os.path.join(root, fname) + images.append(path) + + return images diff --git a/GANimation/data/dataset_aus.py b/GANimation/data/dataset_aus.py new file mode 100644 index 0000000..2419274 --- /dev/null +++ b/GANimation/data/dataset_aus.py @@ -0,0 +1,117 @@ +import os.path +import torchvision.transforms as transforms +from data.dataset import DatasetBase +from PIL import Image +import random +import numpy as np +import pickle +from utils import cv_utils + + +class AusDataset(DatasetBase): + def __init__(self, opt, is_for_train): + super(AusDataset, self).__init__(opt, is_for_train) + self._name = 'AusDataset' + + # read dataset + self._read_dataset_paths() + + def __getitem__(self, index): + assert (index < self._dataset_size) + + # start_time = time.time() + real_img = None + real_cond = None + while real_img is None or real_cond is None: + # if sample randomly: overwrite index + if not self._opt.serial_batches: + index = random.randint(0, self._dataset_size - 1) + + # get sample data + sample_id = self._ids[index] + + real_img, real_img_path = self._get_img_by_id(sample_id) + real_cond = self._get_cond_by_id(sample_id) + + if real_img is None: + print 'error reading image %s, skipping sample' % sample_id + if real_cond is None: + print 'error reading aus %s, skipping sample' % sample_id + + desired_cond = self._generate_random_cond() + + # transform data + img = self._transform(Image.fromarray(real_img)) + + # pack data + sample = {'real_img': img, + 'real_cond': real_cond, + 'desired_cond': desired_cond, + 'sample_id': sample_id, + 'real_img_path': real_img_path + } + + # print (time.time() - start_time) + + return sample + + def __len__(self): + return self._dataset_size + + def _read_dataset_paths(self): + self._root = self._opt.data_dir + self._imgs_dir = os.path.join(self._root, self._opt.images_folder) + + # read ids + use_ids_filename = self._opt.train_ids_file if self._is_for_train else self._opt.test_ids_file + use_ids_filepath = os.path.join(self._root, use_ids_filename) + self._ids = self._read_ids(use_ids_filepath) + + # read aus + conds_filepath = os.path.join(self._root, self._opt.aus_file) + self._conds = self._read_conds(conds_filepath) + + self._ids = list(set(self._ids).intersection(set(self._conds.keys()))) + + # dataset size + self._dataset_size = len(self._ids) + + def _create_transform(self): + if self._is_for_train: + transform_list = [transforms.RandomHorizontalFlip(), + transforms.ToTensor(), + transforms.Normalize(mean=[0.5, 0.5, 0.5], + std=[0.5, 0.5, 0.5]), + ] + else: + transform_list = [transforms.ToTensor(), + transforms.Normalize(mean=[0.5, 0.5, 0.5], + std=[0.5, 0.5, 0.5]), + ] + self._transform = transforms.Compose(transform_list) + + def _read_ids(self, file_path): + ids = np.loadtxt(file_path, delimiter='\t', dtype=np.str) + return [id[:-4] for id in ids] + + def _read_conds(self, file_path): + with open(file_path, 'rb') as f: + return pickle.load(f) + + def _get_cond_by_id(self, id): + if id in self._conds: + return self._conds[id]/5.0 + else: + return None + + def _get_img_by_id(self, id): + filepath = os.path.join(self._imgs_dir, id+'.jpg') + return cv_utils.read_cv2_img(filepath), filepath + + def _generate_random_cond(self): + cond = None + while cond is None: + rand_sample_id = self._ids[random.randint(0, self._dataset_size - 1)] + cond = self._get_cond_by_id(rand_sample_id) + cond += np.random.uniform(-0.1, 0.1, cond.shape) + return cond diff --git a/GANimation/data/prepare_au_annotations.py b/GANimation/data/prepare_au_annotations.py new file mode 100644 index 0000000..aab9a08 --- /dev/null +++ b/GANimation/data/prepare_au_annotations.py @@ -0,0 +1,39 @@ +import numpy as np +import os +from tqdm import tqdm +import argparse +import glob +import re +import pickle + +parser = argparse.ArgumentParser() +parser.add_argument('-ia', '--input_aus_filesdir', type=str, help='Dir with imgs aus files') +parser.add_argument('-op', '--output_path', type=str, help='Output path') +args = parser.parse_args() + +def get_data(filepaths): + data = dict() + for filepath in tqdm(filepaths): + content = np.loadtxt(filepath, delimiter=', ', skiprows=1) + data[os.path.basename(filepath[:-4])] = content[2:19] + + return data + +def save_dict(data, name): + with open(name + '.pkl', 'wb') as f: + pickle.dump(data, f, pickle.HIGHEST_PROTOCOL) + +def main(): + filepaths = glob.glob(os.path.join(args.input_aus_filesdir, '*.csv')) + filepaths.sort() + + # create aus file + data = get_data(filepaths) + + if not os.path.isdir(args.output_path): + os.makedirs(args.output_path) + save_dict(data, os.path.join(args.output_path, "aus")) + + +if __name__ == '__main__': + main() diff --git a/GANimation/launch/run_train.sh b/GANimation/launch/run_train.sh new file mode 100644 index 0000000..b427f40 --- /dev/null +++ b/GANimation/launch/run_train.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +python train.py \ +--data_dir path/to/dataset/ \ +--name experiment_1 \ +--batch_size 25 \ diff --git a/GANimation/models/__init__.py b/GANimation/models/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/GANimation/models/ganimation.py b/GANimation/models/ganimation.py new file mode 100644 index 0000000..169d910 --- /dev/null +++ b/GANimation/models/ganimation.py @@ -0,0 +1,405 @@ +import torch +from collections import OrderedDict +from torch.autograd import Variable +import utils.util as util +import utils.plots as plot_utils +from .models import BaseModel +from networks.networks import NetworksFactory +import os +import numpy as np + + +class GANimation(BaseModel): + def __init__(self, opt): + super(GANimation, self).__init__(opt) + self._name = 'GANimation' + + # create networks + self._init_create_networks() + + # init train variables + if self._is_train: + self._init_train_vars() + + # load networks and optimizers + if not self._is_train or self._opt.load_epoch > 0: + self.load() + + # prefetch variables + self._init_prefetch_inputs() + + # init + self._init_losses() + + def _init_create_networks(self): + # generator network + self._G = self._create_generator() + self._G.init_weights() + if len(self._gpu_ids) > 1: + self._G = torch.nn.DataParallel(self._G, device_ids=self._gpu_ids) + self._G.cuda() + + # discriminator network + self._D = self._create_discriminator() + self._D.init_weights() + if len(self._gpu_ids) > 1: + self._D = torch.nn.DataParallel(self._D, device_ids=self._gpu_ids) + self._D.cuda() + + def _create_generator(self): + return NetworksFactory.get_by_name('generator_wasserstein_gan', c_dim=self._opt.cond_nc) + + def _create_discriminator(self): + return NetworksFactory.get_by_name('discriminator_wasserstein_gan', c_dim=self._opt.cond_nc) + + def _init_train_vars(self): + self._current_lr_G = self._opt.lr_G + self._current_lr_D = self._opt.lr_D + + # initialize optimizers + self._optimizer_G = torch.optim.Adam(self._G.parameters(), lr=self._current_lr_G, + betas=[self._opt.G_adam_b1, self._opt.G_adam_b2]) + self._optimizer_D = torch.optim.Adam(self._D.parameters(), lr=self._current_lr_D, + betas=[self._opt.D_adam_b1, self._opt.D_adam_b2]) + + def _init_prefetch_inputs(self): + self._input_real_img = self._Tensor(self._opt.batch_size, 3, self._opt.image_size, self._opt.image_size) + self._input_real_cond = self._Tensor(self._opt.batch_size, self._opt.cond_nc) + self._input_desired_cond = self._Tensor(self._opt.batch_size, self._opt.cond_nc) + self._input_real_img_path = None + self._input_real_cond_path = None + + def _init_losses(self): + # define loss functions + self._criterion_cycle = torch.nn.L1Loss().cuda() + self._criterion_D_cond = torch.nn.MSELoss().cuda() + + # init losses G + self._loss_g_fake = Variable(self._Tensor([0])) + self._loss_g_cond = Variable(self._Tensor([0])) + self._loss_g_cyc = Variable(self._Tensor([0])) + self._loss_g_mask_1 = Variable(self._Tensor([0])) + self._loss_g_mask_2 = Variable(self._Tensor([0])) + self._loss_g_idt = Variable(self._Tensor([0])) + self._loss_g_masked_fake = Variable(self._Tensor([0])) + self._loss_g_masked_cond = Variable(self._Tensor([0])) + self._loss_g_mask_1_smooth = Variable(self._Tensor([0])) + self._loss_g_mask_2_smooth = Variable(self._Tensor([0])) + self._loss_rec_real_img_rgb = Variable(self._Tensor([0])) + self._loss_g_fake_imgs_smooth = Variable(self._Tensor([0])) + self._loss_g_unmasked_rgb = Variable(self._Tensor([0])) + + # init losses D + self._loss_d_real = Variable(self._Tensor([0])) + self._loss_d_cond = Variable(self._Tensor([0])) + self._loss_d_fake = Variable(self._Tensor([0])) + self._loss_d_gp = Variable(self._Tensor([0])) + + def set_input(self, input): + self._input_real_img.resize_(input['real_img'].size()).copy_(input['real_img']) + self._input_real_cond.resize_(input['real_cond'].size()).copy_(input['real_cond']) + self._input_desired_cond.resize_(input['desired_cond'].size()).copy_(input['desired_cond']) + self._input_real_id = input['sample_id'] + self._input_real_img_path = input['real_img_path'] + + if len(self._gpu_ids) > 0: + self._input_real_img = self._input_real_img.cuda(self._gpu_ids[0], async=True) + self._input_real_cond = self._input_real_cond.cuda(self._gpu_ids[0], async=True) + self._input_desired_cond = self._input_desired_cond.cuda(self._gpu_ids[0], async=True) + + def set_train(self): + self._G.train() + self._D.train() + self._is_train = True + + def set_eval(self): + self._G.eval() + self._is_train = False + + # get image paths + def get_image_paths(self): + return OrderedDict([('real_img', self._input_real_img_path)]) + + def forward(self, keep_data_for_visuals=False, return_estimates=False): + if not self._is_train: + # convert tensor to variables + real_img = Variable(self._input_real_img, volatile=True) + real_cond = Variable(self._input_real_cond, volatile=True) + desired_cond = Variable(self._input_desired_cond, volatile=True) + + # generate fake images + fake_imgs, fake_img_mask = self._G.forward(real_img, desired_cond) + fake_img_mask = self._do_if_necessary_saturate_mask(fake_img_mask, saturate=self._opt.do_saturate_mask) + fake_imgs_masked = fake_img_mask * real_img + (1 - fake_img_mask) * fake_imgs + + rec_real_img_rgb, rec_real_img_mask = self._G.forward(fake_imgs_masked, real_cond) + rec_real_img_mask = self._do_if_necessary_saturate_mask(rec_real_img_mask, saturate=self._opt.do_saturate_mask) + rec_real_imgs = rec_real_img_mask * fake_imgs_masked + (1 - rec_real_img_mask) * rec_real_img_rgb + + imgs = None + data = None + if return_estimates: + # normalize mask for better visualization + fake_img_mask_max = fake_imgs_masked.view(fake_img_mask.size(0), -1).max(-1)[0] + fake_img_mask_max = torch.unsqueeze(torch.unsqueeze(torch.unsqueeze(fake_img_mask_max, -1), -1), -1) + # fake_img_mask_norm = fake_img_mask / fake_img_mask_max + fake_img_mask_norm = fake_img_mask + + # generate images + im_real_img = util.tensor2im(real_img.data) + im_fake_imgs = util.tensor2im(fake_imgs.data) + im_fake_img_mask_norm = util.tensor2maskim(fake_img_mask_norm.data) + im_fake_imgs_masked = util.tensor2im(fake_imgs_masked.data) + im_rec_imgs = util.tensor2im(rec_real_img_rgb.data) + im_rec_img_mask_norm = util.tensor2maskim(rec_real_img_mask.data) + im_rec_imgs_masked = util.tensor2im(rec_real_imgs.data) + im_concat_img = np.concatenate([im_real_img, im_fake_imgs_masked, im_fake_img_mask_norm, im_fake_imgs, + im_rec_imgs, im_rec_img_mask_norm, im_rec_imgs_masked], + 1) + + im_real_img_batch = util.tensor2im(real_img.data, idx=-1, nrows=1) + im_fake_imgs_batch = util.tensor2im(fake_imgs.data, idx=-1, nrows=1) + im_fake_img_mask_norm_batch = util.tensor2maskim(fake_img_mask_norm.data, idx=-1, nrows=1) + im_fake_imgs_masked_batch = util.tensor2im(fake_imgs_masked.data, idx=-1, nrows=1) + im_concat_img_batch = np.concatenate([im_real_img_batch, im_fake_imgs_masked_batch, + im_fake_img_mask_norm_batch, im_fake_imgs_batch], + 1) + + imgs = OrderedDict([('real_img', im_real_img), + ('fake_imgs', im_fake_imgs), + ('fake_img_mask', im_fake_img_mask_norm), + ('fake_imgs_masked', im_fake_imgs_masked), + ('concat', im_concat_img), + ('real_img_batch', im_real_img_batch), + ('fake_imgs_batch', im_fake_imgs_batch), + ('fake_img_mask_batch', im_fake_img_mask_norm_batch), + ('fake_imgs_masked_batch', im_fake_imgs_masked_batch), + ('concat_batch', im_concat_img_batch), + ]) + + data = OrderedDict([('real_path', self._input_real_img_path), + ('desired_cond', desired_cond.data[0, ...].cpu().numpy().astype('str')) + ]) + + # keep data for visualization + if keep_data_for_visuals: + self._vis_real_img = util.tensor2im(self._input_real_img) + self._vis_fake_img_unmasked = util.tensor2im(fake_imgs.data) + self._vis_fake_img = util.tensor2im(fake_imgs_masked.data) + self._vis_fake_img_mask = util.tensor2maskim(fake_img_mask.data) + self._vis_real_cond = self._input_real_cond.cpu()[0, ...].numpy() + self._vis_desired_cond = self._input_desired_cond.cpu()[0, ...].numpy() + self._vis_batch_real_img = util.tensor2im(self._input_real_img, idx=-1) + self._vis_batch_fake_img_mask = util.tensor2maskim(fake_img_mask.data, idx=-1) + self._vis_batch_fake_img = util.tensor2im(fake_imgs_masked.data, idx=-1) + + return imgs, data + + def optimize_parameters(self, train_generator=True, keep_data_for_visuals=False): + if self._is_train: + # convert tensor to variables + self._B = self._input_real_img.size(0) + self._real_img = Variable(self._input_real_img) + self._real_cond = Variable(self._input_real_cond) + self._desired_cond = Variable(self._input_desired_cond) + + # train D + loss_D, fake_imgs_masked = self._forward_D() + self._optimizer_D.zero_grad() + loss_D.backward() + self._optimizer_D.step() + + loss_D_gp= self._gradinet_penalty_D(fake_imgs_masked) + self._optimizer_D.zero_grad() + loss_D_gp.backward() + self._optimizer_D.step() + + # train G + if train_generator: + loss_G = self._forward_G(keep_data_for_visuals) + self._optimizer_G.zero_grad() + loss_G.backward() + self._optimizer_G.step() + + def _forward_G(self, keep_data_for_visuals): + # generate fake images + fake_imgs, fake_img_mask = self._G.forward(self._real_img, self._desired_cond) + fake_img_mask = self._do_if_necessary_saturate_mask(fake_img_mask, saturate=self._opt.do_saturate_mask) + fake_imgs_masked = fake_img_mask * self._real_img + (1 - fake_img_mask) * fake_imgs + + # D(G(Ic1, c2)*M) masked + d_fake_desired_img_masked_prob, d_fake_desired_img_masked_cond = self._D.forward(fake_imgs_masked) + self._loss_g_masked_fake = self._compute_loss_D(d_fake_desired_img_masked_prob, True) * self._opt.lambda_D_prob + self._loss_g_masked_cond = self._criterion_D_cond(d_fake_desired_img_masked_cond, self._desired_cond) / self._B * self._opt.lambda_D_cond + + # G(G(Ic1,c2), c1) + rec_real_img_rgb, rec_real_img_mask = self._G.forward(fake_imgs_masked, self._real_cond) + rec_real_img_mask = self._do_if_necessary_saturate_mask(rec_real_img_mask, saturate=self._opt.do_saturate_mask) + rec_real_imgs = rec_real_img_mask * fake_imgs_masked + (1 - rec_real_img_mask) * rec_real_img_rgb + + # l_cyc(G(G(Ic1,c2), c1)*M) + self._loss_g_cyc = self._criterion_cycle(rec_real_imgs, self._real_img) * self._opt.lambda_cyc + + # loss mask + self._loss_g_mask_1 = torch.mean(fake_img_mask) * self._opt.lambda_mask + self._loss_g_mask_2 = torch.mean(rec_real_img_mask) * self._opt.lambda_mask + self._loss_g_mask_1_smooth = self._compute_loss_smooth(fake_img_mask) * self._opt.lambda_mask_smooth + self._loss_g_mask_2_smooth = self._compute_loss_smooth(rec_real_img_mask) * self._opt.lambda_mask_smooth + + # keep data for visualization + if keep_data_for_visuals: + self._vis_real_img = util.tensor2im(self._input_real_img) + self._vis_fake_img_unmasked = util.tensor2im(fake_imgs.data) + self._vis_fake_img = util.tensor2im(fake_imgs_masked.data) + self._vis_fake_img_mask = util.tensor2maskim(fake_img_mask.data) + self._vis_real_cond = self._input_real_cond.cpu()[0, ...].numpy() + self._vis_desired_cond = self._input_desired_cond.cpu()[0, ...].numpy() + self._vis_batch_real_img = util.tensor2im(self._input_real_img, idx=-1) + self._vis_batch_fake_img_mask = util.tensor2maskim(fake_img_mask.data, idx=-1) + self._vis_batch_fake_img = util.tensor2im(fake_imgs_masked.data, idx=-1) + self._vis_rec_img_unmasked = util.tensor2im(rec_real_img_rgb.data) + self._vis_rec_real_img = util.tensor2im(rec_real_imgs.data) + self._vis_rec_real_img_mask = util.tensor2maskim(rec_real_img_mask.data) + self._vis_batch_rec_real_img = util.tensor2im(rec_real_imgs.data, idx=-1) + + # combine losses + return self._loss_g_masked_fake + self._loss_g_masked_cond + \ + self._loss_g_cyc + \ + self._loss_g_mask_1 + self._loss_g_mask_2 + \ + self._loss_g_mask_1_smooth + self._loss_g_mask_2_smooth + + def _forward_D(self): + # generate fake images + fake_imgs, fake_img_mask = self._G.forward(self._real_img, self._desired_cond) + fake_img_mask = self._do_if_necessary_saturate_mask(fake_img_mask, saturate=self._opt.do_saturate_mask) + fake_imgs_masked = fake_img_mask * self._real_img + (1 - fake_img_mask) * fake_imgs + + # D(real_I) + d_real_img_prob, d_real_img_cond = self._D.forward(self._real_img) + self._loss_d_real = self._compute_loss_D(d_real_img_prob, True) * self._opt.lambda_D_prob + self._loss_d_cond = self._criterion_D_cond(d_real_img_cond, self._real_cond) / self._B * self._opt.lambda_D_cond + + # D(fake_I) + d_fake_desired_img_prob, _ = self._D.forward(fake_imgs_masked.detach()) + self._loss_d_fake = self._compute_loss_D(d_fake_desired_img_prob, False) * self._opt.lambda_D_prob + + # combine losses + return self._loss_d_real + self._loss_d_cond + self._loss_d_fake, fake_imgs_masked + + def _gradinet_penalty_D(self, fake_imgs_masked): + # interpolate sample + alpha = torch.rand(self._B, 1, 1, 1).cuda().expand_as(self._real_img) + interpolated = Variable(alpha * self._real_img.data + (1 - alpha) * fake_imgs_masked.data, requires_grad=True) + interpolated_prob, _ = self._D(interpolated) + + # compute gradients + grad = torch.autograd.grad(outputs=interpolated_prob, + inputs=interpolated, + grad_outputs=torch.ones(interpolated_prob.size()).cuda(), + retain_graph=True, + create_graph=True, + only_inputs=True)[0] + + # penalize gradients + grad = grad.view(grad.size(0), -1) + grad_l2norm = torch.sqrt(torch.sum(grad ** 2, dim=1)) + self._loss_d_gp = torch.mean((grad_l2norm - 1) ** 2) * self._opt.lambda_D_gp + + return self._loss_d_gp + + def _compute_loss_D(self, estim, is_real): + return -torch.mean(estim) if is_real else torch.mean(estim) + + def _compute_loss_smooth(self, mat): + return torch.sum(torch.abs(mat[:, :, :, :-1] - mat[:, :, :, 1:])) + \ + torch.sum(torch.abs(mat[:, :, :-1, :] - mat[:, :, 1:, :])) + + def get_current_errors(self): + loss_dict = OrderedDict([('g_fake', self._loss_g_fake.data[0]), + ('g_cond', self._loss_g_cond.data[0]), + ('g_mskd_fake', self._loss_g_masked_fake.data[0]), + ('g_mskd_cond', self._loss_g_masked_cond.data[0]), + ('g_cyc', self._loss_g_cyc.data[0]), + ('g_rgb', self._loss_rec_real_img_rgb.data[0]), + ('g_rgb_un', self._loss_g_unmasked_rgb.data[0]), + ('g_rgb_s', self._loss_g_fake_imgs_smooth.data[0]), + ('g_m1', self._loss_g_mask_1.data[0]), + ('g_m2', self._loss_g_mask_2.data[0]), + ('g_m1_s', self._loss_g_mask_1_smooth.data[0]), + ('g_m2_s', self._loss_g_mask_2_smooth.data[0]), + ('g_idt', self._loss_g_idt.data[0]), + ('d_real', self._loss_d_real.data[0]), + ('d_cond', self._loss_d_cond.data[0]), + ('d_fake', self._loss_d_fake.data[0]), + ('d_gp', self._loss_d_gp.data[0])]) + + return loss_dict + + def get_current_scalars(self): + return OrderedDict([('lr_G', self._current_lr_G), ('lr_D', self._current_lr_D)]) + + def get_current_visuals(self): + # visuals return dictionary + visuals = OrderedDict() + + # input visuals + title_input_img = os.path.basename(self._input_real_img_path[0]) + visuals['1_input_img'] = plot_utils.plot_au(self._vis_real_img, self._vis_real_cond, title=title_input_img) + visuals['2_fake_img'] = plot_utils.plot_au(self._vis_fake_img, self._vis_desired_cond) + visuals['3_rec_real_img'] = plot_utils.plot_au(self._vis_rec_real_img, self._vis_real_cond) + visuals['4_fake_img_unmasked'] = self._vis_fake_img_unmasked + visuals['5_fake_img_mask'] = self._vis_fake_img_mask + visuals['6_rec_real_img_mask'] = self._vis_rec_real_img_mask + visuals['7_cyc_img_unmasked'] = self._vis_fake_img_unmasked + # visuals['8_fake_img_mask_sat'] = self._vis_fake_img_mask_saturated + # visuals['9_rec_real_img_mask_sat'] = self._vis_rec_real_img_mask_saturated + visuals['10_batch_real_img'] = self._vis_batch_real_img + visuals['11_batch_fake_img'] = self._vis_batch_fake_img + visuals['12_batch_fake_img_mask'] = self._vis_batch_fake_img_mask + # visuals['11_idt_img'] = self._vis_idt_img + + return visuals + + def save(self, label): + # save networks + self._save_network(self._G, 'G', label) + self._save_network(self._D, 'D', label) + + # save optimizers + self._save_optimizer(self._optimizer_G, 'G', label) + self._save_optimizer(self._optimizer_D, 'D', label) + + def load(self): + load_epoch = self._opt.load_epoch + + # load G + self._load_network(self._G, 'G', load_epoch) + + if self._is_train: + # load D + self._load_network(self._D, 'D', load_epoch) + + # load optimizers + self._load_optimizer(self._optimizer_G, 'G', load_epoch) + self._load_optimizer(self._optimizer_D, 'D', load_epoch) + + def update_learning_rate(self): + # updated learning rate G + lr_decay_G = self._opt.lr_G / self._opt.nepochs_decay + self._current_lr_G -= lr_decay_G + for param_group in self._optimizer_G.param_groups: + param_group['lr'] = self._current_lr_G + print('update G learning rate: %f -> %f' % (self._current_lr_G + lr_decay_G, self._current_lr_G)) + + # update learning rate D + lr_decay_D = self._opt.lr_D / self._opt.nepochs_decay + self._current_lr_D -= lr_decay_D + for param_group in self._optimizer_D.param_groups: + param_group['lr'] = self._current_lr_D + print('update D learning rate: %f -> %f' % (self._current_lr_D + lr_decay_D, self._current_lr_D)) + + def _l1_loss_with_target_gradients(self, input, target): + return torch.sum(torch.abs(input - target)) / input.data.nelement() + + def _do_if_necessary_saturate_mask(self, m, saturate=False): + return torch.clamp(0.55*torch.tanh(3*(m-0.5))+0.5, 0, 1) if saturate else m diff --git a/GANimation/models/models.py b/GANimation/models/models.py new file mode 100644 index 0000000..34e1ae0 --- /dev/null +++ b/GANimation/models/models.py @@ -0,0 +1,132 @@ +import os +import torch +from torch.optim import lr_scheduler + +class ModelsFactory: + def __init__(self): + pass + + @staticmethod + def get_by_name(model_name, *args, **kwargs): + model = None + + if model_name == 'ganimation': + from .ganimation import GANimation + model = GANimation(*args, **kwargs) + else: + raise ValueError("Model %s not recognized." % model_name) + + print("Model %s was created" % model.name) + return model + + +class BaseModel(object): + + def __init__(self, opt): + self._name = 'BaseModel' + + self._opt = opt + self._gpu_ids = opt.gpu_ids + self._is_train = opt.is_train + + self._Tensor = torch.cuda.FloatTensor if self._gpu_ids else torch.Tensor + self._save_dir = os.path.join(opt.checkpoints_dir, opt.name) + + + @property + def name(self): + return self._name + + @property + def is_train(self): + return self._is_train + + def set_input(self, input): + assert False, "set_input not implemented" + + def set_train(self): + assert False, "set_train not implemented" + + def set_eval(self): + assert False, "set_eval not implemented" + + def forward(self, keep_data_for_visuals=False): + assert False, "forward not implemented" + + # used in test time, no backprop + def test(self): + assert False, "test not implemented" + + def get_image_paths(self): + return {} + + def optimize_parameters(self): + assert False, "optimize_parameters not implemented" + + def get_current_visuals(self): + return {} + + def get_current_errors(self): + return {} + + def get_current_scalars(self): + return {} + + def save(self, label): + assert False, "save not implemented" + + def load(self): + assert False, "load not implemented" + + def _save_optimizer(self, optimizer, optimizer_label, epoch_label): + save_filename = 'opt_epoch_%s_id_%s.pth' % (epoch_label, optimizer_label) + save_path = os.path.join(self._save_dir, save_filename) + torch.save(optimizer.state_dict(), save_path) + + def _load_optimizer(self, optimizer, optimizer_label, epoch_label): + load_filename = 'opt_epoch_%s_id_%s.pth' % (epoch_label, optimizer_label) + load_path = os.path.join(self._save_dir, load_filename) + assert os.path.exists( + load_path), 'Weights file not found. Have you trained a model!? We are not providing one' % load_path + + optimizer.load_state_dict(torch.load(load_path)) + print 'loaded optimizer: %s' % load_path + + def _save_network(self, network, network_label, epoch_label): + save_filename = 'net_epoch_%s_id_%s.pth' % (epoch_label, network_label) + save_path = os.path.join(self._save_dir, save_filename) + torch.save(network.state_dict(), save_path) + print 'saved net: %s' % save_path + + def _load_network(self, network, network_label, epoch_label): + load_filename = 'net_epoch_%s_id_%s.pth' % (epoch_label, network_label) + load_path = os.path.join(self._save_dir, load_filename) + assert os.path.exists( + load_path), 'Weights file not found. Have you trained a model!? We are not providing one' % load_path + + network.load_state_dict(torch.load(load_path)) + print 'loaded net: %s' % load_path + + def update_learning_rate(self): + pass + + def print_network(self, network): + num_params = 0 + for param in network.parameters(): + num_params += param.numel() + print(network) + print('Total number of parameters: %d' % num_params) + + def _get_scheduler(self, optimizer, opt): + if opt.lr_policy == 'lambda': + def lambda_rule(epoch): + lr_l = 1.0 - max(0, epoch + 1 + opt.epoch_count - opt.niter) / float(opt.niter_decay + 1) + return lr_l + scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lambda_rule) + elif opt.lr_policy == 'step': + scheduler = lr_scheduler.StepLR(optimizer, step_size=opt.lr_decay_iters, gamma=0.1) + elif opt.lr_policy == 'plateau': + scheduler = lr_scheduler.ReduceLROnPlateau(optimizer, mode='min', factor=0.2, threshold=0.01, patience=5) + else: + return NotImplementedError('learning rate policy [%s] is not implemented', opt.lr_policy) + return scheduler diff --git a/GANimation/networks/__init__.py b/GANimation/networks/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/GANimation/networks/discriminator_wasserstein_gan.py b/GANimation/networks/discriminator_wasserstein_gan.py new file mode 100644 index 0000000..7c10084 --- /dev/null +++ b/GANimation/networks/discriminator_wasserstein_gan.py @@ -0,0 +1,30 @@ +import torch.nn as nn +import numpy as np +from .networks import NetworkBase + +class Discriminator(NetworkBase): + """Discriminator. PatchGAN.""" + def __init__(self, image_size=128, conv_dim=64, c_dim=5, repeat_num=6): + super(Discriminator, self).__init__() + self._name = 'discriminator_wgan' + + layers = [] + layers.append(nn.Conv2d(3, conv_dim, kernel_size=4, stride=2, padding=1)) + layers.append(nn.LeakyReLU(0.01, inplace=True)) + + curr_dim = conv_dim + for i in range(1, repeat_num): + layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1)) + layers.append(nn.LeakyReLU(0.01, inplace=True)) + curr_dim = curr_dim * 2 + + k_size = int(image_size / np.power(2, repeat_num)) + self.main = nn.Sequential(*layers) + self.conv1 = nn.Conv2d(curr_dim, 1, kernel_size=3, stride=1, padding=1, bias=False) + self.conv2 = nn.Conv2d(curr_dim, c_dim, kernel_size=k_size, bias=False) + + def forward(self, x): + h = self.main(x) + out_real = self.conv1(h) + out_aux = self.conv2(h) + return out_real.squeeze(), out_aux.squeeze() \ No newline at end of file diff --git a/GANimation/networks/generator_wasserstein_gan.py b/GANimation/networks/generator_wasserstein_gan.py new file mode 100644 index 0000000..b0d95f9 --- /dev/null +++ b/GANimation/networks/generator_wasserstein_gan.py @@ -0,0 +1,68 @@ +import torch.nn as nn +import numpy as np +from .networks import NetworkBase +import torch + +class Generator(NetworkBase): + """Generator. Encoder-Decoder Architecture.""" + def __init__(self, conv_dim=64, c_dim=5, repeat_num=6): + super(Generator, self).__init__() + self._name = 'generator_wgan' + + layers = [] + layers.append(nn.Conv2d(3+c_dim, conv_dim, kernel_size=7, stride=1, padding=3, bias=False)) + layers.append(nn.InstanceNorm2d(conv_dim, affine=True)) + layers.append(nn.ReLU(inplace=True)) + + # Down-Sampling + curr_dim = conv_dim + for i in range(2): + layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1, bias=False)) + layers.append(nn.InstanceNorm2d(curr_dim*2, affine=True)) + layers.append(nn.ReLU(inplace=True)) + curr_dim = curr_dim * 2 + + # Bottleneck + for i in range(repeat_num): + layers.append(ResidualBlock(dim_in=curr_dim, dim_out=curr_dim)) + + # Up-Sampling + for i in range(2): + layers.append(nn.ConvTranspose2d(curr_dim, curr_dim//2, kernel_size=4, stride=2, padding=1, bias=False)) + layers.append(nn.InstanceNorm2d(curr_dim//2, affine=True)) + layers.append(nn.ReLU(inplace=True)) + curr_dim = curr_dim // 2 + + self.main = nn.Sequential(*layers) + + layers = [] + layers.append(nn.Conv2d(curr_dim, 3, kernel_size=7, stride=1, padding=3, bias=False)) + layers.append(nn.Tanh()) + self.img_reg = nn.Sequential(*layers) + + layers = [] + layers.append(nn.Conv2d(curr_dim, 1, kernel_size=7, stride=1, padding=3, bias=False)) + layers.append(nn.Sigmoid()) + self.attetion_reg = nn.Sequential(*layers) + + def forward(self, x, c): + # replicate spatially and concatenate domain information + c = c.unsqueeze(2).unsqueeze(3) + c = c.expand(c.size(0), c.size(1), x.size(2), x.size(3)) + x = torch.cat([x, c], dim=1) + features = self.main(x) + return self.img_reg(features), self.attetion_reg(features) + +class ResidualBlock(nn.Module): + """Residual Block.""" + def __init__(self, dim_in, dim_out): + super(ResidualBlock, self).__init__() + self.main = nn.Sequential( + nn.Conv2d(dim_in, dim_out, kernel_size=3, stride=1, padding=1, bias=False), + nn.InstanceNorm2d(dim_out, affine=True), + nn.ReLU(inplace=True), + nn.Conv2d(dim_out, dim_out, kernel_size=3, stride=1, padding=1, bias=False), + nn.InstanceNorm2d(dim_out, affine=True)) + + def forward(self, x): + return x + self.main(x) \ No newline at end of file diff --git a/GANimation/networks/networks.py b/GANimation/networks/networks.py new file mode 100644 index 0000000..c2fb9ed --- /dev/null +++ b/GANimation/networks/networks.py @@ -0,0 +1,57 @@ +import torch.nn as nn +import functools + +class NetworksFactory: + def __init__(self): + pass + + @staticmethod + def get_by_name(network_name, *args, **kwargs): + + if network_name == 'generator_wasserstein_gan': + from .generator_wasserstein_gan import Generator + network = Generator(*args, **kwargs) + elif network_name == 'discriminator_wasserstein_gan': + from .discriminator_wasserstein_gan import Discriminator + network = Discriminator(*args, **kwargs) + else: + raise ValueError("Network %s not recognized." % network_name) + + print "Network %s was created" % network_name + + return network + + +class NetworkBase(nn.Module): + def __init__(self): + super(NetworkBase, self).__init__() + self._name = 'BaseNetwork' + + @property + def name(self): + return self._name + + def init_weights(self): + self.apply(self._weights_init_fn) + + def _weights_init_fn(self, m): + classname = m.__class__.__name__ + if classname.find('Conv') != -1: + m.weight.data.normal_(0.0, 0.02) + if hasattr(m.bias, 'data'): + m.bias.data.fill_(0) + elif classname.find('BatchNorm2d') != -1: + m.weight.data.normal_(1.0, 0.02) + m.bias.data.fill_(0) + + def _get_norm_layer(self, norm_type='batch'): + if norm_type == 'batch': + norm_layer = functools.partial(nn.BatchNorm2d, affine=True) + elif norm_type == 'instance': + norm_layer = functools.partial(nn.InstanceNorm2d, affine=False) + elif norm_type =='batchnorm2d': + norm_layer = nn.BatchNorm2d + else: + raise NotImplementedError('normalization layer [%s] is not found' % norm_type) + + return norm_layer diff --git a/GANimation/options/__init__.py b/GANimation/options/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/GANimation/options/base_options.py b/GANimation/options/base_options.py new file mode 100644 index 0000000..a785e35 --- /dev/null +++ b/GANimation/options/base_options.py @@ -0,0 +1,108 @@ +import argparse +import os +from utils import util +import torch + +class BaseOptions(): + def __init__(self): + self._parser = argparse.ArgumentParser() + self._initialized = False + + def initialize(self): + self._parser.add_argument('--data_dir', type=str, help='path to dataset') + self._parser.add_argument('--train_ids_file', type=str, default='train_ids.csv', help='file containing train ids') + self._parser.add_argument('--test_ids_file', type=str, default='test_ids.csv', help='file containing test ids') + self._parser.add_argument('--images_folder', type=str, default='imgs', help='images folder') + self._parser.add_argument('--aus_file', type=str, default='aus_openface.pkl', help='file containing samples aus') + + self._parser.add_argument('--load_epoch', type=int, default=-1, help='which epoch to load? set to -1 to use latest cached model') + self._parser.add_argument('--batch_size', type=int, default=4, help='input batch size') + self._parser.add_argument('--image_size', type=int, default=128, help='input image size') + self._parser.add_argument('--cond_nc', type=int, default=17, help='# of conditions') + self._parser.add_argument('--gpu_ids', type=str, default='0', help='gpu ids: e.g. 0 0,1,2, 0,2. use -1 for CPU') + self._parser.add_argument('--name', type=str, default='experiment_1', help='name of the experiment. It decides where to store samples and models') + self._parser.add_argument('--dataset_mode', type=str, default='aus', help='chooses dataset to be used') + self._parser.add_argument('--model', type=str, default='ganimation', help='model to run[au_net_model]') + self._parser.add_argument('--n_threads_test', default=1, type=int, help='# threads for loading data') + self._parser.add_argument('--checkpoints_dir', type=str, default='./checkpoints', help='models are saved here') + self._parser.add_argument('--serial_batches', action='store_true', help='if true, takes images in order to make batches, otherwise takes them randomly') + self._parser.add_argument('--do_saturate_mask', action="store_true", default=False, help='do use mask_fake for mask_cyc') + + + + + self._initialized = True + + def parse(self): + if not self._initialized: + self.initialize() + self._opt = self._parser.parse_args() + + # set is train or set + self._opt.is_train = self.is_train + + # set and check load_epoch + self._set_and_check_load_epoch() + + # get and set gpus + self._get_set_gpus() + + args = vars(self._opt) + + # print in terminal args + self._print(args) + + # save args to file + self._save(args) + + return self._opt + + def _set_and_check_load_epoch(self): + models_dir = os.path.join(self._opt.checkpoints_dir, self._opt.name) + if os.path.exists(models_dir): + if self._opt.load_epoch == -1: + load_epoch = 0 + for file in os.listdir(models_dir): + if file.startswith("net_epoch_"): + load_epoch = max(load_epoch, int(file.split('_')[2])) + self._opt.load_epoch = load_epoch + else: + found = False + for file in os.listdir(models_dir): + if file.startswith("net_epoch_"): + found = int(file.split('_')[2]) == self._opt.load_epoch + if found: break + assert found, 'Model for epoch %i not found' % self._opt.load_epoch + else: + assert self._opt.load_epoch < 1, 'Model for epoch %i not found' % self._opt.load_epoch + self._opt.load_epoch = 0 + + def _get_set_gpus(self): + # get gpu ids + str_ids = self._opt.gpu_ids.split(',') + self._opt.gpu_ids = [] + for str_id in str_ids: + id = int(str_id) + if id >= 0: + self._opt.gpu_ids.append(id) + + # set gpu ids + if len(self._opt.gpu_ids) > 0: + torch.cuda.set_device(self._opt.gpu_ids[0]) + + def _print(self, args): + print('------------ Options -------------') + for k, v in sorted(args.items()): + print('%s: %s' % (str(k), str(v))) + print('-------------- End ----------------') + + def _save(self, args): + expr_dir = os.path.join(self._opt.checkpoints_dir, self._opt.name) + print(expr_dir) + util.mkdirs(expr_dir) + file_name = os.path.join(expr_dir, 'opt_%s.txt' % ('train' if self.is_train else 'test')) + with open(file_name, 'wt') as opt_file: + opt_file.write('------------ Options -------------\n') + for k, v in sorted(args.items()): + opt_file.write('%s: %s\n' % (str(k), str(v))) + opt_file.write('-------------- End ----------------\n') diff --git a/GANimation/options/test_options.py b/GANimation/options/test_options.py new file mode 100644 index 0000000..259bfc1 --- /dev/null +++ b/GANimation/options/test_options.py @@ -0,0 +1,9 @@ +from .base_options import BaseOptions + + +class TestOptions(BaseOptions): + def initialize(self): + BaseOptions.initialize(self) + self._parser.add_argument('--input_path', type=str, help='path to image') + self._parser.add_argument('--output_dir', type=str, default='./output', help='output path') + self.is_train = False diff --git a/GANimation/options/train_options.py b/GANimation/options/train_options.py new file mode 100644 index 0000000..c3c923c --- /dev/null +++ b/GANimation/options/train_options.py @@ -0,0 +1,31 @@ +from .base_options import BaseOptions + + +class TrainOptions(BaseOptions): + def initialize(self): + BaseOptions.initialize(self) + self._parser.add_argument('--n_threads_train', default=4, type=int, help='# threads for loading data') + self._parser.add_argument('--num_iters_validate', default=1, type=int, help='# batches to use when validating') + self._parser.add_argument('--print_freq_s', type=int, default=60, help='frequency of showing training results on console') + self._parser.add_argument('--display_freq_s', type=int, default=300, help='frequency [s] of showing training results on screen') + self._parser.add_argument('--save_latest_freq_s', type=int, default=3600, help='frequency of saving the latest results') + + self._parser.add_argument('--nepochs_no_decay', type=int, default=20, help='# of epochs at starting learning rate') + self._parser.add_argument('--nepochs_decay', type=int, default=10, help='# of epochs to linearly decay learning rate to zero') + + self._parser.add_argument('--train_G_every_n_iterations', type=int, default=5, help='train G every n interations') + self._parser.add_argument('--poses_g_sigma', type=float, default=0.06, help='initial learning rate for adam') + self._parser.add_argument('--lr_G', type=float, default=0.0001, help='initial learning rate for G adam') + self._parser.add_argument('--G_adam_b1', type=float, default=0.5, help='beta1 for G adam') + self._parser.add_argument('--G_adam_b2', type=float, default=0.999, help='beta2 for G adam') + self._parser.add_argument('--lr_D', type=float, default=0.0001, help='initial learning rate for D adam') + self._parser.add_argument('--D_adam_b1', type=float, default=0.5, help='beta1 for D adam') + self._parser.add_argument('--D_adam_b2', type=float, default=0.999, help='beta2 for D adam') + self._parser.add_argument('--lambda_D_prob', type=float, default=1, help='lambda for real/fake discriminator loss') + self._parser.add_argument('--lambda_D_cond', type=float, default=4000, help='lambda for condition discriminator loss') + self._parser.add_argument('--lambda_cyc', type=float, default=10, help='lambda cycle loss') + self._parser.add_argument('--lambda_mask', type=float, default=0.1, help='lambda mask loss') + self._parser.add_argument('--lambda_D_gp', type=float, default=10, help='lambda gradient penalty loss') + self._parser.add_argument('--lambda_mask_smooth', type=float, default=1e-5, help='lambda mask smooth loss') + + self.is_train = True diff --git a/GANimation/requirements.txt b/GANimation/requirements.txt new file mode 100644 index 0000000..b40caf1 --- /dev/null +++ b/GANimation/requirements.txt @@ -0,0 +1,6 @@ +numpy +matplotlib +tqdm +dlib +face_recognition +opencv-contrib-python diff --git a/GANimation/sample_dataset/aus_openface.pkl b/GANimation/sample_dataset/aus_openface.pkl new file mode 100644 index 0000000..a3d340a Binary files /dev/null and b/GANimation/sample_dataset/aus_openface.pkl differ diff --git a/GANimation/sample_dataset/imgs/N_0000000356_00190.jpg b/GANimation/sample_dataset/imgs/N_0000000356_00190.jpg new file mode 100644 index 0000000..7c2ef5c Binary files /dev/null and b/GANimation/sample_dataset/imgs/N_0000000356_00190.jpg differ diff --git a/GANimation/sample_dataset/imgs/N_0000000437_00540.jpg b/GANimation/sample_dataset/imgs/N_0000000437_00540.jpg new file mode 100644 index 0000000..52cdcf1 Binary files /dev/null and b/GANimation/sample_dataset/imgs/N_0000000437_00540.jpg differ diff --git a/GANimation/sample_dataset/imgs/N_0000001507_00202.jpg b/GANimation/sample_dataset/imgs/N_0000001507_00202.jpg new file mode 100644 index 0000000..a93e268 Binary files /dev/null and b/GANimation/sample_dataset/imgs/N_0000001507_00202.jpg differ diff --git a/GANimation/sample_dataset/imgs/N_0000001939_00054.jpg b/GANimation/sample_dataset/imgs/N_0000001939_00054.jpg new file mode 100644 index 0000000..9049bd6 Binary files /dev/null and b/GANimation/sample_dataset/imgs/N_0000001939_00054.jpg differ diff --git a/GANimation/sample_dataset/test_ids.csv b/GANimation/sample_dataset/test_ids.csv new file mode 100644 index 0000000..6590ab2 --- /dev/null +++ b/GANimation/sample_dataset/test_ids.csv @@ -0,0 +1,2 @@ +N_0000001507_00202.jpg +N_0000001939_00054.jpg diff --git a/GANimation/sample_dataset/train_ids.csv b/GANimation/sample_dataset/train_ids.csv new file mode 100644 index 0000000..b47b7c3 --- /dev/null +++ b/GANimation/sample_dataset/train_ids.csv @@ -0,0 +1,2 @@ +N_0000000437_00540.jpg +N_0000000356_00190.jpg diff --git a/GANimation/test.py b/GANimation/test.py new file mode 100644 index 0000000..9ec0c9b --- /dev/null +++ b/GANimation/test.py @@ -0,0 +1,74 @@ +import os +import argparse +import glob +import cv2 +from utils import face_utils +from utils import cv_utils +import face_recognition +from PIL import Image +import torchvision.transforms as transforms +import torch +import pickle +import numpy as np +from models.models import ModelsFactory +from options.test_options import TestOptions + +class MorphFacesInTheWild: + def __init__(self, opt): + self._opt = opt + self._model = ModelsFactory.get_by_name(self._opt.model, self._opt) + self._model.set_eval() + self._transform = transforms.Compose([transforms.ToTensor(), + transforms.Normalize(mean=[0.5, 0.5, 0.5], + std=[0.5, 0.5, 0.5]) + ]) + + def morph_file(self, img_path, expresion): + img = cv_utils.read_cv2_img(img_path) + morphed_img = self._img_morph(img, expresion) + output_name = '%s_out.png' % os.path.basename(img_path) + self._save_img(morphed_img, output_name) + + def _img_morph(self, img, expresion): + bbs = face_recognition.face_locations(img) + if len(bbs) > 0: + y, right, bottom, x = bbs[0] + bb = x, y, (right - x), (bottom - y) + face = face_utils.crop_face_with_bb(img, bb) + face = face_utils.resize_face(face) + else: + face = face_utils.resize_face(img) + + morphed_face = self._morph_face(face, expresion) + + return morphed_face + + def _morph_face(self, face, expresion): + face = torch.unsqueeze(self._transform(Image.fromarray(face)), 0) + expresion = torch.unsqueeze(torch.from_numpy(expresion/5.0), 0) + test_batch = {'real_img': face, 'real_cond': expresion, 'desired_cond': expresion, 'sample_id': torch.FloatTensor(), 'real_img_path': []} + self._model.set_input(test_batch) + imgs, _ = self._model.forward(keep_data_for_visuals=False, return_estimates=True) + return imgs['concat'] + + def _save_img(self, img, filename): + filepath = os.path.join(self._opt.output_dir, filename) + img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR) + cv2.imwrite(filepath, img) + + +def main(): + opt = TestOptions().parse() + if not os.path.isdir(opt.output_dir): + os.makedirs(opt.output_dir) + + morph = MorphFacesInTheWild(opt) + + image_path = opt.input_path + expression = np.random.uniform(0, 1, opt.cond_nc) + morph.morph_file(image_path, expression) + + + +if __name__ == '__main__': + main() diff --git a/GANimation/train.py b/GANimation/train.py new file mode 100644 index 0000000..2a4602f --- /dev/null +++ b/GANimation/train.py @@ -0,0 +1,141 @@ +import time +from options.train_options import TrainOptions +from data.custom_dataset_data_loader import CustomDatasetDataLoader +from models.models import ModelsFactory +from utils.tb_visualizer import TBVisualizer +from collections import OrderedDict +import os + + +class Train: + def __init__(self): + self._opt = TrainOptions().parse() + data_loader_train = CustomDatasetDataLoader(self._opt, is_for_train=True) + data_loader_test = CustomDatasetDataLoader(self._opt, is_for_train=False) + + self._dataset_train = data_loader_train.load_data() + self._dataset_test = data_loader_test.load_data() + + self._dataset_train_size = len(data_loader_train) + self._dataset_test_size = len(data_loader_test) + print('#train images = %d' % self._dataset_train_size) + print('#test images = %d' % self._dataset_test_size) + + self._model = ModelsFactory.get_by_name(self._opt.model, self._opt) + self._tb_visualizer = TBVisualizer(self._opt) + + self._train() + + def _train(self): + self._total_steps = self._opt.load_epoch * self._dataset_train_size + self._iters_per_epoch = self._dataset_train_size / self._opt.batch_size + self._last_display_time = None + self._last_save_latest_time = None + self._last_print_time = time.time() + + for i_epoch in range(self._opt.load_epoch + 1, self._opt.nepochs_no_decay + self._opt.nepochs_decay + 1): + epoch_start_time = time.time() + + # train epoch + self._train_epoch(i_epoch) + + # save model + print('saving the model at the end of epoch %d, iters %d' % (i_epoch, self._total_steps)) + self._model.save(i_epoch) + + # print epoch info + time_epoch = time.time() - epoch_start_time + print('End of epoch %d / %d \t Time Taken: %d sec (%d min or %d h)' % + (i_epoch, self._opt.nepochs_no_decay + self._opt.nepochs_decay, time_epoch, + time_epoch / 60, time_epoch / 3600)) + + # update learning rate + if i_epoch > self._opt.nepochs_no_decay: + self._model.update_learning_rate() + + def _train_epoch(self, i_epoch): + epoch_iter = 0 + self._model.set_train() + for i_train_batch, train_batch in enumerate(self._dataset_train): + iter_start_time = time.time() + + # display flags + do_visuals = self._last_display_time is None or time.time() - self._last_display_time > self._opt.display_freq_s + do_print_terminal = time.time() - self._last_print_time > self._opt.print_freq_s or do_visuals + + # train model + self._model.set_input(train_batch) + train_generator = ((i_train_batch+1) % self._opt.train_G_every_n_iterations == 0) or do_visuals + self._model.optimize_parameters(keep_data_for_visuals=do_visuals, train_generator=train_generator) + + # update epoch info + self._total_steps += self._opt.batch_size + epoch_iter += self._opt.batch_size + + # display terminal + if do_print_terminal: + self._display_terminal(iter_start_time, i_epoch, i_train_batch, do_visuals) + self._last_print_time = time.time() + + # display visualizer + if do_visuals: + self._display_visualizer_train(self._total_steps) + self._display_visualizer_val(i_epoch, self._total_steps) + self._last_display_time = time.time() + + # save model + if self._last_save_latest_time is None or time.time() - self._last_save_latest_time > self._opt.save_latest_freq_s: + print('saving the latest model (epoch %d, total_steps %d)' % (i_epoch, self._total_steps)) + self._model.save(i_epoch) + self._last_save_latest_time = time.time() + + def _display_terminal(self, iter_start_time, i_epoch, i_train_batch, visuals_flag): + errors = self._model.get_current_errors() + t = (time.time() - iter_start_time) / self._opt.batch_size + self._tb_visualizer.print_current_train_errors(i_epoch, i_train_batch, self._iters_per_epoch, errors, t, visuals_flag) + + def _display_visualizer_train(self, total_steps): + self._tb_visualizer.display_current_results(self._model.get_current_visuals(), total_steps, is_train=True) + self._tb_visualizer.plot_scalars(self._model.get_current_errors(), total_steps, is_train=True) + self._tb_visualizer.plot_scalars(self._model.get_current_scalars(), total_steps, is_train=True) + + def _display_visualizer_val(self, i_epoch, total_steps): + val_start_time = time.time() + + # set model to eval + self._model.set_eval() + + # evaluate self._opt.num_iters_validate epochs + val_errors = OrderedDict() + for i_val_batch, val_batch in enumerate(self._dataset_test): + if i_val_batch == self._opt.num_iters_validate: + break + + # evaluate model + self._model.set_input(val_batch) + self._model.forward(keep_data_for_visuals=(i_val_batch == 0)) + errors = self._model.get_current_errors() + + # store current batch errors + for k, v in errors.iteritems(): + if k in val_errors: + val_errors[k] += v + else: + val_errors[k] = v + + # normalize errors + for k in val_errors.iterkeys(): + val_errors[k] /= self._opt.num_iters_validate + + # visualize + t = (time.time() - val_start_time) + self._tb_visualizer.print_current_validate_errors(i_epoch, val_errors, t) + self._tb_visualizer.plot_scalars(val_errors, total_steps, is_train=False) + self._tb_visualizer.display_current_results(self._model.get_current_visuals(), total_steps, is_train=False) + + # set model back to train + self._model.set_train() + + +if __name__ == "__main__": + Train() diff --git a/GANimation/utils/__init__.py b/GANimation/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/GANimation/utils/cv_utils.py b/GANimation/utils/cv_utils.py new file mode 100644 index 0000000..f974352 --- /dev/null +++ b/GANimation/utils/cv_utils.py @@ -0,0 +1,54 @@ +import cv2 +from matplotlib import pyplot as plt +import numpy as np + +def read_cv2_img(path): + ''' + Read color images + :param path: Path to image + :return: Only returns color images + ''' + img = cv2.imread(path, -1) + + if img is not None: + if len(img.shape) != 3: + return None + + img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) + + return img + +def show_cv2_img(img, title='img'): + ''' + Display cv2 image + :param img: cv::mat + :param title: title + :return: None + ''' + plt.imshow(img) + plt.title(title) + plt.axis('off') + plt.show() + +def show_images_row(imgs, titles, rows=1): + ''' + Display grid of cv2 images image + :param img: list [cv::mat] + :param title: titles + :return: None + ''' + assert ((titles is None) or (len(imgs) == len(titles))) + num_images = len(imgs) + + if titles is None: + titles = ['Image (%d)' % i for i in range(1, num_images + 1)] + + fig = plt.figure() + for n, (image, title) in enumerate(zip(imgs, titles)): + ax = fig.add_subplot(rows, np.ceil(num_images / float(rows)), n + 1) + if image.ndim == 2: + plt.gray() + plt.imshow(image) + ax.set_title(title) + plt.axis('off') + plt.show() \ No newline at end of file diff --git a/GANimation/utils/face_utils.py b/GANimation/utils/face_utils.py new file mode 100644 index 0000000..ce17e35 --- /dev/null +++ b/GANimation/utils/face_utils.py @@ -0,0 +1,71 @@ +import face_recognition +import cv2 +import numpy as np +import skimage +import skimage.transform +import warnings + +def detect_faces(img): + ''' + Detect faces in image + :param img: cv::mat HxWx3 RGB + :return: yield 4 + ''' + # detect faces + bbs = face_recognition.face_locations(img) + + for y, right, bottom, x in bbs: + # Scale back up face bb + yield x, y, (right - x), (bottom - y) + +def detect_biggest_face(img): + ''' + Detect biggest face in image + :param img: cv::mat HxWx3 RGB + :return: 4 + ''' + # detect faces + bbs = face_recognition.face_locations(img) + + max_area = float('-inf') + max_area_i = 0 + for i, (y, right, bottom, x) in enumerate(bbs): + area = (right - x) * (bottom - y) + if max_area < area: + max_area = area + max_area_i = i + + if max_area != float('-inf'): + y, right, bottom, x = bbs[max_area_i] + return x, y, (right - x), (bottom - y) + + return None + +def crop_face_with_bb(img, bb): + ''' + Crop face in image given bb + :param img: cv::mat HxWx3 + :param bb: 4 () + :return: HxWx3 + ''' + x, y, w, h = bb + return img[y:y+h, x:x+w, :] + +def place_face(img, face, bb): + x, y, w, h = bb + face = resize_face(face, size=(w, h)) + img[y:y+h, x:x+w] = face + return img + +def resize_face(face_img, size=(128, 128)): + ''' + Resize face to a given size + :param face_img: cv::mat HxWx3 + :param size: new H and W (size x size). 128 by default. + :return: cv::mat size x size x 3 + ''' + return cv2.resize(face_img, size) + +def detect_landmarks(face_img): + landmakrs = face_recognition.face_landmarks(face_img) + return landmakrs[0] if len(landmakrs) > 0 else None diff --git a/GANimation/utils/plots.py b/GANimation/utils/plots.py new file mode 100644 index 0000000..99bd1fa --- /dev/null +++ b/GANimation/utils/plots.py @@ -0,0 +1,67 @@ +from __future__ import print_function +import numpy as np +import matplotlib.pyplot as plt + +def plot_au(img, aus, title=None): + ''' + Plot action units + :param img: HxWx3 + :param aus: N + :return: + ''' + fig = plt.figure() + ax = fig.add_subplot(1, 1, 1) + ax.axis('off') + fig.subplots_adjust(0, 0, 0.8, 1) # get rid of margins + + # display img + ax.imshow(img) + + if len(aus) == 11: + au_ids = ['1','2','4','5','6','9','12','17','20','25','26'] + x = 0.1 + y = 0.39 + i = 0 + for au, id in zip(aus, au_ids): + if id == '9': + x = 0.5 + y -= .15 + i = 0 + elif id == '12': + x = 0.1 + y -= .15 + i = 0 + + ax.text(x + i * 0.2, y, id, horizontalalignment='center', verticalalignment='center', + transform=ax.transAxes, color='r', fontsize=20) + ax.text((x-0.001)+i*0.2, y-0.07, au, horizontalalignment='center', verticalalignment='center', + transform=ax.transAxes, color='b', fontsize=20) + i+=1 + + else: + au_ids = ['1', '2', '4', '5', '6', '7', '9', '10', '12', '14', '15', '17', '20', '23', '25', '26', '45'] + x = 0.1 + y = 0.39 + i = 0 + for au, id in zip(aus, au_ids): + if id == '9' or id == '20': + x = 0.1 + y -= .15 + i = 0 + + ax.text(x + i * 0.2, y, id, horizontalalignment='center', verticalalignment='center', + transform=ax.transAxes, color='r', fontsize=20) + ax.text((x-0.001)+i*0.2, y-0.07, au, horizontalalignment='center', verticalalignment='center', + transform=ax.transAxes, color='b', fontsize=20) + i+=1 + + if title is not None: + ax.text(0.5, 0.95, title, horizontalalignment='center', verticalalignment='center', + transform=ax.transAxes, color='r', fontsize=20) + + fig.canvas.draw() + data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='') + data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,)) + plt.close(fig) + + return data \ No newline at end of file diff --git a/GANimation/utils/tb_visualizer.py b/GANimation/utils/tb_visualizer.py new file mode 100644 index 0000000..6e758b9 --- /dev/null +++ b/GANimation/utils/tb_visualizer.py @@ -0,0 +1,66 @@ +import numpy as np +import os +import time +from . import util +from tensorboardX import SummaryWriter + + +class TBVisualizer: + def __init__(self, opt): + self._opt = opt + self._save_path = os.path.join(opt.checkpoints_dir, opt.name) + + self._log_path = os.path.join(self._save_path, 'loss_log2.txt') + self._tb_path = os.path.join(self._save_path, 'summary.json') + self._writer = SummaryWriter(self._save_path) + + with open(self._log_path, "a") as log_file: + now = time.strftime("%c") + log_file.write('================ Training Loss (%s) ================\n' % now) + + def __del__(self): + self._writer.close() + + def display_current_results(self, visuals, it, is_train, save_visuals=False): + for label, image_numpy in visuals.items(): + sum_name = '{}/{}'.format('Train' if is_train else 'Test', label) + self._writer.add_image(sum_name, image_numpy, it) + + if save_visuals: + util.save_image(image_numpy, + os.path.join(self._opt.checkpoints_dir, self._opt.name, + 'event_imgs', sum_name, '%08d.png' % it)) + + self._writer.export_scalars_to_json(self._tb_path) + + def plot_scalars(self, scalars, it, is_train): + for label, scalar in scalars.items(): + sum_name = '{}/{}'.format('Train' if is_train else 'Test', label) + self._writer.add_scalar(sum_name, scalar, it) + + def print_current_train_errors(self, epoch, i, iters_per_epoch, errors, t, visuals_were_stored): + log_time = time.strftime("[%d/%m/%Y %H:%M:%S]") + visuals_info = "v" if visuals_were_stored else "" + message = '%s (T%s, epoch: %d, it: %d/%d, t/smpl: %.3fs) ' % (log_time, visuals_info, epoch, i, iters_per_epoch, t) + for k, v in errors.items(): + message += '%s:%.3f ' % (k, v) + + print(message) + with open(self._log_path, "a") as log_file: + log_file.write('%s\n' % message) + + def print_current_validate_errors(self, epoch, errors, t): + log_time = time.strftime("[%d/%m/%Y %H:%M:%S]") + message = '%s (V, epoch: %d, time_to_val: %ds) ' % (log_time, epoch, t) + for k, v in errors.items(): + message += '%s:%.3f ' % (k, v) + + print(message) + with open(self._log_path, "a") as log_file: + log_file.write('%s\n' % message) + + def save_images(self, visuals): + for label, image_numpy in visuals.items(): + image_name = '%s.png' % label + save_path = os.path.join(self._save_path, "samples", image_name) + util.save_image(image_numpy, save_path) \ No newline at end of file diff --git a/GANimation/utils/util.py b/GANimation/utils/util.py new file mode 100644 index 0000000..5a3a0ae --- /dev/null +++ b/GANimation/utils/util.py @@ -0,0 +1,53 @@ +from __future__ import print_function +from PIL import Image +import numpy as np +import os +import torchvision +import math + + +def tensor2im(img, imtype=np.uint8, unnormalize=True, idx=0, nrows=None): + # select a sample or create grid if img is a batch + if len(img.shape) == 4: + nrows = nrows if nrows is not None else int(math.sqrt(img.size(0))) + img = img[idx] if idx >= 0 else torchvision.utils.make_grid(img, nrows) + + img = img.cpu().float() + if unnormalize: + mean = [0.5, 0.5, 0.5] + std = [0.5, 0.5, 0.5] + + for i, m, s in zip(img, mean, std): + i.mul_(s).add_(m) + + image_numpy = img.numpy() + image_numpy_t = np.transpose(image_numpy, (1, 2, 0)) + image_numpy_t = image_numpy_t*254.0 + + return image_numpy_t.astype(imtype) + +def tensor2maskim(mask, imtype=np.uint8, idx=0, nrows=1): + im = tensor2im(mask, imtype=imtype, idx=idx, unnormalize=False, nrows=nrows) + if im.shape[2] == 1: + im = np.repeat(im, 3, axis=-1) + return im + +def mkdirs(paths): + if isinstance(paths, list) and not isinstance(paths, str): + for path in paths: + mkdir(path) + else: + mkdir(paths) + +def mkdir(path): + if not os.path.exists(path): + os.makedirs(path) + +def save_image(image_numpy, image_path): + mkdir(os.path.dirname(image_path)) + image_pil = Image.fromarray(image_numpy) + image_pil.save(image_path) + +def save_str_data(data, path): + mkdir(os.path.dirname(path)) + np.savetxt(path, data, delimiter=",", fmt="%s") \ No newline at end of file diff --git a/ganimation/.gitignore b/ganimation/.gitignore new file mode 100644 index 0000000..763537e --- /dev/null +++ b/ganimation/.gitignore @@ -0,0 +1,6 @@ +data/* +experiments/* +__pycache__ +.vscode +animations/eric_andre/pretrained_models/* +animations/eric_andre/results/* \ No newline at end of file diff --git a/ganimation/README.md b/ganimation/README.md new file mode 100644 index 0000000..9ce3635 --- /dev/null +++ b/ganimation/README.md @@ -0,0 +1,102 @@ +# GANimation + +This repository contains an implementation of [GANimation](https://arxiv.org/pdf/1807.09251.pdf) by Pumarola et al. based on [StarGAN code](https://github.com/yunjey/stargan) by @yunjey. With this model they are able to modify in a continuous way facial expressions of single images. + +[Pretrained models](https://www.dropbox.com/sh/108g19dk3gt1l7l/AAB4OJHHrMHlBDbNK8aFQVZSa?dl=0) and the [preprocessed CelebA dataset](https://www.dropbox.com/s/payjdk08292csra/celeba.zip?dl=0) are provided to facilitate the use of this model as well as the process for preparing other datasets for training this model. + +

+ +

+ +

+ +

+ + +## Setup + +#### Conda environment +Create your conda environment by just running the following command: +`conda env create -f environment.yml` + + +## Datasets + +#### CelebA preprocessed dataset +Download and unzip the *CelebA* preprocessed dataset uploaded to [this link](https://www.dropbox.com/s/payjdk08292csra/celeba.zip?dl=0) extracted from [MMLAB](http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html). Here you can find a folder containing the aligned and resized 128x128 images as well as a _txt_ file containing their respective Action Units vectors computed using [OpenFace](https://github.com/TadasBaltrusaitis/OpenFace). By default, this code assumes that you have these two elements in _`./data/celeba/`_. + +#### Use your own dataset +If you want to use other datasets you will need to detect and crop bounding boxes around the face of each image, compute their corresponding Action Unit vectors and resize them to 128x128px. + +You can perform all these steps using [OpenFace](https://github.com/TadasBaltrusaitis/OpenFace). First you will need to setup the project. They provide guides for [linux](https://github.com/TadasBaltrusaitis/OpenFace/wiki/Unix-Installation) and [windows](https://github.com/TadasBaltrusaitis/OpenFace/wiki/Windows-Installation). Once the models are compiled, read their [Action Unit wiki](https://github.com/TadasBaltrusaitis/OpenFace/wiki/Action-Units) and their [documentation](https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments) on these models to find out which is the command that you need to execute. + +In my case the command was the following: `./build/bin/FaceLandmarkImg -fdir datasets/my-dataset/ -out_dir processed/my-processed-dataset/ -aus -simalign -au_static -nobadaligned -simsize 128 -format_aligned jpg -nomask` + +After computing these Action Units, depending on the command that you have used, you will obtain different output formats. With the command that I used, I obtained a _csv_ file for each image containing its corresponding Action Units vector among extra information, a folder for each image containing the resized and cropped image and a _txt_ file with extra details about each image. You can find in _openface_utils_ folder the code that I used to extract all the Action Unit information in a _txt_ file and to group all the images into a single folder. + +After having the Action Unit _txt_ file and the image folder you can move them to the directory of this project. By default, this code assumes that you have these two elements in _`./data/celeba/`_. + +## Generate animations +Pretrained models can be downloaded from [this](https://www.dropbox.com/sh/108g19dk3gt1l7l/AAB4OJHHrMHlBDbNK8aFQVZSa?dl=0) link. This folder contains the weights of both models (the Generator and the Discriminator) after training the model for 37 epochs. + +By running `python main.py --mode animation` the default animation will be executed. There are two different types of animations already implemented which can be selected with the parameter 'animation_mode'. It is presuposed that the following folders are present: + +- **attribute_images**: images from which the Action Units that we want to use for the animation were computed. +- **images_to_animate**: images that we want to animate. +- **pretrained_models**: pretrained models (only the generator is needed, you can download it from [here](https://www.dropbox.com/home/data/pretrained_models) +- **results**: folder where the resulting images will be stored. +- **attributes.txt**: file with the action units from 'attribute_images' computed. + +The two options already implemented are the following: +- **animate_image**: applies the expressions from 'attributes.txt' to the images in 'images_to_animate'. +- **animate_random_batch**: applies the expressions from 'attributes.txt' to random batches of images from the training dataset. + + +## Train the model + +#### Parameters + +You can either modify these parameters in `main.py` or by calling them as command line arguments. + + +##### Lambdas + +- *lambda_cls*: classification lambda. +- *lambda_rec*: lambda for the cycle consistency loss. +- *lambda_gp*: gradient penalty lambda. +- *lambda_sat*: lambda for attention saturation loss. +- *lambda_smooth*: lambda for attention smoothing loss. + +##### Training parameters + +- *c_dim*: number of Action Units to use to train the model. +- *batch_size* +- *num_epochs* +- *num_epochs_decay*: number of epochs to start decaying the learning rate. +- *g_lr*: generator's learning rate. +- *d_lr*: discriminator's learning rate. + +##### Pretrained models parameters +The weights are stored in the following format: `--.ckpt` where G and D represent the Generator and the Discriminator respectively. We save the state of thoptimizers in the same format and extension but add '_optim'. + +- *resume_iters*: iteration numbre from which we want to start the training. Note that we will need to have a saved model corresponding to that exact iteration number. +- *first_epoch*: initial epoch for when we train from pretrained models. + +##### Miscellaneous: +- *mode*: train/test. +- *image_dir*: path to your image folder. +- *attr_path*: path to your attributes _txt_ folder. +- *outputs_dir*: name for the output folder. + +#### Virtual +- *use_virtual*: this flag activates the use of _cycle consistency loss_ during the training. + +## Virtual Cycle Consistency Loss +The aim of this new component is to minimize the noise produced by the Action Unit regression. This idea was extracted from [Label-Noise Robust Multi-Domain Image-to-Image Translation](https://arxiv.org/abs/1905.02185) by Kaneko et al.. It is not proven that this new component improves the outcomes of the model but the masks seem to be darker when it is applied without losing realism on the output images. + +## TODOs + +- Clean Test function. (DONE) +- Add an Action Units selector option for training. +- Add multi-gpu support. +- Smoother video generation. diff --git a/ganimation/animations/eric_andre/attribute_images/1.jpg b/ganimation/animations/eric_andre/attribute_images/1.jpg new file mode 100644 index 0000000..fdaa8fd Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/1.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/10.jpg b/ganimation/animations/eric_andre/attribute_images/10.jpg new file mode 100644 index 0000000..d03bf42 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/10.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/11.jpg b/ganimation/animations/eric_andre/attribute_images/11.jpg new file mode 100644 index 0000000..cbf6fbf Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/11.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/12.jpg b/ganimation/animations/eric_andre/attribute_images/12.jpg new file mode 100644 index 0000000..910f8f9 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/12.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/13.jpg b/ganimation/animations/eric_andre/attribute_images/13.jpg new file mode 100644 index 0000000..eac21e2 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/13.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/14.jpg b/ganimation/animations/eric_andre/attribute_images/14.jpg new file mode 100644 index 0000000..fe61fcd Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/14.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/15.jpg b/ganimation/animations/eric_andre/attribute_images/15.jpg new file mode 100644 index 0000000..d5edb1e Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/15.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/16.jpg b/ganimation/animations/eric_andre/attribute_images/16.jpg new file mode 100644 index 0000000..7dcba4a Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/16.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/17.jpg b/ganimation/animations/eric_andre/attribute_images/17.jpg new file mode 100644 index 0000000..6058705 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/17.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/18.jpg b/ganimation/animations/eric_andre/attribute_images/18.jpg new file mode 100644 index 0000000..5b2b8e6 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/18.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/19.jpg b/ganimation/animations/eric_andre/attribute_images/19.jpg new file mode 100644 index 0000000..5136798 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/19.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/2.jpg b/ganimation/animations/eric_andre/attribute_images/2.jpg new file mode 100644 index 0000000..03c7589 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/2.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/20.jpg b/ganimation/animations/eric_andre/attribute_images/20.jpg new file mode 100644 index 0000000..19fa1af Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/20.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/21.jpg b/ganimation/animations/eric_andre/attribute_images/21.jpg new file mode 100644 index 0000000..77a08a8 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/21.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/22.jpg b/ganimation/animations/eric_andre/attribute_images/22.jpg new file mode 100644 index 0000000..4dbfc81 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/22.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/23.jpg b/ganimation/animations/eric_andre/attribute_images/23.jpg new file mode 100644 index 0000000..9d0ab3f Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/23.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/24.jpg b/ganimation/animations/eric_andre/attribute_images/24.jpg new file mode 100644 index 0000000..ff07ab8 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/24.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/25.jpg b/ganimation/animations/eric_andre/attribute_images/25.jpg new file mode 100644 index 0000000..905f944 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/25.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/26.jpg b/ganimation/animations/eric_andre/attribute_images/26.jpg new file mode 100644 index 0000000..c0ce974 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/26.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/27.jpg b/ganimation/animations/eric_andre/attribute_images/27.jpg new file mode 100644 index 0000000..a68de8e Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/27.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/28.jpg b/ganimation/animations/eric_andre/attribute_images/28.jpg new file mode 100644 index 0000000..11dddcd Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/28.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/29.jpg b/ganimation/animations/eric_andre/attribute_images/29.jpg new file mode 100644 index 0000000..2c2d84f Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/29.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/3.jpg b/ganimation/animations/eric_andre/attribute_images/3.jpg new file mode 100644 index 0000000..a038146 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/3.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/30.jpg b/ganimation/animations/eric_andre/attribute_images/30.jpg new file mode 100644 index 0000000..ec8750b Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/30.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/31.jpg b/ganimation/animations/eric_andre/attribute_images/31.jpg new file mode 100644 index 0000000..feadb3d Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/31.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/32.jpg b/ganimation/animations/eric_andre/attribute_images/32.jpg new file mode 100644 index 0000000..53ed11b Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/32.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/33.jpg b/ganimation/animations/eric_andre/attribute_images/33.jpg new file mode 100644 index 0000000..5e00058 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/33.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/34.jpg b/ganimation/animations/eric_andre/attribute_images/34.jpg new file mode 100644 index 0000000..ff58034 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/34.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/35.jpg b/ganimation/animations/eric_andre/attribute_images/35.jpg new file mode 100644 index 0000000..368381d Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/35.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/36.jpg b/ganimation/animations/eric_andre/attribute_images/36.jpg new file mode 100644 index 0000000..1a48ab4 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/36.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/37.jpg b/ganimation/animations/eric_andre/attribute_images/37.jpg new file mode 100644 index 0000000..20cdd14 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/37.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/38.jpg b/ganimation/animations/eric_andre/attribute_images/38.jpg new file mode 100644 index 0000000..f313905 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/38.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/39.jpg b/ganimation/animations/eric_andre/attribute_images/39.jpg new file mode 100644 index 0000000..1867348 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/39.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/4.jpg b/ganimation/animations/eric_andre/attribute_images/4.jpg new file mode 100644 index 0000000..75e2cf0 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/4.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/40.jpg b/ganimation/animations/eric_andre/attribute_images/40.jpg new file mode 100644 index 0000000..22e2f86 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/40.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/41.jpg b/ganimation/animations/eric_andre/attribute_images/41.jpg new file mode 100644 index 0000000..b9274a4 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/41.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/42.jpg b/ganimation/animations/eric_andre/attribute_images/42.jpg new file mode 100644 index 0000000..3b53bf8 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/42.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/43.jpg b/ganimation/animations/eric_andre/attribute_images/43.jpg new file mode 100644 index 0000000..acbeb15 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/43.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/44.jpg b/ganimation/animations/eric_andre/attribute_images/44.jpg new file mode 100644 index 0000000..95cf248 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/44.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/45.jpg b/ganimation/animations/eric_andre/attribute_images/45.jpg new file mode 100644 index 0000000..d9eb68f Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/45.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/46.jpg b/ganimation/animations/eric_andre/attribute_images/46.jpg new file mode 100644 index 0000000..fd22f6c Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/46.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/47.jpg b/ganimation/animations/eric_andre/attribute_images/47.jpg new file mode 100644 index 0000000..9ee3e9b Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/47.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/48.jpg b/ganimation/animations/eric_andre/attribute_images/48.jpg new file mode 100644 index 0000000..a808b1a Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/48.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/49.jpg b/ganimation/animations/eric_andre/attribute_images/49.jpg new file mode 100644 index 0000000..a8feafb Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/49.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/5.jpg b/ganimation/animations/eric_andre/attribute_images/5.jpg new file mode 100644 index 0000000..2e075f8 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/5.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/50.jpg b/ganimation/animations/eric_andre/attribute_images/50.jpg new file mode 100644 index 0000000..8ff36b9 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/50.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/51.jpg b/ganimation/animations/eric_andre/attribute_images/51.jpg new file mode 100644 index 0000000..a4c2bc2 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/51.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/52.jpg b/ganimation/animations/eric_andre/attribute_images/52.jpg new file mode 100644 index 0000000..bad0ab3 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/52.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/53.jpg b/ganimation/animations/eric_andre/attribute_images/53.jpg new file mode 100644 index 0000000..b573fcd Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/53.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/54.jpg b/ganimation/animations/eric_andre/attribute_images/54.jpg new file mode 100644 index 0000000..d0ee0d1 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/54.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/55.jpg b/ganimation/animations/eric_andre/attribute_images/55.jpg new file mode 100644 index 0000000..6f68eef Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/55.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/56.jpg b/ganimation/animations/eric_andre/attribute_images/56.jpg new file mode 100644 index 0000000..519ede7 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/56.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/57.jpg b/ganimation/animations/eric_andre/attribute_images/57.jpg new file mode 100644 index 0000000..bc333fb Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/57.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/58.jpg b/ganimation/animations/eric_andre/attribute_images/58.jpg new file mode 100644 index 0000000..980e0e0 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/58.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/59.jpg b/ganimation/animations/eric_andre/attribute_images/59.jpg new file mode 100644 index 0000000..e252f2a Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/59.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/6.jpg b/ganimation/animations/eric_andre/attribute_images/6.jpg new file mode 100644 index 0000000..ed17a3f Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/6.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/60.jpg b/ganimation/animations/eric_andre/attribute_images/60.jpg new file mode 100644 index 0000000..340dd04 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/60.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/61.jpg b/ganimation/animations/eric_andre/attribute_images/61.jpg new file mode 100644 index 0000000..cdbe4f4 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/61.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/62.jpg b/ganimation/animations/eric_andre/attribute_images/62.jpg new file mode 100644 index 0000000..bd39fdb Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/62.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/63.jpg b/ganimation/animations/eric_andre/attribute_images/63.jpg new file mode 100644 index 0000000..d7f8def Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/63.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/64.jpg b/ganimation/animations/eric_andre/attribute_images/64.jpg new file mode 100644 index 0000000..12eb0f7 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/64.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/65.jpg b/ganimation/animations/eric_andre/attribute_images/65.jpg new file mode 100644 index 0000000..8d603de Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/65.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/66.jpg b/ganimation/animations/eric_andre/attribute_images/66.jpg new file mode 100644 index 0000000..4cd2dd0 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/66.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/67.jpg b/ganimation/animations/eric_andre/attribute_images/67.jpg new file mode 100644 index 0000000..cb4b16f Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/67.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/68.jpg b/ganimation/animations/eric_andre/attribute_images/68.jpg new file mode 100644 index 0000000..260a50c Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/68.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/69.jpg b/ganimation/animations/eric_andre/attribute_images/69.jpg new file mode 100644 index 0000000..862fe0d Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/69.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/7.jpg b/ganimation/animations/eric_andre/attribute_images/7.jpg new file mode 100644 index 0000000..928929b Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/7.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/70.jpg b/ganimation/animations/eric_andre/attribute_images/70.jpg new file mode 100644 index 0000000..8175756 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/70.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/71.jpg b/ganimation/animations/eric_andre/attribute_images/71.jpg new file mode 100644 index 0000000..497ec83 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/71.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/72.jpg b/ganimation/animations/eric_andre/attribute_images/72.jpg new file mode 100644 index 0000000..5b4d941 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/72.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/73.jpg b/ganimation/animations/eric_andre/attribute_images/73.jpg new file mode 100644 index 0000000..dad6e8d Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/73.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/74.jpg b/ganimation/animations/eric_andre/attribute_images/74.jpg new file mode 100644 index 0000000..e82b753 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/74.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/75.jpg b/ganimation/animations/eric_andre/attribute_images/75.jpg new file mode 100644 index 0000000..fe6bd9f Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/75.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/76.jpg b/ganimation/animations/eric_andre/attribute_images/76.jpg new file mode 100644 index 0000000..0453986 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/76.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/77.jpg b/ganimation/animations/eric_andre/attribute_images/77.jpg new file mode 100644 index 0000000..b0bbfa5 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/77.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/78.jpg b/ganimation/animations/eric_andre/attribute_images/78.jpg new file mode 100644 index 0000000..daae6a4 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/78.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/79.jpg b/ganimation/animations/eric_andre/attribute_images/79.jpg new file mode 100644 index 0000000..6b170cf Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/79.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/8.jpg b/ganimation/animations/eric_andre/attribute_images/8.jpg new file mode 100644 index 0000000..710ebe2 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/8.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/80.jpg b/ganimation/animations/eric_andre/attribute_images/80.jpg new file mode 100644 index 0000000..283329b Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/80.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/81.jpg b/ganimation/animations/eric_andre/attribute_images/81.jpg new file mode 100644 index 0000000..9cf27f4 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/81.jpg differ diff --git a/ganimation/animations/eric_andre/attribute_images/9.jpg b/ganimation/animations/eric_andre/attribute_images/9.jpg new file mode 100644 index 0000000..bbe4b19 Binary files /dev/null and b/ganimation/animations/eric_andre/attribute_images/9.jpg differ diff --git a/ganimation/animations/eric_andre/attributes.txt b/ganimation/animations/eric_andre/attributes.txt new file mode 100644 index 0000000..5ff7b19 --- /dev/null +++ b/ganimation/animations/eric_andre/attributes.txt @@ -0,0 +1,81 @@ +22.jpg 0.00 0.00 0.00 0.00 1.44 0.00 0.74 1.22 2.54 1.76 0.00 0.00 0.16 0.00 1.89 0.69 0.13 +66.jpg 0.00 0.00 0.00 0.00 1.37 0.37 1.35 1.01 2.37 1.36 0.20 0.00 0.25 0.00 1.95 0.94 1.54 +38.jpg 0.22 0.02 0.00 0.00 0.99 0.29 0.30 0.63 2.35 1.31 0.00 0.00 0.00 0.00 1.44 0.99 0.31 +33.jpg 0.00 0.00 0.00 0.00 1.37 0.00 1.00 1.73 2.52 1.16 0.00 0.00 0.00 0.00 2.25 0.73 0.00 +39.jpg 0.32 0.04 0.00 0.00 0.98 0.05 0.28 0.67 2.31 1.36 0.00 0.00 0.13 0.00 1.50 0.68 0.24 +30.jpg 0.00 0.00 0.00 0.00 1.31 0.00 0.76 1.15 2.51 1.53 0.00 0.00 0.00 0.00 1.68 0.76 0.01 +12.jpg 0.00 0.00 0.00 0.00 1.25 0.97 1.11 0.59 2.04 1.47 0.00 0.00 0.38 0.00 1.61 0.66 0.00 +35.jpg 0.00 0.00 0.00 0.00 1.27 0.00 0.68 1.52 2.52 1.18 0.00 0.00 0.00 0.00 2.08 0.58 0.20 +40.jpg 0.32 0.00 0.00 0.10 0.90 0.17 0.36 0.83 2.22 1.27 0.00 0.00 0.29 0.00 1.59 0.65 0.24 +11.jpg 0.00 0.00 0.00 0.00 1.09 0.69 1.13 0.64 1.97 1.32 0.04 0.00 0.30 0.00 1.63 0.59 0.00 +50.jpg 0.35 0.05 0.00 0.00 0.75 0.68 0.09 0.53 2.10 1.71 0.00 0.00 0.36 0.06 0.55 0.48 0.02 +74.jpg 0.00 0.00 0.00 0.25 0.00 0.23 1.00 0.00 0.45 0.96 1.33 0.00 0.90 0.68 0.00 1.79 0.00 +42.jpg 0.16 0.00 0.00 0.00 1.00 0.27 0.74 1.22 2.12 1.26 0.11 0.00 0.00 0.00 1.68 0.41 0.09 +3.jpg 0.00 0.00 0.00 0.00 0.92 0.19 0.90 0.64 1.94 1.41 0.00 0.00 0.66 0.00 1.14 0.34 0.00 +77.jpg 0.00 0.00 0.00 0.67 0.00 0.00 0.84 0.00 0.53 0.83 1.44 0.00 0.42 0.68 0.00 1.20 0.10 +14.jpg 0.00 0.00 0.00 0.00 1.45 0.75 1.14 0.49 2.17 1.34 0.00 0.00 0.22 0.00 1.43 0.33 0.48 +25.jpg 0.00 0.00 0.00 0.00 1.44 0.09 0.91 1.33 2.48 1.54 0.00 0.00 0.00 0.00 1.88 0.57 0.00 +32.jpg 0.00 0.00 0.00 0.00 1.37 0.00 0.91 1.58 2.53 1.32 0.00 0.00 0.00 0.00 2.10 0.89 0.00 +81.jpg 0.00 0.00 0.00 0.04 0.52 0.13 1.99 0.97 0.67 1.12 1.27 0.00 0.27 0.00 0.03 0.66 0.00 +55.jpg 0.21 0.37 0.00 0.05 0.50 0.25 0.02 0.70 1.97 1.72 0.00 0.00 0.50 0.18 0.08 0.40 0.06 +49.jpg 0.32 0.00 0.00 0.00 0.76 0.74 0.28 0.97 2.02 1.74 0.00 0.00 0.29 0.00 1.46 0.51 0.00 +21.jpg 0.00 0.00 0.00 0.00 1.44 0.21 0.87 1.09 2.49 1.60 0.00 0.00 0.00 0.00 1.78 0.59 0.19 +52.jpg 0.29 0.00 0.00 0.21 0.61 0.97 0.21 0.75 1.75 1.79 0.00 0.00 0.34 0.13 0.94 0.90 0.00 +15.jpg 0.00 0.00 0.00 0.00 1.63 0.73 1.22 0.90 2.30 1.27 0.00 0.00 0.00 0.00 1.53 0.55 0.66 +48.jpg 0.46 0.00 0.00 0.00 1.04 0.82 0.55 1.22 2.25 1.84 0.00 0.00 0.48 0.00 1.95 0.69 0.00 +80.jpg 0.00 0.00 0.00 0.28 0.44 0.00 1.29 0.59 0.80 1.06 1.28 0.00 0.04 0.12 0.00 0.89 0.00 +67.jpg 0.00 0.01 0.00 0.00 0.54 0.03 1.55 0.00 1.20 0.80 0.67 0.00 0.64 0.00 0.84 0.76 1.16 +16.jpg 0.00 0.00 0.00 0.00 1.60 0.45 1.25 0.96 2.35 1.38 0.00 0.00 0.00 0.00 1.58 0.52 0.78 +26.jpg 0.00 0.00 0.00 0.00 1.32 0.00 0.95 1.46 2.45 1.76 0.00 0.00 0.00 0.00 1.68 0.80 0.00 +78.jpg 0.00 0.00 0.00 0.43 0.00 0.00 1.04 0.00 0.55 0.63 1.45 0.00 0.52 0.58 0.00 1.35 0.08 +37.jpg 0.25 0.01 0.00 0.13 1.16 0.35 0.51 1.09 2.38 1.31 0.13 0.00 0.00 0.00 1.70 0.95 0.29 +43.jpg 0.24 0.00 0.00 0.00 0.99 0.40 0.59 1.20 2.18 0.86 0.00 0.00 0.00 0.00 1.75 0.72 0.08 +79.jpg 0.00 0.00 0.00 0.30 0.12 0.00 1.11 0.00 0.62 0.42 1.37 0.00 0.14 0.37 0.00 0.84 0.10 +8.jpg 0.00 0.00 0.00 0.00 1.14 0.17 1.03 0.70 1.98 1.42 0.00 0.00 0.45 0.00 1.55 0.34 0.00 +17.jpg 0.00 0.00 0.00 0.00 1.60 0.59 1.23 1.04 2.35 1.42 0.00 0.00 0.11 0.00 1.67 0.81 0.57 +34.jpg 0.00 0.00 0.00 0.00 1.40 0.00 0.81 1.58 2.54 1.12 0.00 0.00 0.00 0.00 2.28 0.88 0.04 +65.jpg 0.00 0.00 0.00 0.00 1.53 0.08 1.19 1.40 2.45 1.66 0.13 0.00 0.29 0.00 2.36 1.03 1.34 +53.jpg 0.27 0.00 0.00 0.00 0.63 0.88 0.29 0.76 1.83 1.90 0.00 0.00 0.49 0.05 0.96 0.91 0.00 +69.jpg 0.00 0.00 0.00 0.07 0.26 0.39 1.29 0.00 0.31 0.77 0.87 0.00 1.37 0.30 0.38 1.19 0.58 +51.jpg 0.30 0.04 0.00 0.00 0.57 0.47 0.12 0.57 1.89 1.62 0.00 0.00 0.23 0.12 0.48 0.53 0.00 +6.jpg 0.00 0.00 0.00 0.00 0.89 0.03 0.98 0.60 1.90 1.30 0.00 0.00 0.54 0.00 1.18 0.01 0.00 +4.jpg 0.00 0.00 0.00 0.00 0.87 0.00 0.90 0.59 1.91 1.52 0.00 0.00 0.73 0.00 1.12 0.20 0.00 +44.jpg 0.34 0.00 0.00 0.00 0.94 0.26 0.46 1.06 2.19 1.45 0.00 0.00 0.00 0.23 1.09 0.76 0.02 +13.jpg 0.00 0.00 0.00 0.00 1.32 0.81 1.14 0.67 2.12 1.16 0.00 0.00 0.22 0.00 1.51 0.39 0.11 +1.jpg 0.00 0.00 0.00 0.00 0.97 0.01 0.90 0.76 1.91 1.36 0.00 0.00 0.49 0.00 1.22 0.22 0.00 +2.jpg 0.00 0.00 0.00 0.00 1.02 0.00 1.07 0.74 1.96 1.33 0.00 0.00 0.54 0.00 1.18 0.26 0.00 +56.jpg 0.64 0.34 0.00 0.17 0.55 0.72 0.41 0.78 1.81 1.58 0.01 0.00 0.57 0.00 0.99 0.88 0.00 +27.jpg 0.00 0.00 0.00 0.00 1.38 0.00 0.76 1.24 2.52 1.70 0.00 0.00 0.00 0.00 1.61 0.88 0.03 +57.jpg 0.42 0.20 0.00 0.00 0.69 0.57 0.69 1.24 1.59 2.05 0.30 0.00 1.15 0.00 1.60 1.14 0.00 +60.jpg 0.01 0.39 0.00 0.00 1.21 0.46 1.21 1.35 1.60 2.23 0.62 0.00 1.31 0.00 1.56 0.88 0.07 +71.jpg 0.00 0.38 0.00 0.04 0.20 1.14 1.17 0.00 0.26 0.36 0.76 0.00 0.92 0.08 0.52 1.82 0.29 +62.jpg 0.00 0.00 0.00 0.00 1.44 0.54 1.02 1.70 2.07 2.06 0.00 0.00 0.83 0.00 3.09 0.94 0.04 +46.jpg 0.27 0.00 0.00 0.00 0.87 0.60 0.39 0.89 2.03 1.58 0.00 0.00 0.14 0.08 1.34 0.88 0.04 +76.jpg 0.00 0.00 0.00 0.36 0.00 0.23 0.91 0.00 0.65 1.21 1.39 0.00 0.79 0.63 0.00 1.46 0.08 +70.jpg 0.00 0.05 0.00 0.27 0.19 1.08 1.04 0.00 0.31 0.50 0.85 0.00 1.27 0.21 0.48 1.27 0.44 +24.jpg 0.00 0.00 0.00 0.00 1.47 0.00 0.90 1.43 2.61 1.57 0.00 0.00 0.00 0.00 2.03 0.75 0.05 +59.jpg 0.45 0.81 0.00 0.35 0.95 0.67 0.99 1.12 1.52 2.26 0.64 0.00 1.43 0.00 1.60 1.06 0.00 +7.jpg 0.00 0.00 0.00 0.00 1.06 0.27 1.02 0.70 1.90 1.44 0.00 0.00 0.48 0.00 1.14 0.00 0.00 +64.jpg 0.00 0.00 0.00 0.00 1.65 0.68 1.18 1.76 2.49 1.66 0.03 0.00 0.52 0.00 2.73 0.75 1.21 +9.jpg 0.00 0.00 0.00 0.00 1.20 0.68 1.18 0.86 1.90 1.41 0.00 0.00 0.52 0.00 1.92 0.53 0.00 +72.jpg 0.00 0.02 0.00 0.24 0.00 0.98 1.13 0.00 0.29 0.97 1.06 0.00 1.33 0.36 0.26 1.79 0.03 +63.jpg 0.00 0.00 0.00 0.00 1.74 0.47 1.28 1.66 2.37 1.88 0.00 0.00 0.53 0.00 2.92 1.01 0.35 +19.jpg 0.00 0.00 0.00 0.00 1.62 0.44 1.25 1.17 2.43 1.65 0.00 0.00 0.04 0.00 1.70 0.85 0.41 +20.jpg 0.00 0.00 0.00 0.00 1.49 0.19 1.17 1.24 2.48 1.56 0.00 0.00 0.23 0.00 1.77 0.79 0.19 +47.jpg 0.25 0.00 0.00 0.00 0.90 0.47 0.41 0.96 2.13 1.66 0.05 0.00 0.40 0.03 1.59 0.88 0.03 +29.jpg 0.00 0.00 0.00 0.00 1.33 0.00 0.85 1.25 2.38 1.48 0.00 0.00 0.11 0.00 1.70 1.05 0.00 +36.jpg 0.00 0.00 0.00 0.08 1.44 0.45 0.68 1.14 2.44 1.51 0.11 0.00 0.09 0.00 1.95 0.88 0.37 +68.jpg 0.00 0.00 0.00 0.00 0.30 0.00 1.14 0.00 0.76 0.95 0.91 0.00 1.21 0.46 0.57 1.26 1.01 +73.jpg 0.00 0.00 0.00 0.27 0.00 0.28 1.16 0.00 0.43 1.39 1.30 0.00 1.16 0.68 0.00 1.90 0.07 +18.jpg 0.00 0.00 0.00 0.00 1.50 0.55 1.10 0.99 2.42 1.33 0.00 0.00 0.00 0.00 1.63 0.84 0.49 +58.jpg 0.86 1.24 0.00 0.34 0.76 0.23 0.63 1.08 1.65 2.15 0.51 0.00 1.34 0.00 1.89 1.51 0.00 +54.jpg 0.30 0.37 0.00 0.00 0.37 0.08 0.00 0.52 1.99 1.69 0.07 0.00 0.42 0.25 0.13 0.17 0.03 +10.jpg 0.00 0.00 0.00 0.00 1.11 0.59 1.15 0.80 1.87 1.36 0.01 0.00 0.43 0.00 1.87 0.81 0.00 +5.jpg 0.00 0.00 0.00 0.00 0.95 0.00 1.05 0.70 1.90 1.48 0.00 0.00 0.69 0.00 1.16 0.02 0.00 +28.jpg 0.00 0.00 0.00 0.00 1.31 0.00 0.69 1.17 2.54 1.48 0.00 0.00 0.07 0.00 1.76 0.94 0.00 +45.jpg 0.06 0.00 0.00 0.00 0.91 0.32 0.26 0.79 2.17 1.62 0.00 0.00 0.00 0.10 1.13 0.90 0.13 +61.jpg 0.00 0.00 0.00 0.00 1.36 0.25 1.01 1.49 1.80 2.20 0.08 0.00 1.29 0.00 2.84 1.11 0.00 +23.jpg 0.00 0.00 0.00 0.00 1.53 0.00 0.91 1.27 2.60 1.70 0.00 0.00 0.02 0.00 2.05 0.66 0.00 +31.jpg 0.00 0.00 0.00 0.00 1.35 0.00 0.74 1.03 2.49 1.49 0.00 0.00 0.06 0.00 1.77 0.85 0.05 +41.jpg 0.19 0.00 0.00 0.00 1.03 0.41 0.68 0.96 2.17 1.29 0.04 0.00 0.00 0.00 1.57 0.56 0.07 +75.jpg 0.00 0.00 0.00 0.35 0.00 0.21 1.00 0.00 0.57 1.41 1.27 0.00 0.84 0.88 0.00 1.99 0.13 diff --git a/ganimation/animations/eric_andre/images_to_animate/hannibal.jpg b/ganimation/animations/eric_andre/images_to_animate/hannibal.jpg new file mode 100644 index 0000000..1cd3fca Binary files /dev/null and b/ganimation/animations/eric_andre/images_to_animate/hannibal.jpg differ diff --git a/ganimation/animations/eric_andre/images_to_animate/img.jpg b/ganimation/animations/eric_andre/images_to_animate/img.jpg new file mode 100644 index 0000000..4185bc4 Binary files /dev/null and b/ganimation/animations/eric_andre/images_to_animate/img.jpg differ diff --git a/ganimation/animations/eric_andre/images_to_animate/monalisa.jpg b/ganimation/animations/eric_andre/images_to_animate/monalisa.jpg new file mode 100644 index 0000000..264be80 Binary files /dev/null and b/ganimation/animations/eric_andre/images_to_animate/monalisa.jpg differ diff --git a/ganimation/attacks.py b/ganimation/attacks.py new file mode 100644 index 0000000..05ffacb --- /dev/null +++ b/ganimation/attacks.py @@ -0,0 +1,128 @@ +import copy +import numpy as np +from collections import Iterable +from scipy.stats import truncnorm + +import torch +import torch.nn as nn + +class LinfPGDAttack(object): + def __init__(self, model=None, device=None, epsilon=0.03, k=40, a=0.01): + self.model = model + self.epsilon = epsilon + self.k = k + self.a = a + self.loss_fn = nn.MSELoss().to(device) + self.device = device + + def perturb(self, X_nat, y, c_trg): + """ + Given examples (X_nat, y), returns adversarial + examples within epsilon of X_nat in l_infinity norm. + """ + X = X_nat.clone().detach_() + + for i in range(self.k): + # print(i) + X.requires_grad = True + output_att, output_img = self.model(X, c_trg) + + out = imFromAttReg(output_att, output_img, X) + + self.model.zero_grad() + # loss = -self.loss_fn(output_att, y) + self.loss_fn(output_img, y) + # loss = self.loss_fn(output_att, y) + loss = self.loss_fn(output_att, y) + loss.backward() + grad = X.grad + + X_adv = X + self.a * grad.sign() + + eta = torch.clamp(X_adv - X_nat, min=-self.epsilon, max=self.epsilon) + X = torch.clamp(X_nat + eta, min=-1, max=1).detach_() + + return X, eta + + def perturb_iter_data(self, X_nat, X_all, y, c_trg): + """ + X_nat is a tensor with several different images. + This does not work at all yet.. + """ + X = X_nat.clone().detach_() + # X_all_local = X_all.clone().detach_() + + j = 0 + J = X_all.size(0) + J = 1 + + for i in range(self.k): + # print(i,j) + X_j = X_all[j].unsqueeze(0) + X_j.requires_grad = True + output_att, output_img = self.model(X_j, c_trg) + + out = imFromAttReg(output_att, output_img, X_j) + + self.model.zero_grad() + loss = -self.loss_fn(out, y) + loss.backward() + grad = X_j.grad + + X_adv = X + self.a * grad.sign() + + eta = torch.clamp(X_adv - X_nat, min=-self.epsilon, max=self.epsilon) + X = torch.clamp(X_nat + eta, min=-1, max=1).detach_() + + j += 1 + if j == J: + j = 0 + + return X, eta + + def perturb_iter_class(self, X_nat, y, c_trg): + """ + Given examples (X_nat, y), returns adversarial + examples within epsilon of X_nat in l_infinity norm. + """ + X = X_nat.clone().detach_() + + j = 0 + J = c_trg.size(0) + + for i in range(self.k): + # print(i) + X.requires_grad = True + output_att, output_img = self.model(X, c_trg[j,:].unsqueeze(0)) + + out = imFromAttReg(output_att, output_img, X) + + self.model.zero_grad() + + # Away from black + loss = self.loss_fn(output_att, y) + loss.backward() + grad = X.grad + + X_adv = X + self.a * grad.sign() + + eta = torch.clamp(X_adv - X_nat, min=-self.epsilon, max=self.epsilon) + X = torch.clamp(X_nat + eta, min=-1, max=1).detach_() + + j += 1 + if j == J: + j = 0 + + return X, eta + +def clip_tensor(X, Y, Z): + # Clip X with Y min and Z max + X_np = X.data.cpu().numpy() + Y_np = Y.data.cpu().numpy() + Z_np = Z.data.cpu().numpy() + X_clipped = np.clip(X_np, Y_np, Z_np) + X_res = torch.FloatTensor(X_clipped) + return X_res + +def imFromAttReg(att, reg, x_real): + """Mixes attention, color and real images""" + return (1-att)*reg + att*x_real \ No newline at end of file diff --git a/ganimation/config.py b/ganimation/config.py new file mode 100644 index 0000000..a170a5c --- /dev/null +++ b/ganimation/config.py @@ -0,0 +1,98 @@ +import argparse + + +def get_config(): + parser = argparse.ArgumentParser() + + # Model configuration. + parser.add_argument('--c_dim', type=int, default=17, + help='dimension of domain labels') + + parser.add_argument('--image_size', type=int, + default=128, help='image resolution') + parser.add_argument('--g_conv_dim', type=int, default=64, + help='number of conv filters in the first layer of G') + parser.add_argument('--d_conv_dim', type=int, default=64, + help='number of conv filters in the first layer of D') + parser.add_argument('--g_repeat_num', type=int, default=6, + help='number of residual blocks in G') + parser.add_argument('--d_repeat_num', type=int, default=6, + help='number of strided conv layers in D') + parser.add_argument('--lambda_cls', type=float, default=160, + help='weight for domain classification loss') + parser.add_argument('--lambda_rec', type=float, default=10, + help='weight for reconstruction loss') + parser.add_argument('--lambda_gp', type=float, default=10, + help='weight for gradient penalty') + parser.add_argument('--lambda_sat', type=float, default=0.1, + help='weight for attention saturation loss') + parser.add_argument('--lambda_smooth', type=float, default=1e-4, + help='weight for the attention smoothing loss') + + # Training configuration. + parser.add_argument('--batch_size', type=int, + default=1, help='mini-batch size') + parser.add_argument('--num_epochs', type=int, default=30, + help='number of total epochs for training D') + parser.add_argument('--num_epochs_decay', type=int, default=20, + help='number of epochs for start decaying lr') + parser.add_argument('--g_lr', type=float, default=0.0001, + help='learning rate for G') + parser.add_argument('--d_lr', type=float, default=0.0001, + help='learning rate for D') + parser.add_argument('--n_critic', type=int, default=5, + help='number of D updates per each G update') + parser.add_argument('--beta2', type=float, default=0.999, + help='beta2 for Adam optimizer') + parser.add_argument('--beta1', type=float, default=0.5, + help='beta1 for Adam optimizer') + parser.add_argument('--resume_iters', type=int, + default=None, help='resume training from this step') + parser.add_argument('--first_epoch', type=int, + default=0, help='First epoch') + parser.add_argument('--gpu_id', type=int, default=0, help='GPU id') + parser.add_argument('--use_virtual', type=str2bool, default=False, + help='Boolean to decide if we should use the virtual cycle concistency loss') + # Miscellaneous. + parser.add_argument('--num_workers', type=int, default=4) + parser.add_argument('--mode', type=str, default='train', + choices=['train', 'animation']) + parser.add_argument('--use_tensorboard', type=str2bool, default=False) + parser.add_argument('--num_sample_targets', type=int, default=4, + help="number of targets to use in the samples visualization") + + # Directories. + parser.add_argument('--image_dir', type=str, + default='data/celeba/images_aligned') + parser.add_argument('--attr_path', type=str, + default='data/celeba/list_attr_celeba.txt') + parser.add_argument('--outputs_dir', type=str, default='experiment1') + parser.add_argument('--log_dir', type=str, default='logs') + parser.add_argument('--model_save_dir', type=str, default='models') + parser.add_argument('--sample_dir', type=str, default='samples') + parser.add_argument('--result_dir', type=str, default='results') + + parser.add_argument('--animation_images_dir', type=str, + default='animations/eric_andre/images_to_animate') + parser.add_argument('--animation_attribute_images_dir', type=str, + default='animations/eric_andre/attribute_images') + parser.add_argument('--animation_attributes_path', type=str, + default='animations/eric_andre/attributes.txt') + parser.add_argument('--animation_models_dir', type=str, + default='models') + parser.add_argument('--animation_results_dir', type=str, + default='animations/eric_andre/results') + parser.add_argument('--animation_mode', type=str, default='animate_image', + choices=['animate_image', 'animate_random_batch']) + + # Step size. + parser.add_argument('--log_step', type=int, default=10) + parser.add_argument('--sample_step', type=int, default=200) + parser.add_argument('--model_save_step', type=int, default=1000) + + config = parser.parse_args() + return config + + +def str2bool(v): + return v.lower() in ('true') diff --git a/ganimation/data_loader.py b/ganimation/data_loader.py new file mode 100644 index 0000000..9721ff8 --- /dev/null +++ b/ganimation/data_loader.py @@ -0,0 +1,86 @@ +from torch.utils import data +from torchvision import transforms as T +from torchvision.datasets import ImageFolder +from PIL import Image +import torch +import os +import random +import numpy as np + + +class CelebA(data.Dataset): + + def __init__(self, image_dir, attr_path, transform, mode, c_dim): + + self.image_dir = image_dir + self.attr_path = attr_path + self.transform = transform + self.mode = mode + self.c_dim = c_dim + + self.train_dataset = [] + self.test_dataset = [] + + # Fills train_dataset and test_dataset --> [filename, boolean attribute vector] + self.preprocess() + + if mode == 'train': + self.num_images = len(self.train_dataset) + else: + self.num_images = len(self.test_dataset) + + print("------------------------------------------------") + print("Training images: ", len(self.train_dataset)) + print("Testing images: ", len(self.test_dataset)) + + def preprocess(self): + lines = [line.rstrip() for line in open(self.attr_path, 'r')] + lines = lines[2:] + + random.seed(1234) + random.shuffle(lines) + + # Extract the info from each line + for idx, line in enumerate(lines): + split = line.split() + filename = split[0] + values = split[1:] + label = [] # Vector representing the presence of each attribute in each image + + for n in range(self.c_dim): + label.append(float(values[n])/5.) + + if idx < 100: + self.test_dataset.append([filename, label]) + else: + self.train_dataset.append([filename, label]) + + print('Dataset ready!...') + + def __getitem__(self, index): + dataset = self.train_dataset if self.mode == 'train' else self.test_dataset + filename, label = dataset[index] + image = Image.open(os.path.join(self.image_dir, filename)) + return self.transform(image), torch.FloatTensor(label) + + def __len__(self): + return self.num_images + + +def get_loader(image_dir, attr_path, c_dim, image_size=128, + batch_size=25, mode='train', num_workers=1): + + transform = [] + transform.append(T.ToTensor()) + transform.append(T.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5))) + transform = T.Compose(transform) + + dataset = CelebA(image_dir, attr_path, transform, mode, c_dim) + + data_loader = data.DataLoader(dataset=dataset, + batch_size=batch_size, + shuffle=True, + num_workers=num_workers, + drop_last=True) + + return data_loader diff --git a/ganimation/environment.yml b/ganimation/environment.yml new file mode 100644 index 0000000..3fba9b3 --- /dev/null +++ b/ganimation/environment.yml @@ -0,0 +1,19 @@ +name: ganimation +channels: + - pytorch + - conda-forge + - defaults +dependencies: + - numpy=1.16.3 + - opencv=4.1.0 + - openssl=1.1.1c + - pillow=6.0.0 + - pip=19.1 + - python=3.6.8 + - pytorch=1.1.0 + - scipy=1.3.0 + - tensorboard=1.13.1 + - tensorboardx=1.7 + - tensorflow=1.13.1 + - torchvision=0.3.0 + diff --git a/ganimation/logger.py b/ganimation/logger.py new file mode 100644 index 0000000..2df5598 --- /dev/null +++ b/ganimation/logger.py @@ -0,0 +1,34 @@ +import tensorflow as tf +import numpy as np + + +class Logger(object): + """Tensorboard logger.""" + + def __init__(self, log_dir): + """Initialize summary writer.""" + self.writer = tf.summary.FileWriter(log_dir) + + def scalar_summary(self, tag, value, step): + """Add scalar summary.""" + summary = tf.Summary( + value=[tf.Summary.Value(tag=tag, simple_value=value)]) + self.writer.add_summary(summary, step) + + def image_summary(self, name, x, step): + x = x.numpy()[0, :, :, :] + x = np.moveaxis(x, 0, -1) + x = np.expand_dims(x, 0) + + tensor = tf.convert_to_tensor( + x, + dtype=tf.float32, + name=None, + preferred_dtype=None + ) + + print(tensor.value) + + summary = tf.summary.image(name=name, tensor=tensor) + + self.writer.add_summary(summary, step).eval() diff --git a/ganimation/main.py b/ganimation/main.py new file mode 100644 index 0000000..9381db2 --- /dev/null +++ b/ganimation/main.py @@ -0,0 +1,60 @@ +import os + +from config import get_config +from solver import Solver +from data_loader import get_loader +from torch.backends import cudnn + + +def main(config): + cudnn.benchmark = True # Improves runtime if the input size is constant + + config.outputs_dir = os.path.join('experiments', config.outputs_dir) + + config.log_dir = os.path.join(config.outputs_dir, config.log_dir) + config.model_save_dir = os.path.join( + config.outputs_dir, config.model_save_dir) + config.sample_dir = os.path.join(config.outputs_dir, config.sample_dir) + config.result_dir = os.path.join(config.outputs_dir, config.result_dir) + + data_loader = get_loader(config.image_dir, config.attr_path, config.c_dim, + config.image_size, config.batch_size, config.mode, + config.num_workers) + + config_dict = vars(config) + solver = Solver(data_loader, config_dict) + + if config.mode == 'train': + initialize_train_directories(config) + solver.train() + elif config.mode == 'animation': + initialize_animation_directories(config) + solver.animation() + + +def initialize_train_directories(config): + if not os.path.exists('experiments'): + os.makedirs('experiments') + if not os.path.exists(config.outputs_dir): + os.makedirs(config.outputs_dir) + if not os.path.exists(config.log_dir): + os.makedirs(config.log_dir) + if not os.path.exists(config.model_save_dir): + os.makedirs(config.model_save_dir) + if not os.path.exists(config.sample_dir): + os.makedirs(config.sample_dir) + if not os.path.exists(config.result_dir): + os.makedirs(config.result_dir) + + +def initialize_animation_directories(config): + if not os.path.exists(config.animation_results_dir): + os.makedirs(config.animation_results_dir) + + +if __name__ == '__main__': + + config = get_config() + print(config) + + main(config) diff --git a/ganimation/model.py b/ganimation/model.py new file mode 100644 index 0000000..2244744 --- /dev/null +++ b/ganimation/model.py @@ -0,0 +1,158 @@ +import torch +import torch.nn as nn +import torch.nn.functional as F +import numpy as np +import random + +from PIL import Image + + +class BaseNetwork(nn.Module): + def __init__(self): + super(BaseNetwork, self).__init__() + + def init_weights(self): + self.apply(self._weights_init_fn) + + def _weights_init_fn(self, m): + classname = m.__class__.__name__ + if classname.find('Conv') != -1: + m.weight.data.normal_(0.0, 0.02) + if hasattr(m.bias, 'data'): + m.bias.data.fill_(0) + elif classname.find('BatchNorm2d') != -1: + m.weight.data.normal_(1.0, 0.02) + m.bias.data.fill_(0) + + +class ResidualBlock(BaseNetwork): + """Residual Block with instance normalization.""" + + def __init__(self, dim_in, dim_out): + super(ResidualBlock, self).__init__() + self.main = nn.Sequential( + nn.Conv2d(dim_in, dim_out, kernel_size=3, + stride=1, padding=1, bias=False), + nn.InstanceNorm2d(dim_out, affine=True, track_running_stats=True), + nn.ReLU(inplace=True), + nn.Conv2d(dim_out, dim_out, kernel_size=3, + stride=1, padding=1, bias=False), + nn.InstanceNorm2d(dim_out, affine=True, track_running_stats=True)) + + self.init_weights() + + def forward(self, x): + return x + self.main(x) + + +class Generator(BaseNetwork): + """Generator network.""" + + def __init__(self, conv_dim=64, c_dim=5, repeat_num=6): + super(Generator, self).__init__() + + layers = [] + layers.append(nn.Conv2d(3+c_dim, conv_dim, kernel_size=7, + stride=1, padding=3, bias=False)) + layers.append(nn.InstanceNorm2d( + conv_dim, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + + self.debug1 = nn.Sequential(*layers) + + # Down-sampling layers. + curr_dim = conv_dim + for i in range(2): + layers.append(nn.Conv2d(curr_dim, curr_dim*2, + kernel_size=4, stride=2, padding=1, bias=False)) + layers.append(nn.InstanceNorm2d( + curr_dim*2, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + curr_dim = curr_dim * 2 + + self.debug2 = nn.Sequential(*layers) + + # Bottleneck layers. + for i in range(repeat_num): + layers.append(ResidualBlock(dim_in=curr_dim, dim_out=curr_dim)) + + self.debug3 = nn.Sequential(*layers) + + # Up-sampling layers. + for i in range(2): + layers.append(nn.ConvTranspose2d(curr_dim, curr_dim // + 2, kernel_size=4, stride=2, padding=1, bias=False)) + layers.append(nn.InstanceNorm2d( + curr_dim//2, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + curr_dim = curr_dim // 2 + + self.main = nn.Sequential(*layers) + + self.debug4 = nn.Sequential(*layers) + + # Same architecture for the color regression + layers = [] + layers.append(nn.Conv2d(curr_dim, 3, kernel_size=7, + stride=1, padding=3, bias=False)) + layers.append(nn.Tanh()) + self.im_reg = nn.Sequential(*layers) + + # One Channel output and Sigmoid function for the attention layer + layers = [] + layers.append(nn.Conv2d(curr_dim, 1, kernel_size=7, + stride=1, padding=3, bias=False)) + layers.append(nn.Sigmoid()) # Values between 0 and 1 + self.im_att = nn.Sequential(*layers) + + self.init_weights() + + def forward(self, x, c): + # Replicate spatially and concatenate domain information. + + c = c.unsqueeze(2).unsqueeze(3) + c = c.expand(c.size(0), c.size(1), x.size(2), x.size(3)) + + x = torch.cat([x, c], dim=1) + features = self.main(x) + + reg = self.im_reg(features) + att = self.im_att(features) + + return att, reg + + +class Discriminator(BaseNetwork): + """Discriminator network with PatchGAN.""" + + def __init__(self, image_size=128, conv_dim=64, c_dim=5, repeat_num=6): + super(Discriminator, self).__init__() + + layers = [] + layers.append( + nn.Conv2d(3, conv_dim, kernel_size=4, stride=2, padding=1)) + layers.append(nn.LeakyReLU(0.01)) + + curr_dim = conv_dim + for i in range(1, repeat_num): + layers.append(nn.Conv2d(curr_dim, curr_dim*2, + kernel_size=4, stride=2, padding=1)) + layers.append(nn.LeakyReLU(0.01)) + curr_dim = curr_dim * 2 + + kernel_size = int(image_size / np.power(2, repeat_num)) + self.main = nn.Sequential(*layers) + self.conv1 = nn.Conv2d(curr_dim, 1, kernel_size=3, + stride=1, padding=1, bias=False) + self.conv2 = nn.Conv2d( + curr_dim, c_dim, kernel_size=kernel_size, bias=False) + + self.init_weights() + + def forward(self, x): + h = self.main(x) + out_src = self.conv1(h) + out_cls = self.conv2(h) + + # out_cls.view(out_cls.size(0), out_cls.size(1)) + return out_src.squeeze(), out_cls.squeeze() diff --git a/ganimation/models b/ganimation/models new file mode 120000 index 0000000..7027e3b --- /dev/null +++ b/ganimation/models @@ -0,0 +1 @@ +/scratch2/ganimation/models \ No newline at end of file diff --git a/ganimation/openface_utils/create_csv.py b/ganimation/openface_utils/create_csv.py new file mode 100644 index 0000000..ba3f3e0 --- /dev/null +++ b/ganimation/openface_utils/create_csv.py @@ -0,0 +1,11 @@ +import glob + +output_txt = 'list_attr_mydataset.txt' + +for idx, f in enumerate(glob.glob('./my-processed-dataset/*.csv')): + with open(f, 'r') as csv_file: + csv_file.readline() + csv_list = csv_file.readline().split(', ') + if float(csv_list[1]) >= 0.88: + aus = " ".join(csv_list[2:19]) + open(output_txt, 'a').write(f.split('/')[-1].split('.')[0] + '.jpg ' + aus + '\n') \ No newline at end of file diff --git a/ganimation/openface_utils/create_image_folder.py b/ganimation/openface_utils/create_image_folder.py new file mode 100644 index 0000000..bcc4051 --- /dev/null +++ b/ganimation/openface_utils/create_image_folder.py @@ -0,0 +1,12 @@ +import os +import shutil + +output_dir = './images' + +os.mkdir(output_dir) + +for root, dirs, files in os.walk('./my-processed-dataset'): + for filename in files: + if 'jpg' in filename: + img_name = root.split('/')[-1].split('_')[0] + '.jpg' + shutil.copy2(os.path.join(root, filename), os.path.join(output_dir, img_name)) \ No newline at end of file diff --git a/ganimation/solver.py b/ganimation/solver.py new file mode 100644 index 0000000..824e7ed --- /dev/null +++ b/ganimation/solver.py @@ -0,0 +1,455 @@ +import torch +import torch.nn.functional as F +from torchvision.utils import save_image + +from model import Generator, Discriminator +from utils import Utils + +import numpy as np + +import os +import time +import datetime +import random +import glob + +import attacks + + +class Solver(Utils): + + def __init__(self, data_loader, config_dict): + # NOTE: the following line create new class arguments with the + # values in config_dict + self.__dict__.update(**config_dict) + + self.data_loader = data_loader + + self.device = 'cuda:' + \ + str(self.gpu_id) if torch.cuda.is_available() else 'cpu' + print(f"Model running on {self.device}") + + if self.use_tensorboard: + self.build_tensorboard() + + self.loss_visualization = {} + + self.build_model() + + def train(self): + print('Training...') + + self.global_counter = 0 + + if self.resume_iters: + self.first_iteration = self.resume_iters + self.restore_model(self.resume_iters) + else: + self.first_iteration = 0 + + self.start_time = time.time() + + for epoch in range(self.first_epoch, self.num_epochs): + print(f"EPOCH {epoch} WITH {len(self.data_loader)} STEPS") + + self.alpha_rec = 1 + self.epoch = epoch + + for iteration in range(self.first_iteration, len(self.data_loader)): + self.iteration = iteration + self.get_training_data() + self.train_discriminator() + + if (self.iteration+1) % self.n_critic == 0: + generation_outputs = self.train_generator() + + if (self.iteration+1) % self.sample_step == 0: + self.print_generations(generation_outputs) + + if self.iteration % self.model_save_step == 0: + self.save_models(self.iteration, self.epoch) + + if self.iteration % self.log_step == 0: + self.update_tensorboard() + self.global_counter += 1 + + # Decay learning rates. + if (self.epoch+1) > self.num_epochs_decay: + # float(self.num_epochs_decay)) + self.g_lr -= (self.g_lr / 10.0) + # float(self.num_epochs_decay)) + self.d_lr -= (self.d_lr / 10.0) + self.update_lr(self.g_lr, self.d_lr) + print('Decayed learning rates, self.g_lr: {}, self.d_lr: {}.'.format( + self.g_lr, self.d_lr)) + + # Save the last model + self.save_models() + + self.first_iteration = 0 # Next epochs start from 0 + + def get_training_data(self): + try: + self.x_real, self.label_org = next(self.data_iter) + except: + self.data_iter = iter(self.data_loader) + self.x_real, self.label_org = next(self.data_iter) + + self.x_real = self.x_real.to(self.device) # Input images. + # Labels for computing classification loss. + self.label_org = self.label_org.to(self.device) + + # Get random targets for training + self.label_trg = self.get_random_labels_list() + self.label_trg = torch.FloatTensor(self.label_trg).clamp(0, 1) + # Labels for computing classification loss. + self.label_trg = self.label_trg.to(self.device) + + if self.use_virtual: + self.label_trg_virtual = self.get_random_labels_list() + self.label_trg_virtual = torch.FloatTensor( + self.label_trg_virtual).clamp(0, 1) + # Labels for computing classification loss. + self.label_trg_virtual = self.label_trg_virtual.to(self.device) + + assert not torch.equal( + self.label_trg_virtual, self.label_trg), "Target label and virtual label are the same" + + def get_random_labels_list(self): + trg_list = [] + for _ in range(self.batch_size): + random_num = random.randint( + 0, len(self.data_loader)*self.batch_size-1) + # Select a random AU vector from the dataset + trg_list_aux = self.data_loader.dataset[random_num][1] + # Apply a variance of 0.1 to the vector + trg_list.append(trg_list_aux.numpy() + + np.random.uniform(-0.1, 0.1, trg_list_aux.shape)) + return trg_list + + def train_discriminator(self): + # Compute loss with real images. + critic_output, classification_output = self.D(self.x_real) + d_loss_critic_real = -torch.mean(critic_output) + d_loss_classification = torch.nn.functional.mse_loss( + classification_output, self.label_org) + + # Compute loss with fake images. + attention_mask, color_regression = self.G(self.x_real, self.label_trg) + x_fake = self.imFromAttReg( + attention_mask, color_regression, self.x_real) + critic_output, _ = self.D(x_fake.detach()) + d_loss_critic_fake = torch.mean(critic_output) + + # Compute loss for gradient penalty. + alpha = torch.rand(self.x_real.size(0), 1, 1, 1).to(self.device) + # Half of image info from fake and half from real + x_hat = (alpha * self.x_real.data + (1 - alpha) + * x_fake.data).requires_grad_(True) + critic_output, _ = self.D(x_hat) + d_loss_gp = self.gradient_penalty(critic_output, x_hat) + + # Backward and optimize. + d_loss = d_loss_critic_real + d_loss_critic_fake + self.lambda_cls * \ + d_loss_classification + self.lambda_gp * d_loss_gp + + self.reset_grad() + d_loss.backward() + self.d_optimizer.step() + + # Logging. + self.loss_visualization['D/loss'] = d_loss.item() + self.loss_visualization['D/loss_real'] = d_loss_critic_real.item() + self.loss_visualization['D/loss_fake'] = d_loss_critic_fake.item() + self.loss_visualization['D/loss_cls'] = self.lambda_cls * \ + d_loss_classification.item() + self.loss_visualization['D/loss_gp'] = self.lambda_gp * \ + d_loss_gp.item() + + def train_generator(self): + # Original-to-target domain. + attention_mask, color_regression = self.G(self.x_real, self.label_trg) + x_fake = self.imFromAttReg( + attention_mask, color_regression, self.x_real) + + critic_output, classification_output = self.D(x_fake) + g_loss_fake = -torch.mean(critic_output) + g_loss_cls = torch.nn.functional.mse_loss( + classification_output, self.label_trg) + + # Target-to-original domain. + if not self.use_virtual: + reconstructed_attention_mask, reconstructed_color_regression = self.G( + x_fake, self.label_org) + x_rec = self.imFromAttReg( + reconstructed_attention_mask, reconstructed_color_regression, x_fake) + + else: + reconstructed_attention_mask, reconstructed_color_regression = self.G( + x_fake, self.label_org) + x_rec = self.imFromAttReg( + reconstructed_attention_mask, reconstructed_color_regression, x_fake) + + reconstructed_attention_mask_2, reconstructed_color_regression_2 = self.G( + x_fake, self.label_trg_virtual) + x_fake_virtual = self.imFromAttReg( + reconstructed_attention_mask_2, reconstructed_color_regression_2, x_fake) + + reconstructed_virtual_attention_mask, reconstructed_virtual_color_regression = self.G( + x_fake_virtual, self.label_trg) + x_rec_virtual = self.imFromAttReg( + reconstructed_virtual_attention_mask, reconstructed_virtual_color_regression, x_fake_virtual.detach()) + + # Compute losses + g_loss_saturation_1 = attention_mask.mean() + g_loss_smooth1 = self.smooth_loss(attention_mask) + + if not self.use_virtual: + g_loss_rec = torch.nn.functional.l1_loss(self.x_real, x_rec) + g_loss_saturation_2 = reconstructed_attention_mask.mean() + g_loss_smooth2 = self.smooth_loss(reconstructed_attention_mask) + + else: + g_loss_rec = (1-self.alpha_rec)*torch.nn.functional.l1_loss(self.x_real, x_rec) + \ + self.alpha_rec * \ + torch.nn.functional.l1_loss(x_fake, x_rec_virtual) + + g_loss_saturation_2 = (1-self.alpha_rec) * reconstructed_attention_mask.mean() + \ + self.alpha_rec * reconstructed_virtual_attention_mask.mean() + + g_loss_smooth2 = (1-self.alpha_rec) * self.smooth_loss(reconstructed_virtual_attention_mask) + \ + self.alpha_rec * self.smooth_loss(reconstructed_attention_mask) + + g_attention_loss = self.lambda_smooth * g_loss_smooth1 + self.lambda_smooth * g_loss_smooth2 \ + + self.lambda_sat * g_loss_saturation_1 + self.lambda_sat * g_loss_saturation_2 + + g_loss = g_loss_fake + self.lambda_rec * g_loss_rec + \ + self.lambda_cls * g_loss_cls + g_attention_loss + + self.reset_grad() + g_loss.backward() + self.g_optimizer.step() + + # Logging. + self.loss_visualization['G/loss'] = g_loss.item() + self.loss_visualization['G/loss_fake'] = g_loss_fake.item() + self.loss_visualization['G/loss_rec'] = self.lambda_rec * \ + g_loss_rec.item() + self.loss_visualization['G/loss_cls'] = self.lambda_cls * \ + g_loss_cls.item() + self.loss_visualization['G/attention_loss'] = g_attention_loss.item() + self.loss_visualization['G/loss_smooth1'] = self.lambda_smooth * \ + g_loss_smooth1.item() + self.loss_visualization['G/loss_smooth2'] = self.lambda_smooth * \ + g_loss_smooth2.item() + self.loss_visualization['G/loss_sat1'] = self.lambda_sat * \ + g_loss_saturation_1.item() + self.loss_visualization['G/loss_sat2'] = self.lambda_sat * \ + g_loss_saturation_2.item() + self.loss_visualization['G/alpha'] = self.alpha_rec + + if not self.use_virtual: + return { + "color_regression": color_regression, + "x_fake": x_fake, + "attention_mask": attention_mask, + "x_rec": x_rec, + "reconstructed_attention_mask": reconstructed_attention_mask, + "reconstructed_attention_mask": reconstructed_attention_mask, + "reconstructed_color_regression": reconstructed_color_regression, + } + + else: + return { + "color_regression": color_regression, + "x_fake": x_fake, + "attention_mask": attention_mask, + "x_rec": x_rec, + "reconstructed_attention_mask": reconstructed_attention_mask, + "reconstructed_attention_mask": reconstructed_attention_mask, + "reconstructed_color_regression": reconstructed_color_regression, + "reconstructed_virtual_attention_mask": reconstructed_virtual_attention_mask, + "reconstructed_virtual_color_regression": reconstructed_virtual_color_regression, + "x_rec_virtual": x_rec_virtual, + } + + def print_generations(self, generator_outputs_dict): + print_epoch_images = False + save_image(self.denorm(self.x_real), self.sample_dir + + '/{}_4real_.png'.format(self.epoch)) + save_image((generator_outputs_dict["color_regression"]+1)/2, + self.sample_dir + '/{}_2reg_.png'.format(self.epoch)) + save_image(self.denorm( + generator_outputs_dict["x_fake"]), self.sample_dir + '/{}_3res_.png'.format(self.epoch)) + save_image(generator_outputs_dict["attention_mask"], + self.sample_dir + '/{}_1attention_.png'.format(self.epoch)) + save_image(self.denorm( + generator_outputs_dict["x_rec"]), self.sample_dir + '/{}_5rec_.png'.format(self.epoch)) + + if not self.use_virtual: + save_image(generator_outputs_dict["reconstructed_attention_mask"], + self.sample_dir + '/{}_6rec_attention.png'.format(self.epoch)) + save_image(self.denorm( + generator_outputs_dict["reconstructed_color_regression"]), self.sample_dir + '/{}_7rec_reg.png'.format(self.epoch)) + + else: + save_image(generator_outputs_dict["reconstructed_attention_mask"], + self.sample_dir + '/{}_6rec_attention_.png'.format(self.epoch)) + save_image(self.denorm( + generator_outputs_dict["reconstructed_color_regression"]), self.sample_dir + '/{}_7rec_reg.png'.format(self.epoch)) + + save_image(generator_outputs_dict["reconstructed_virtual_attention_mask"], + self.sample_dir + '/{}_8rec_virtual_attention.png'.format(self.epoch)) + save_image(self.denorm(generator_outputs_dict["reconstructed_virtual_color_regression"]), + self.sample_dir + '/{}_91rec_virtual_reg.png'.format(self.epoch)) + save_image(self.denorm( + generator_outputs_dict["x_rec_virtual"]), self.sample_dir + '/{}_92rec_epoch_.png'.format(self.epoch)) + + def update_tensorboard(self): + # Print out training information. + et = time.time() - self.start_time + et = str(datetime.timedelta(seconds=et))[:-7] + log = "Elapsed [{}], [{}/{}], Epoch [{}/{}]".format( + et, self.iteration+1, len(self.data_loader), self.epoch+1, self.num_epochs) + for tag, value in self.loss_visualization.items(): + log += ", {}: {:.4f}".format(tag, value) + print(log) + + if self.use_tensorboard: + for tag, value in self.loss_visualization.items(): + self.writer.add_scalar( + tag, value, global_step=self.global_counter) + + def animation(self, mode='animate_image'): + from PIL import Image + from torchvision import transforms as T + + regular_image_transform = [] + regular_image_transform.append(T.ToTensor()) + regular_image_transform.append(T.Normalize( + mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5))) + regular_image_transform = T.Compose(regular_image_transform) + + G_path = sorted(glob.glob(os.path.join( + self.animation_models_dir, '*G.ckpt')), key=self.numericalSort)[0] + self.G.load_state_dict(torch.load(G_path, map_location=f'cuda:{self.gpu_id}')) + self.G = self.G.cuda(0) + + reference_expression_images = [] + + with torch.no_grad(): + with open(self.animation_attributes_path, 'r') as txt_file: + csv_lines = txt_file.readlines() + + targets = torch.zeros(len(csv_lines), self.c_dim) + input_images = torch.zeros(len(csv_lines), 3, 128, 128) + + for idx, line in enumerate(csv_lines): + splitted_lines = line.split(' ') + image_path = os.path.join( + self.animation_attribute_images_dir, splitted_lines[0]) + input_images[idx, :] = regular_image_transform( + Image.open(image_path)).cuda() + reference_expression_images.append(splitted_lines[0]) + targets[idx, :] = torch.Tensor( + np.array(list(map(lambda x: float(x)/5., splitted_lines[1::])))) + + if mode == 'animate_random_batch': + animation_batch_size = 7 + + self.data_iter = iter(self.data_loader) + images_to_animate, _ = next(self.data_iter) + images_to_animate = images_to_animate[0:animation_batch_size].cuda( + ) + + for target_idx in range(targets.size(0)): + targets_au = targets[target_idx, :].unsqueeze( + 0).repeat(animation_batch_size, 1).cuda() + resulting_images_att, resulting_images_reg = self.G( + images_to_animate, targets_au) + + resulting_images = self.imFromAttReg( + resulting_images_att, resulting_images_reg, images_to_animate).cuda() + + save_images = - \ + torch.ones((animation_batch_size + 1) + * 2, 3, 128, 128).cuda() + + save_images[1:animation_batch_size+1] = images_to_animate + save_images[animation_batch_size+1] = input_images[target_idx] + save_images[animation_batch_size + + 2:(animation_batch_size + 1)*2] = resulting_images + + save_image((save_images+1)/2, os.path.join(self.animation_results_dir, + reference_expression_images[target_idx])) + + if mode == 'animate_image': + + black = np.zeros((1,3,128,128)) + black = torch.FloatTensor(black).to(self.device) + + pgd_attack = attacks.LinfPGDAttack(model=self.G, device=self.device) + + images_to_animate_path = sorted(glob.glob( + self.animation_images_dir + '/*')) + + for idx, image_path in enumerate(images_to_animate_path): + image_to_animate = regular_image_transform( + Image.open(image_path)).unsqueeze(0).cuda() + + all_images = torch.cat([regular_image_transform(Image.open(path)).unsqueeze(0) for path in images_to_animate_path], dim=0).cuda() + + for target_idx in range(targets.size(0)): + if target_idx == 0: + img = regular_image_transform(Image.open(images_to_animate_path[idx])).unsqueeze(0).cuda() + # x_adv, perturb = pgd_attack.perturb(img, black, targets[0, :].unsqueeze(0).cuda()) + x_adv, perturb = pgd_attack.perturb_iter_class(image_to_animate, black, targets[:, :].cuda()) + # _, perturb = pgd_attack.perturb_iter_data(image_to_animate, all_images, black, targets[68, :].unsqueeze(0).cuda()) + + targets_au = targets[target_idx, :].unsqueeze(0).cuda() + # x_adv, perturb = pgd_attack.perturb(image_to_animate, black, targets_au) + x_adv = image_to_animate + # print(image_to_animate.shape, x_adv.shape) + resulting_images_att, resulting_images_reg = self.G( + x_adv, targets_au) + resulting_image = self.imFromAttReg( + resulting_images_att, resulting_images_reg, x_adv).cuda() + + save_image((resulting_image+1)/2, os.path.join(self.animation_results_dir, + image_path.split('/')[-1].split('.')[0] + + '_' + reference_expression_images[target_idx])) + if target_idx == 0: + save_image((x_adv+1)/2, os.path.join(self.animation_results_dir, + image_path.split('/')[-1].split('.')[0] + + '_ref.jpg')) + + # """ Code to modify single Action Units """ + + # Set data loader. + # self.data_loader = self.data_loader + + # with torch.no_grad(): + # for i, (self.x_real, c_org) in enumerate(self.data_loader): + + # # Prepare input images and target domain labels. + # self.x_real = self.x_real.to(self.device) + # c_org = c_org.to(self.device) + + # # c_trg_list = self.create_labels(self.data_loader) + + # crit, cl_regression = self.D(self.x_real) + # # print(crit) + # print("ORIGINAL", c_org[0]) + # print("REGRESSION", cl_regression[0]) + + # for au in range(17): + # alpha = np.linspace(-0.3,0.3,10) + # for j, a in enumerate(alpha): + # new_emotion = c_org.clone() + # new_emotion[:,au]=torch.clamp(new_emotion[:,au]+a, 0, 1) + # attention, reg = self.G(self.x_real, new_emotion) + # x_fake = self.imFromAttReg(attention, reg, self.x_real) + # save_image((x_fake+1)/2, os.path.join(self.result_dir, '{}-{}-{}-images.jpg'.format(i,au,j))) + + # if i >= 3: + # break diff --git a/ganimation/utils.py b/ganimation/utils.py new file mode 100644 index 0000000..e9ac11d --- /dev/null +++ b/ganimation/utils.py @@ -0,0 +1,151 @@ +import torch +import torch.nn.functional as F +from tensorboardX import SummaryWriter + +from model import Generator +from model import Discriminator + +import os +import re + + +class Utils: + + def build_model(self): + """Create a generator and a discriminator.""" + self.G = Generator(self.g_conv_dim, self.c_dim, + self.g_repeat_num).to(self.device) + self.D = Discriminator( + self.image_size, self.d_conv_dim, self.c_dim, self.d_repeat_num).to(self.device) + + self.g_optimizer = torch.optim.Adam( + self.G.parameters(), self.g_lr, [self.beta1, self.beta2]) + self.d_optimizer = torch.optim.Adam( + self.D.parameters(), self.d_lr, [self.beta1, self.beta2]) + + # TODO: implement data parallelization for multiple gpus + # self.gpu_ids = torch.cuda.device_count() + # print("GPUS AVAILABLE: ", self.gpu_ids) + # if self.gpu_ids > 1: + # torch.nn.DataParallel(self.D, device_ids=list(range(self.gpu_ids))) + # torch.nn.DataParallel(self.G, device_ids=list(range(self.gpu_ids))) + + def build_tensorboard(self): + """Build a tensorboard logger.""" + from logger import Logger + self.logger = Logger(self.log_dir) + self.writer = SummaryWriter(logdir=self.log_dir) + + def smooth_loss(self, att): + return torch.mean(torch.mean(torch.abs(att[:, :, :, :-1] - att[:, :, :, 1:])) + + torch.mean(torch.abs(att[:, :, :-1, :] - att[:, :, 1:, :]))) + + def print_network(self, model, name): + """Print out the network information.""" + num_params = 0 + for p in model.parameters(): + num_params += p.numel() + print(model) + print(name) + print("The number of parameters: {}".format(num_params)) + + def update_lr(self, g_lr, d_lr): + """Decay learning rates of the generator and discriminator.""" + for param_group in self.g_optimizer.param_groups: + param_group['lr'] = g_lr + for param_group in self.d_optimizer.param_groups: + param_group['lr'] = d_lr + + def reset_grad(self): + """Reset the gradient buffers.""" + self.g_optimizer.zero_grad() + self.d_optimizer.zero_grad() + + def denorm(self, x): + """Convert the range from [-1, 1] to [0, 1].""" + out = (x + 1) / 2 + return out.clamp_(0, 1) + + def gradient_penalty(self, y, x): + """Compute gradient penalty: (L2_norm(dy/dx) - 1)**2.""" + weight = torch.ones(y.size()).to(self.device) + dydx = torch.autograd.grad(outputs=y, + inputs=x, + grad_outputs=weight, + retain_graph=True, + create_graph=True, + only_inputs=True)[0] + + dydx = dydx.view(dydx.size(0), -1) + dydx_l2norm = torch.sqrt(torch.sum(dydx**2, dim=1)) + return torch.mean((dydx_l2norm-1)**2) + + def imFromAttReg(self, att, reg, x_real): + """Mixes attention, color and real images""" + return (1-att)*reg + att*x_real + + def create_labels(self, data_iter): + """Return samples for visualization""" + x, c = [], [] + x_data, c_data = data_iter.next() + + for i in range(self.num_sample_targets): + x.append(x_data[i].repeat( + self.batch_size, 1, 1, 1).to(self.device)) + c.append(c_data[i].repeat(self.batch_size, 1).to(self.device)) + + return x, c + + def save_models(self, iteration, epoch): + try: # To avoid crashing on the first step + os.remove(os.path.join(self.model_save_dir, + '{}-{}-G.ckpt'.format(iteration+1-self.model_save_step, epoch))) + os.remove(os.path.join(self.model_save_dir, + '{}-{}-D.ckpt'.format(iteration+1-self.model_save_step, epoch))) + os.remove(os.path.join(self.model_save_dir, + '{}-{}-G_optim.ckpt'.format(iteration+1-self.model_save_step, epoch))) + os.remove(os.path.join(self.model_save_dir, + '{}-{}-D_optim.ckpt'.format(iteration+1-self.model_save_step, epoch))) + except: + pass + + G_path = os.path.join(self.model_save_dir, + '{}-{}-G.ckpt'.format(iteration+1, epoch)) + D_path = os.path.join(self.model_save_dir, + '{}-{}-D.ckpt'.format(iteration+1, epoch)) + torch.save(self.G.state_dict(), G_path) + torch.save(self.D.state_dict(), D_path) + + G_path_optim = os.path.join( + self.model_save_dir, '{}-{}-G_optim.ckpt'.format(iteration+1, epoch)) + D_path_optim = os.path.join( + self.model_save_dir, '{}-{}-D_optim.ckpt'.format(iteration+1, epoch)) + torch.save(self.g_optimizer.state_dict(), G_path_optim) + torch.save(self.d_optimizer.state_dict(), D_path_optim) + + print(f'Saved model checkpoints in {self.model_save_dir}...') + + def restore_model(self, resume_iters): + """Restore the trained generator and discriminator.""" + print('Loading the trained models from step {}-{}...'.format(resume_iters, self.first_epoch)) + G_path = os.path.join( + self.model_save_dir, '{}-{}-G.ckpt'.format(resume_iters, self.first_epoch)) + D_path = os.path.join( + self.model_save_dir, '{}-{}-D.ckpt'.format(resume_iters, self.first_epoch)) + self.G.load_state_dict(torch.load( + G_path, map_location=lambda storage, loc: storage)) + self.D.load_state_dict(torch.load( + D_path, map_location=lambda storage, loc: storage)) + + G_optim_path = os.path.join( + self.model_save_dir, '{}-{}-G_optim.ckpt'.format(resume_iters, self.first_epoch)) + D_optim_path = os.path.join( + self.model_save_dir, '{}-{}-D_optim.ckpt'.format(resume_iters, self.first_epoch)) + self.d_optimizer.load_state_dict(torch.load(D_optim_path)) + self.g_optimizer.load_state_dict(torch.load(G_optim_path)) + + def numericalSort(self, value): + numbers = re.compile(r'(\d+)') + parts = numbers.split(value) + parts[1::2] = map(int, parts[1::2]) + return parts diff --git a/ganimation/video_results/eric_andre.gif b/ganimation/video_results/eric_andre.gif new file mode 100644 index 0000000..5bd8ee1 Binary files /dev/null and b/ganimation/video_results/eric_andre.gif differ diff --git a/ganimation/video_results/frida.gif b/ganimation/video_results/frida.gif new file mode 100644 index 0000000..f84b54c Binary files /dev/null and b/ganimation/video_results/frida.gif differ diff --git a/ganimation/video_results/standard_celeba.avi b/ganimation/video_results/standard_celeba.avi new file mode 100644 index 0000000..6639cfe Binary files /dev/null and b/ganimation/video_results/standard_celeba.avi differ diff --git a/ganimation/video_results/standard_emotionet_.avi b/ganimation/video_results/standard_emotionet_.avi new file mode 100644 index 0000000..5bb78d3 Binary files /dev/null and b/ganimation/video_results/standard_emotionet_.avi differ diff --git a/ganimation/video_results/virtual-celeba.avi b/ganimation/video_results/virtual-celeba.avi new file mode 100644 index 0000000..ab41397 Binary files /dev/null and b/ganimation/video_results/virtual-celeba.avi differ diff --git a/ganimation/video_results/virtual_emotionet.avi b/ganimation/video_results/virtual_emotionet.avi new file mode 100644 index 0000000..f8bff33 Binary files /dev/null and b/ganimation/video_results/virtual_emotionet.avi differ diff --git a/pix2pixHD/.gitignore b/pix2pixHD/.gitignore new file mode 100755 index 0000000..681efd0 --- /dev/null +++ b/pix2pixHD/.gitignore @@ -0,0 +1,40 @@ +debug* +checkpoints/ +results/ +build/ +dist/ +torch.egg-info/ +*/**/__pycache__ +torch/version.py +torch/csrc/generic/TensorMethods.cpp +torch/lib/*.so* +torch/lib/*.dylib* +torch/lib/*.h +torch/lib/build +torch/lib/tmp_install +torch/lib/include +torch/lib/torch_shm_manager +torch/csrc/cudnn/cuDNN.cpp +torch/csrc/nn/THNN.cwrap +torch/csrc/nn/THNN.cpp +torch/csrc/nn/THCUNN.cwrap +torch/csrc/nn/THCUNN.cpp +torch/csrc/nn/THNN_generic.cwrap +torch/csrc/nn/THNN_generic.cpp +torch/csrc/nn/THNN_generic.h +docs/src/**/* +test/data/legacy_modules.t7 +test/data/gpu_tensors.pt +test/htmlcov +test/.coverage +*/*.pyc +*/**/*.pyc +*/**/**/*.pyc +*/**/**/**/*.pyc +*/**/**/**/**/*.pyc +*/*.so* +*/**/*.so* +*/**/*.dylib* +test/data/legacy_serialized.pt +*.DS_Store +*~ diff --git a/pix2pixHD/.ipynb_checkpoints/avspeech_dataload-checkpoint.ipynb b/pix2pixHD/.ipynb_checkpoints/avspeech_dataload-checkpoint.ipynb new file mode 100644 index 0000000..4fcecfd --- /dev/null +++ b/pix2pixHD/.ipynb_checkpoints/avspeech_dataload-checkpoint.ipynb @@ -0,0 +1,206 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 370, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "import numpy as np\n", + "from matplotlib import pyplot as plt\n", + "from PIL import Image\n", + "import cv2\n", + "import sys\n", + "import data.landmarks as landmarks" + ] + }, + { + "cell_type": "code", + "execution_count": 371, + "metadata": {}, + "outputs": [], + "source": [ + "# Example\n", + "ref_frame = 40\n", + "tgt_frame = 50\n", + "ref_img = Image.open('datasets/avspeech/frames/iUBL2Vowiulk/{}.png'.format(ref_frame))\n", + "tgt_img = Image.open('datasets/avspeech/frames/iUBL2Vowiulk/{}.png'.format(tgt_frame))\n", + "meta = dict(np.load('datasets/avspeech/meta/iUBL2Vowiulk.npz'))" + ] + }, + { + "cell_type": "code", + "execution_count": 372, + "metadata": {}, + "outputs": [], + "source": [ + "def get_relative_landmarks(meta, frame_num):\n", + " centerx, centery, l = meta['bbox'][frame_num - 1]\n", + " orig_height = meta['length'].item()\n", + " orig_width = meta['width'].item()\n", + " landmarks = meta['landmarks_2d'][frame_num - 1]\n", + " new_landmarks = landmarks.copy()\n", + " \n", + " # Go from frame landmarks to cropped and resized frame landmarks\n", + " x_left = max(0, centerx-l)\n", + " x_right = min(centerx+l, orig_height)\n", + " y_up = max(0, centery-l)\n", + " y_down = min(centery+l, orig_width)\n", + " w = x_right - x_left\n", + " h = y_down - y_up\n", + " ar_h = 255. / h\n", + " ar_w = 255. / w\n", + "\n", + " new_landmarks[:,0] -= (centery - l)\n", + " new_landmarks[:,1] -= (centerx - l)\n", + " new_landmarks[:,0] *= ar_h\n", + " new_landmarks[:,1] *= ar_w\n", + " \n", + " return new_landmarks" + ] + }, + { + "cell_type": "code", + "execution_count": 395, + "metadata": {}, + "outputs": [], + "source": [ + "def plot_landmarks(frame, landmarks):\n", + " fig = plt.figure(figsize=(256, 256), dpi=1)\n", + " ax = fig.add_subplot(111)\n", + " ax.axis('off')\n", + "# plt.imshow(frame)\n", + " plt.imshow(np.ones((256, 256, 3)))\n", + " plt.subplots_adjust(left=0, right=1, top=1, bottom=0)\n", + " \n", + " lw = 100\n", + "\n", + " # Head\n", + " ax.plot(landmarks[0:17, 0], landmarks[0:17, 1], linestyle='-', color='green', lw=lw)\n", + " # Eyebrows\n", + " ax.plot(landmarks[17:22, 0], landmarks[17:22, 1], linestyle='-', color='orange', lw=lw)\n", + " ax.plot(landmarks[22:27, 0], landmarks[22:27, 1], linestyle='-', color='orange', lw=lw)\n", + " # Nose\n", + " ax.plot(landmarks[27:31, 0], landmarks[27:31, 1], linestyle='-', color='blue', lw=lw)\n", + " ax.plot(landmarks[31:36, 0], landmarks[31:36, 1], linestyle='-', color='blue', lw=lw)\n", + " # Eyes\n", + " ax.plot(landmarks[36:42, 0], landmarks[36:42, 1], linestyle='-', color='red', lw=lw)\n", + " ax.plot(landmarks[42:48, 0], landmarks[42:48, 1], linestyle='-', color='red', lw=lw)\n", + " ax.plot([landmarks[36, 0], landmarks[41, 0]], [landmarks[36, 1], landmarks[41, 1]], \n", + " linestyle='-', color='red', lw=lw)\n", + " ax.plot([landmarks[42, 0], landmarks[47, 0]], [landmarks[42, 1], landmarks[47, 1]], \n", + " linestyle='-', color='red', lw=lw)\n", + " # Mouth\n", + " ax.plot(landmarks[48:60, 0], landmarks[48:60, 1], linestyle='-', color='purple', lw=lw)\n", + " ax.plot([landmarks[48, 0], landmarks[59, 0]], [landmarks[48, 1], landmarks[59, 1]], \n", + " linestyle='-', color='purple', lw=lw)\n", + "\n", + " fig.canvas.draw()\n", + " data = Image.frombuffer('RGB', fig.canvas.get_width_height(), fig.canvas.tostring_rgb(), 'raw', 'RGB', 0, 1)\n", + "# data = data.rotate(180)\n", + " plt.close(fig)\n", + " return data" + ] + }, + { + "cell_type": "code", + "execution_count": 396, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 396, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAD8CAYAAACVSwr3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAfnklEQVR4nO3dd3wUdf7H8dcnIfQgBAKGEECKiqi0AFLEgqDiHaAnIJ6gnB6eh9g96+8E9fydigWUO8WGcioiooCACvgDpUrAUCI1SAk19FAkkHx+f8zmjEwggczu7Caf5+Oxj00ms7NvlvBmyndmRFUxxpj8ovwOYIwJP1YMxhgXKwZjjIsVgzHGxYrBGONixWCMcQlaMYjINSKyWkTWicijwXofY4z3JBjjGEQkGlgDdAEygEVAX1X9yfM3M8Z4LlhrDG2Adaq6XlWzgbFAjyC9lzHGY2WCtNxEYHO+7zOAtiebuUaNGlq/fv0gRTHGACxevHiXqsYXZd5gFYMUMO032ywiMhAYCFC3bl1SUlKCFMUYAyAiG4s6b7A2JTKApHzf1wG25p9BVUeparKqJsfHF6nEjDEhEqxiWAQ0FpFzRKQscBMwKUjvZYzxWFA2JVT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zHcgmwMAyyDgEeKmDeCwK/B+WAcwK/H9EhypkAtAx8HQusCeQJq8/1FDk9+0z9XmNoA6xT1fWqmg2MxTltO9z1AN4PfP0+0DPUAVT1O2DPCZNPlqsH8IE6FgBVTxjSHlQnyXoyvp22rye/xEBYfa6nyHkyp/2Z+l0MRTpF22cKfCMii0VkYGBaLVXdBs5fElDTt3S/dbJc4fo5n/Fp+8F2wiUGwvZz9fJSCPn5XQxFOkXbZx1UtSVwLTBIRDr5HegMhOPnXKzT9oOpgEsMnHTWAqaFLKvXl0LIz+9iCPtTtFV1a+B5J/A5zirYjrxVxsDzTv8S/sbJcoXd56xhetp+QZcYIAw/12BfCsHvYlgENBaRc0SkLM61Iif5nOm/RKRS4DqXiEgloCvO6eWTgFsDs90KTPQnocvJck0C+gf2ol8C7M9bNfZLOJ62f7JLDBBmn+vJcnr6mYZiL2ohe1i74exVTQee8DvPCdka4OzNXQqk5eUDqgMzgbWB5zgfsn2Ms7p4DOd/hNtPlgtnVXJk4DNeDiSHQdYxgSzLAr+4CfnmfyKQdTVwbQhzdsRZxV4GpAYe3cLtcz1FTs8+Uxv5aIxx8XtTwhgThqwYjDEuVgzGGBcrBmOMixWDMcbFisEY42LFYIxxsWIwxrj8P2IEZl12Gb60AAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(plot_landmarks(ref_img, get_relative_landmarks(meta, ref_frame)))" + ] + }, + { + "cell_type": "code", + "execution_count": 346, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 346, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAD8CAYAAACVSwr3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLj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/zLwo/mwHwX+/qvp4bV2U79+GfjzGUX/08CFzinzr6Qd2OKHaft/VkSWIvLdvGTa/ifUp6MUA9yycb2pn5/omH4rUNQPQVh/GENVfw/4K6+6Pwd9+x4Mzf3HwO+U/gFvAv8I+Gf55xuvoG//PaYuTtiO8GM39QtTJf+bPMa/BfzJW9DX/zb35TfzxP1sc/xfyX39XeCHvoX9/FcwFfs3gS/lfz9828b1A/r5iY3pXeTjXbtrd+1ae9WmxF27a3ftFrY7wXDX7tpdu9buBMNdu2t37Vq7Ewx37a7dtWvtTjDctbt21661O8Fw1+7aXbvW7gTDXbtrd+1auxMMd+2u3bVr7f8HyDV1kjKzbuMAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(ref_img)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/pix2pixHD/LICENSE.txt b/pix2pixHD/LICENSE.txt new file mode 100755 index 0000000..091b42f --- /dev/null +++ b/pix2pixHD/LICENSE.txt @@ -0,0 +1,45 @@ +Copyright (C) 2019 NVIDIA Corporation. Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu. +BSD License. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------------------- LICENSE FOR pytorch-CycleGAN-and-pix2pix ---------------- +Copyright (c) 2017, Jun-Yan Zhu and Taesung Park +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pix2pixHD/README.md b/pix2pixHD/README.md new file mode 100755 index 0000000..7c3315c --- /dev/null +++ b/pix2pixHD/README.md @@ -0,0 +1,144 @@ + + +



+ +# pix2pixHD +### [Project](https://tcwang0509.github.io/pix2pixHD/) | [Youtube](https://youtu.be/3AIpPlzM_qs) | [Paper](https://arxiv.org/pdf/1711.11585.pdf)
+Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic image-to-image translation. It can be used for turning semantic label maps into photo-realistic images or synthesizing portraits from face label maps.

+[High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs](https://tcwang0509.github.io/pix2pixHD/) + [Ting-Chun Wang](https://tcwang0509.github.io/)1, [Ming-Yu Liu](http://mingyuliu.net/)1, [Jun-Yan Zhu](http://people.eecs.berkeley.edu/~junyanz/)2, Andrew Tao1, [Jan Kautz](http://jankautz.com/)1, [Bryan Catanzaro](http://catanzaro.name/)1 + 1NVIDIA Corporation, 2UC Berkeley + In CVPR 2018. + +## Image-to-image translation at 2k/1k resolution +- Our label-to-streetview results +

+ + +

+- Interactive editing results +

+ + +

+- Additional streetview results +

+ + +

+

+ + +

+ +- Label-to-face and interactive editing results +

+ + + +

+

+ + + +

+ +- Our editing interface +

+ + +

+ +## Prerequisites +- Linux or macOS +- Python 2 or 3 +- NVIDIA GPU (11G memory or larger) + CUDA cuDNN + +## Getting Started +### Installation +- Install PyTorch and dependencies from http://pytorch.org +- Install python libraries [dominate](https://github.com/Knio/dominate). +```bash +pip install dominate +``` +- Clone this repo: +```bash +git clone https://github.com/NVIDIA/pix2pixHD +cd pix2pixHD +``` + + +### Testing +- A few example Cityscapes test images are included in the `datasets` folder. +- Please download the pre-trained Cityscapes model from [here](https://drive.google.com/file/d/1h9SykUnuZul7J3Nbms2QGH1wa85nbN2-/view?usp=sharing) (google drive link), and put it under `./checkpoints/label2city_1024p/` +- Test the model (`bash ./scripts/test_1024p.sh`): +```bash +#!./scripts/test_1024p.sh +python test.py --name label2city_1024p --netG local --ngf 32 --resize_or_crop none +``` +The test results will be saved to a html file here: `./results/label2city_1024p/test_latest/index.html`. + +More example scripts can be found in the `scripts` directory. + + +### Dataset +- We use the Cityscapes dataset. To train a model on the full dataset, please download it from the [official website](https://www.cityscapes-dataset.com/) (registration required). +After downloading, please put it under the `datasets` folder in the same way the example images are provided. + + +### Training +- Train a model at 1024 x 512 resolution (`bash ./scripts/train_512p.sh`): +```bash +#!./scripts/train_512p.sh +python train.py --name label2city_512p +``` +- To view training results, please checkout intermediate results in `./checkpoints/label2city_512p/web/index.html`. +If you have tensorflow installed, you can see tensorboard logs in `./checkpoints/label2city_512p/logs` by adding `--tf_log` to the training scripts. + +### Multi-GPU training +- Train a model using multiple GPUs (`bash ./scripts/train_512p_multigpu.sh`): +```bash +#!./scripts/train_512p_multigpu.sh +python train.py --name label2city_512p --batchSize 8 --gpu_ids 0,1,2,3,4,5,6,7 +``` +Note: this is not tested and we trained our model using single GPU only. Please use at your own discretion. + +### Training with Automatic Mixed Precision (AMP) for faster speed +- To train with mixed precision support, please first install apex from: https://github.com/NVIDIA/apex +- You can then train the model by adding `--fp16`. For example, +```bash +#!./scripts/train_512p_fp16.sh +python -m torch.distributed.launch train.py --name label2city_512p --fp16 +``` +In our test case, it trains about 80% faster with AMP on a Volta machine. + +### Training at full resolution +- To train the images at full resolution (2048 x 1024) requires a GPU with 24G memory (`bash ./scripts/train_1024p_24G.sh`), or 16G memory if using mixed precision (AMP). +- If only GPUs with 12G memory are available, please use the 12G script (`bash ./scripts/train_1024p_12G.sh`), which will crop the images during training. Performance is not guaranteed using this script. + +### Training with your own dataset +- If you want to train with your own dataset, please generate label maps which are one-channel whose pixel values correspond to the object labels (i.e. 0,1,...,N-1, where N is the number of labels). This is because we need to generate one-hot vectors from the label maps. Please also specity `--label_nc N` during both training and testing. +- If your input is not a label map, please just specify `--label_nc 0` which will directly use the RGB colors as input. The folders should then be named `train_A`, `train_B` instead of `train_label`, `train_img`, where the goal is to translate images from A to B. +- If you don't have instance maps or don't want to use them, please specify `--no_instance`. +- The default setting for preprocessing is `scale_width`, which will scale the width of all training images to `opt.loadSize` (1024) while keeping the aspect ratio. If you want a different setting, please change it by using the `--resize_or_crop` option. For example, `scale_width_and_crop` first resizes the image to have width `opt.loadSize` and then does random cropping of size `(opt.fineSize, opt.fineSize)`. `crop` skips the resizing step and only performs random cropping. If you don't want any preprocessing, please specify `none`, which will do nothing other than making sure the image is divisible by 32. + +## More Training/Test Details +- Flags: see `options/train_options.py` and `options/base_options.py` for all the training flags; see `options/test_options.py` and `options/base_options.py` for all the test flags. +- Instance map: we take in both label maps and instance maps as input. If you don't want to use instance maps, please specify the flag `--no_instance`. + + +## Citation + +If you find this useful for your research, please use the following. + +``` +@inproceedings{wang2018pix2pixHD, + title={High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs}, + author={Ting-Chun Wang and Ming-Yu Liu and Jun-Yan Zhu and Andrew Tao and Jan Kautz and Bryan Catanzaro}, + booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition}, + year={2018} +} +``` + +## Acknowledgments +This code borrows heavily from [pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix). diff --git a/pix2pixHD/_config.yml b/pix2pixHD/_config.yml new file mode 100755 index 0000000..2f7efbe --- /dev/null +++ b/pix2pixHD/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file diff --git a/pix2pixHD/avspeech_dataload.ipynb b/pix2pixHD/avspeech_dataload.ipynb new file mode 100644 index 0000000..f8a2540 --- /dev/null +++ b/pix2pixHD/avspeech_dataload.ipynb @@ -0,0 +1,204 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 370, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "import numpy as np\n", + "from matplotlib import pyplot as plt\n", + "from PIL import Image\n", + "import cv2\n", + "import sys\n", + "import data.landmarks as landmarks" + ] + }, + { + "cell_type": "code", + "execution_count": 371, + "metadata": {}, + "outputs": [], + "source": [ + "# Example\n", + "ref_frame = 40\n", + "tgt_frame = 50\n", + "ref_img = Image.open('datasets/avspeech/frames/iUBL2Vowiulk/{}.png'.format(ref_frame))\n", + "tgt_img = Image.open('datasets/avspeech/frames/iUBL2Vowiulk/{}.png'.format(tgt_frame))\n", + "meta = dict(np.load('datasets/avspeech/meta/iUBL2Vowiulk.npz'))" + ] + }, + { + "cell_type": "code", + "execution_count": 372, + "metadata": {}, + "outputs": [], + "source": [ + "def get_relative_landmarks(meta, frame_num):\n", + " centerx, centery, l = meta['bbox'][frame_num - 1]\n", + " orig_height = meta['length'].item()\n", + " orig_width = meta['width'].item()\n", + " landmarks = meta['landmarks_2d'][frame_num - 1]\n", + " new_landmarks = landmarks.copy()\n", + " \n", + " # Go from frame landmarks to cropped and resized frame landmarks\n", + " x_left = max(0, centerx-l)\n", + " x_right = min(centerx+l, orig_height)\n", + " y_up = max(0, centery-l)\n", + " y_down = min(centery+l, orig_width)\n", + " w = x_right - x_left\n", + " h = y_down - y_up\n", + " ar_h = 255. / h\n", + " ar_w = 255. / w\n", + "\n", + " new_landmarks[:,0] -= (centery - l)\n", + " new_landmarks[:,1] -= (centerx - l)\n", + " new_landmarks[:,0] *= ar_h\n", + " new_landmarks[:,1] *= ar_w\n", + " \n", + " return new_landmarks" + ] + }, + { + "cell_type": "code", + "execution_count": 397, + "metadata": {}, + "outputs": [], + "source": [ + "def plot_landmarks(landmarks):\n", + " fig = plt.figure(figsize=(256, 256), dpi=1)\n", + " ax = fig.add_subplot(111)\n", + " ax.axis('off')\n", + " plt.imshow(np.ones((256, 256, 3)))\n", + " plt.subplots_adjust(left=0, right=1, top=1, bottom=0)\n", + " \n", + " lw = 100\n", + "\n", + " # Head\n", + " ax.plot(landmarks[0:17, 0], landmarks[0:17, 1], linestyle='-', color='green', lw=lw)\n", + " # Eyebrows\n", + " ax.plot(landmarks[17:22, 0], landmarks[17:22, 1], linestyle='-', color='orange', lw=lw)\n", + " ax.plot(landmarks[22:27, 0], landmarks[22:27, 1], linestyle='-', color='orange', lw=lw)\n", + " # Nose\n", + " ax.plot(landmarks[27:31, 0], landmarks[27:31, 1], linestyle='-', color='blue', lw=lw)\n", + " ax.plot(landmarks[31:36, 0], landmarks[31:36, 1], linestyle='-', color='blue', lw=lw)\n", + " # Eyes\n", + " ax.plot(landmarks[36:42, 0], landmarks[36:42, 1], linestyle='-', color='red', lw=lw)\n", + " ax.plot(landmarks[42:48, 0], landmarks[42:48, 1], linestyle='-', color='red', lw=lw)\n", + " ax.plot([landmarks[36, 0], landmarks[41, 0]], [landmarks[36, 1], landmarks[41, 1]], \n", + " linestyle='-', color='red', lw=lw)\n", + " ax.plot([landmarks[42, 0], landmarks[47, 0]], [landmarks[42, 1], landmarks[47, 1]], \n", + " linestyle='-', color='red', lw=lw)\n", + " # Mouth\n", + " ax.plot(landmarks[48:60, 0], landmarks[48:60, 1], linestyle='-', color='purple', lw=lw)\n", + " ax.plot([landmarks[48, 0], landmarks[59, 0]], [landmarks[48, 1], landmarks[59, 1]], \n", + " linestyle='-', color='purple', lw=lw)\n", + "\n", + " fig.canvas.draw()\n", + " data = Image.frombuffer('RGB', fig.canvas.get_width_height(), fig.canvas.tostring_rgb(), 'raw', 'RGB', 0, 1)\n", + " plt.close(fig)\n", + " return data" + ] + }, + { + "cell_type": "code", + "execution_count": 398, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 398, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAD8CAYAAACVSwr3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAfnklE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GBcrBmOMixWDMcbFisEY42LFYIxxsWIwxrj8P2IEZl12Gb60AAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(plot_landmarks(get_relative_landmarks(meta, ref_frame)))" + ] + }, + { + "cell_type": "code", + "execution_count": 399, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 399, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAD8CAYAAACVSwr3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOy9S7BlyXWe963M3K9z7q1b1dUPNAACaIAkKIEMEhRJkaIclCwywo6wTNmOcEjUxCOOPJEn1tCeeWBHeEoOHOHHwB55ZJHUIyx5RFpkEwySsswH0GCjH+hXVd17zz1n752Zy4OVufe+Vd1UtwnYhYhK4Hbdx3nsszNzrX/9618rRVV5Np6NZ+PZ2A73//cFPBvPxrPx9I1nhuHZeDaejSfGM8PwbDwbz8YT45lheDaejWfjifHMMDwbz8az8cR4ZhiejWfj2XhifNcMg4j8OyLyf4vIn4jIP/xuvc+z8Ww8G9/5Id8NHYOIeOCPgF8AvgX8S+Dvqeq/+o6/2bPxbDwb3/Hx3UIMPwX8iap+XVUn4H8GfvG79F7PxrPxbHyHR/guve5ngNc3P38L+Ksf9eCu6/Ts7AwRh4gAIPWP5RtV+4+iy/e5fBnq0VuPKf/HXs5exDl7/foedeSc1x9UQQQngqqimsm5oioFZLk2u5b1q76nE8E5jzh7Oc3Zrqk82x6qaN5cO/A4eqs/2vUq65/1ic/w+HPW612e8cRjn/hNvVcfhSJl+48sr7+9luU7pdxrQITbj9i8v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xMX7XG8KeAr6jqV1V1BH4JS9u+7e1HgF/Iv/8C8G99qzugqv8n8OLg45v69SPAL6q1XwEei8hnvzU9vbGvN7Watq+qXwNK2v4feVPVd1X1N/LvV0ChGLhV4/oB/bypfeQxfdWC4XPA15u/j6Zov+KmwP8qIr8ulioO8GnNeSL556deWe/22039uq3j/JNZBf9bjTl2K/oqIt/FTDFwa8f1oJ/wCY3pqxYML5Wi/YrbD6rqDwA/BPyEiPyZV92hj9Fu4zj/PPAvAn8cIwL66/nzV95XOaAY+KBDj3z2LevrkX5+YmP6qgXDR07R/lY3VX0n/3wC/I+YCvZ+URnzzyevrod77aZ+3bpxVtX3VTWqZRb9DWbV9pX2VY5QDHALx/VYPz/JMX3VguH/Bb5PRL5bRBYYV+Qvv+I+1SYi98V4LhGR+8C/jqWX/zLwo/mwHwX+/qvp4bV2U79+GfjzGUX/08CFzinzr6Qd2OKHaft/VkSWIvLdvGTa/ifUp6MUA9yycb2pn5/omH4rUNQPQVh/GENVfw/4K6+6Pwd9+x4Mzf3HwO+U/gFvAv8I+Gf55xuvoG//PaYuTtiO8GM39QtTJf+bPMa/BfzJW9DX/zb35TfzxP1sc/xfyX39XeCHvoX9/FcwFfs3gS/lfz9828b1A/r5iY3pXeTjXbtrd+1ae9WmxF27a3ftFrY7wXDX7tpdu9buBMNdu2t37Vq7Ewx37a7dtWvtTjDctbt21661O8Fw1+7aXbvW7gTDXbtrd+1auxMMd+2u3bVr7f8HyDV1kjKzbuMAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(ref_img)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/pix2pixHD/checkpoints b/pix2pixHD/checkpoints new file mode 120000 index 0000000..5c90d1e --- /dev/null +++ b/pix2pixHD/checkpoints @@ -0,0 +1 @@ +/scratch2/fsynth/checkpoints \ No newline at end of file diff --git a/pix2pixHD/data/__init__.py b/pix2pixHD/data/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/pix2pixHD/data/aligned_dataset.py b/pix2pixHD/data/aligned_dataset.py new file mode 100755 index 0000000..29785c1 --- /dev/null +++ b/pix2pixHD/data/aligned_dataset.py @@ -0,0 +1,76 @@ +import os.path +from data.base_dataset import BaseDataset, get_params, get_transform, normalize +from data.image_folder import make_dataset +from PIL import Image + +class AlignedDataset(BaseDataset): + def initialize(self, opt): + self.opt = opt + self.root = opt.dataroot + + ### input A (label maps) + dir_A = '_A' if self.opt.label_nc == 0 else '_label' + self.dir_A = os.path.join(opt.dataroot, opt.phase + dir_A) + self.A_paths = sorted(make_dataset(self.dir_A)) + + ### input B (real images) + if opt.isTrain or opt.use_encoded_image: + dir_B = '_B' if self.opt.label_nc == 0 else '_img' + self.dir_B = os.path.join(opt.dataroot, opt.phase + dir_B) + self.B_paths = sorted(make_dataset(self.dir_B)) + + ### instance maps + if not opt.no_instance: + self.dir_inst = os.path.join(opt.dataroot, opt.phase + '_inst') + self.inst_paths = sorted(make_dataset(self.dir_inst)) + + ### load precomputed instance-wise encoded features + if opt.load_features: + self.dir_feat = os.path.join(opt.dataroot, opt.phase + '_feat') + print('----------- loading features from %s ----------' % self.dir_feat) + self.feat_paths = sorted(make_dataset(self.dir_feat)) + + self.dataset_size = len(self.A_paths) + + def __getitem__(self, index): + ### input A (label maps) + A_path = self.A_paths[index] + A = Image.open(A_path) + params = get_params(self.opt, A.size) + if self.opt.label_nc == 0: + transform_A = get_transform(self.opt, params) + A_tensor = transform_A(A.convert('RGB')) + else: + transform_A = get_transform(self.opt, params, method=Image.NEAREST, normalize=False) + A_tensor = transform_A(A) * 255.0 + + B_tensor = inst_tensor = feat_tensor = 0 + ### input B (real images) + if self.opt.isTrain or self.opt.use_encoded_image: + B_path = self.B_paths[index] + B = Image.open(B_path).convert('RGB') + transform_B = get_transform(self.opt, params) + B_tensor = transform_B(B) + + ### if using instance maps + if not self.opt.no_instance: + inst_path = self.inst_paths[index] + inst = Image.open(inst_path) + inst_tensor = transform_A(inst) + + if self.opt.load_features: + feat_path = self.feat_paths[index] + feat = Image.open(feat_path).convert('RGB') + norm = normalize() + feat_tensor = norm(transform_A(feat)) + + input_dict = {'label': A_tensor, 'inst': inst_tensor, 'image': B_tensor, + 'feat': feat_tensor, 'path': A_path} + + return input_dict + + def __len__(self): + return len(self.A_paths) // self.opt.batchSize * self.opt.batchSize + + def name(self): + return 'AlignedDataset' \ No newline at end of file diff --git a/pix2pixHD/data/avspeech.py b/pix2pixHD/data/avspeech.py new file mode 100644 index 0000000..b4bd7ef --- /dev/null +++ b/pix2pixHD/data/avspeech.py @@ -0,0 +1,51 @@ +import os +import numpy as np +from matplotlib import pyplot as plt +from PIL import Image +from data import landmarks +from torchvision import transforms +from torch.utils.data.dataset import Dataset +import glob +import random + +class AVSpeech(Dataset): + def __init__(self, transform): + self.frame_folder = 'datasets/avspeech/frames' + self.meta_folder = 'datasets/avspeech/meta' + self.user_folders = glob.glob(os.path.join(self.frame_folder, '*')) + self.users = [x.split('/')[-1] for x in self.user_folders] + + self.transform = transform + + self.length = len(self.users) + + def __getitem__(self, index): + # Get list of frames for user + user = self.users[index] + meta = dict(np.load(os.path.join(self.meta_folder, '{}.npz'.format(user)))) + + frame_list = glob.glob(os.path.join(self.frame_folder, '{}/*.png'.format(user))) + frame_list = [int(x.split('/')[-1].split('.')[0]) for x in frame_list] + + ref_frame = random.choice(frame_list) + tgt_frame = random.choice(frame_list) + + ref_img = Image.open(os.path.join(self.frame_folder, '{}/{}.png'.format(user, ref_frame))) + tgt_img = Image.open(os.path.join(self.frame_folder, '{}/{}.png'.format(user, tgt_frame))) + + # Make reference and target landmarks + ref_lnd = landmarks.plot_landmarks(landmarks.get_relative_landmarks(meta, ref_frame)) + tgt_lnd = landmarks.plot_landmarks(landmarks.get_relative_landmarks(meta, tgt_frame)) + + ref_img = self.transform(ref_img) + tgt_img = self.transform(tgt_img) + ref_lnd = self.transform(ref_lnd) + tgt_lnd = self.transform(tgt_lnd) + + input_dict = {'ref_img': ref_img, 'tgt_img': tgt_img, 'ref_lnd': ref_lnd, + 'tgt_lnd': tgt_lnd, 'user': user} + + return input_dict + + def __len__(self): + return self.length \ No newline at end of file diff --git a/pix2pixHD/data/base_data_loader.py b/pix2pixHD/data/base_data_loader.py new file mode 100755 index 0000000..0e1deb5 --- /dev/null +++ b/pix2pixHD/data/base_data_loader.py @@ -0,0 +1,14 @@ + +class BaseDataLoader(): + def __init__(self): + pass + + def initialize(self, opt): + self.opt = opt + pass + + def load_data(): + return None + + + diff --git a/pix2pixHD/data/base_dataset.py b/pix2pixHD/data/base_dataset.py new file mode 100755 index 0000000..ece8813 --- /dev/null +++ b/pix2pixHD/data/base_dataset.py @@ -0,0 +1,90 @@ +import torch.utils.data as data +from PIL import Image +import torchvision.transforms as transforms +import numpy as np +import random + +class BaseDataset(data.Dataset): + def __init__(self): + super(BaseDataset, self).__init__() + + def name(self): + return 'BaseDataset' + + def initialize(self, opt): + pass + +def get_params(opt, size): + w, h = size + new_h = h + new_w = w + if opt.resize_or_crop == 'resize_and_crop': + new_h = new_w = opt.loadSize + elif opt.resize_or_crop == 'scale_width_and_crop': + new_w = opt.loadSize + new_h = opt.loadSize * h // w + + x = random.randint(0, np.maximum(0, new_w - opt.fineSize)) + y = random.randint(0, np.maximum(0, new_h - opt.fineSize)) + + flip = random.random() > 0.5 + return {'crop_pos': (x, y), 'flip': flip} + +def get_transform(opt, params, method=Image.BICUBIC, normalize=True): + transform_list = [] + if 'resize' in opt.resize_or_crop: + osize = [opt.loadSize, opt.loadSize] + transform_list.append(transforms.Scale(osize, method)) + elif 'scale_width' in opt.resize_or_crop: + transform_list.append(transforms.Lambda(lambda img: __scale_width(img, opt.loadSize, method))) + + if 'crop' in opt.resize_or_crop: + transform_list.append(transforms.Lambda(lambda img: __crop(img, params['crop_pos'], opt.fineSize))) + + if opt.resize_or_crop == 'none': + base = float(2 ** opt.n_downsample_global) + if opt.netG == 'local': + base *= (2 ** opt.n_local_enhancers) + transform_list.append(transforms.Lambda(lambda img: __make_power_2(img, base, method))) + + if opt.isTrain and not opt.no_flip: + transform_list.append(transforms.Lambda(lambda img: __flip(img, params['flip']))) + + transform_list += [transforms.ToTensor()] + + if normalize: + transform_list += [transforms.Normalize((0.5, 0.5, 0.5), + (0.5, 0.5, 0.5))] + return transforms.Compose(transform_list) + +def normalize(): + return transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)) + +def __make_power_2(img, base, method=Image.BICUBIC): + ow, oh = img.size + h = int(round(oh / base) * base) + w = int(round(ow / base) * base) + if (h == oh) and (w == ow): + return img + return img.resize((w, h), method) + +def __scale_width(img, target_width, method=Image.BICUBIC): + ow, oh = img.size + if (ow == target_width): + return img + w = target_width + h = int(target_width * oh / ow) + return img.resize((w, h), method) + +def __crop(img, pos, size): + ow, oh = img.size + x1, y1 = pos + tw = th = size + if (ow > tw or oh > th): + return img.crop((x1, y1, x1 + tw, y1 + th)) + return img + +def __flip(img, flip): + if flip: + return img.transpose(Image.FLIP_LEFT_RIGHT) + return img diff --git a/pix2pixHD/data/custom_dataset_data_loader.py b/pix2pixHD/data/custom_dataset_data_loader.py new file mode 100755 index 0000000..0b98254 --- /dev/null +++ b/pix2pixHD/data/custom_dataset_data_loader.py @@ -0,0 +1,31 @@ +import torch.utils.data +from data.base_data_loader import BaseDataLoader + + +def CreateDataset(opt): + dataset = None + from data.aligned_dataset import AlignedDataset + dataset = AlignedDataset() + + print("dataset [%s] was created" % (dataset.name())) + dataset.initialize(opt) + return dataset + +class CustomDatasetDataLoader(BaseDataLoader): + def name(self): + return 'CustomDatasetDataLoader' + + def initialize(self, opt): + BaseDataLoader.initialize(self, opt) + self.dataset = CreateDataset(opt) + self.dataloader = torch.utils.data.DataLoader( + self.dataset, + batch_size=opt.batchSize, + shuffle=not opt.serial_batches, + num_workers=int(opt.nThreads)) + + def load_data(self): + return self.dataloader + + def __len__(self): + return min(len(self.dataset), self.opt.max_dataset_size) diff --git a/pix2pixHD/data/data_loader.py b/pix2pixHD/data/data_loader.py new file mode 100755 index 0000000..2a4433a --- /dev/null +++ b/pix2pixHD/data/data_loader.py @@ -0,0 +1,7 @@ + +def CreateDataLoader(opt): + from data.custom_dataset_data_loader import CustomDatasetDataLoader + data_loader = CustomDatasetDataLoader() + print(data_loader.name()) + data_loader.initialize(opt) + return data_loader diff --git a/pix2pixHD/data/image_folder.py b/pix2pixHD/data/image_folder.py new file mode 100755 index 0000000..df0141f --- /dev/null +++ b/pix2pixHD/data/image_folder.py @@ -0,0 +1,65 @@ +############################################################################### +# Code from +# https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py +# Modified the original code so that it also loads images from the current +# directory as well as the subdirectories +############################################################################### +import torch.utils.data as data +from PIL import Image +import os + +IMG_EXTENSIONS = [ + '.jpg', '.JPG', '.jpeg', '.JPEG', + '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', '.tiff' +] + + +def is_image_file(filename): + return any(filename.endswith(extension) for extension in IMG_EXTENSIONS) + + +def make_dataset(dir): + images = [] + assert os.path.isdir(dir), '%s is not a valid directory' % dir + + for root, _, fnames in sorted(os.walk(dir)): + for fname in fnames: + if is_image_file(fname): + path = os.path.join(root, fname) + images.append(path) + + return images + + +def default_loader(path): + return Image.open(path).convert('RGB') + + +class ImageFolder(data.Dataset): + + def __init__(self, root, transform=None, return_paths=False, + loader=default_loader): + imgs = make_dataset(root) + if len(imgs) == 0: + raise(RuntimeError("Found 0 images in: " + root + "\n" + "Supported image extensions are: " + + ",".join(IMG_EXTENSIONS))) + + self.root = root + self.imgs = imgs + self.transform = transform + self.return_paths = return_paths + self.loader = loader + + def __getitem__(self, index): + path = self.imgs[index] + img = self.loader(path) + if self.transform is not None: + img = self.transform(img) + if self.return_paths: + return img, path + else: + return img + + def __len__(self): + return len(self.imgs) diff --git a/pix2pixHD/data/landmarks.py b/pix2pixHD/data/landmarks.py new file mode 100644 index 0000000..0e2544a --- /dev/null +++ b/pix2pixHD/data/landmarks.py @@ -0,0 +1,61 @@ +import cv2 +from matplotlib import pyplot as plt +from PIL import Image +import numpy as np + +def get_relative_landmarks(meta, frame_num): + centerx, centery, l = meta['bbox'][frame_num - 1] + orig_height = meta['length'].item() + orig_width = meta['width'].item() + landmarks = meta['landmarks_2d'][frame_num - 1] + + # Go from frame landmarks to cropped and resized frame landmarks + x_left = max(0, centerx-l) + x_right = min(centerx+l, orig_height) + y_up = max(0, centery-l) + y_down = min(centery+l, orig_width) + w = x_right - x_left + h = y_down - y_up + ar_h = 255. / h + ar_w = 255. / w + + landmarks[:,0] -= (centery - l) + landmarks[:,1] -= (centerx - l) + landmarks[:,0] *= ar_h + landmarks[:,1] *= ar_w + + return landmarks + +def plot_landmarks(landmarks): + fig = plt.figure(figsize=(256, 256), dpi=1) + ax = fig.add_subplot(111) + ax.axis('off') + plt.imshow(np.ones((256, 256, 3))) + plt.subplots_adjust(left=0, right=1, top=1, bottom=0) + + lw = 100 + + # Head + ax.plot(landmarks[0:17, 0], landmarks[0:17, 1], linestyle='-', color='green', lw=lw) + # Eyebrows + ax.plot(landmarks[17:22, 0], landmarks[17:22, 1], linestyle='-', color='orange', lw=lw) + ax.plot(landmarks[22:27, 0], landmarks[22:27, 1], linestyle='-', color='orange', lw=lw) + # Nose + ax.plot(landmarks[27:31, 0], landmarks[27:31, 1], linestyle='-', color='blue', lw=lw) + ax.plot(landmarks[31:36, 0], landmarks[31:36, 1], linestyle='-', color='blue', lw=lw) + # Eyes + ax.plot(landmarks[36:42, 0], landmarks[36:42, 1], linestyle='-', color='red', lw=lw) + ax.plot(landmarks[42:48, 0], landmarks[42:48, 1], linestyle='-', color='red', lw=lw) + ax.plot([landmarks[36, 0], landmarks[41, 0]], [landmarks[36, 1], landmarks[41, 1]], + linestyle='-', color='red', lw=lw) + ax.plot([landmarks[42, 0], landmarks[47, 0]], [landmarks[42, 1], landmarks[47, 1]], + linestyle='-', color='red', lw=lw) + # Mouth + ax.plot(landmarks[48:60, 0], landmarks[48:60, 1], linestyle='-', color='purple', lw=lw) + ax.plot([landmarks[48, 0], landmarks[59, 0]], [landmarks[48, 1], landmarks[59, 1]], + linestyle='-', color='purple', lw=lw) + + fig.canvas.draw() + data = Image.frombuffer('RGB', fig.canvas.get_width_height(), fig.canvas.tostring_rgb(), 'raw', 'RGB', 0, 1) + plt.close(fig) + return data \ No newline at end of file diff --git a/pix2pixHD/datasets/avspeech b/pix2pixHD/datasets/avspeech new file mode 120000 index 0000000..8a340c8 --- /dev/null +++ b/pix2pixHD/datasets/avspeech @@ -0,0 +1 @@ +/scratch2/avspeech_process/avspeech/ \ No newline at end of file diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_000576_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_000576_gtFine_instanceIds.png new file mode 100755 index 0000000..01da7ed Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_000576_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_001236_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_001236_gtFine_instanceIds.png new file mode 100755 index 0000000..75506bc Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_001236_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_003357_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_003357_gtFine_instanceIds.png new file mode 100755 index 0000000..9bd27b0 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_003357_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_011810_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_011810_gtFine_instanceIds.png new file mode 100755 index 0000000..df84eee Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_011810_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_012868_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_012868_gtFine_instanceIds.png new file mode 100755 index 0000000..ba1f7aa Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000000_012868_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_013710_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_013710_gtFine_instanceIds.png new file mode 100755 index 0000000..d05b7db Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_013710_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_015328_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_015328_gtFine_instanceIds.png new file mode 100755 index 0000000..32d62a3 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_015328_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_023769_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_023769_gtFine_instanceIds.png new file mode 100755 index 0000000..9eef682 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_023769_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_028335_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_028335_gtFine_instanceIds.png new file mode 100755 index 0000000..b1909d5 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_028335_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_032711_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_032711_gtFine_instanceIds.png new file mode 100755 index 0000000..ac2e293 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_032711_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_033655_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_033655_gtFine_instanceIds.png new file mode 100755 index 0000000..de7328e Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_033655_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_042733_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_042733_gtFine_instanceIds.png new file mode 100755 index 0000000..a98d096 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_042733_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_047552_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_047552_gtFine_instanceIds.png new file mode 100755 index 0000000..ab569e3 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_047552_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_054640_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_054640_gtFine_instanceIds.png new file mode 100755 index 0000000..5f246a6 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_054640_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_055387_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_055387_gtFine_instanceIds.png new file mode 100755 index 0000000..2e7d01f Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_inst/frankfurt_000001_055387_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_000576_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_000576_gtFine_labelIds.png new file mode 100755 index 0000000..8c9464c Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_000576_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_001236_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_001236_gtFine_labelIds.png new file mode 100755 index 0000000..9f0ca9f Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_001236_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_003357_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_003357_gtFine_labelIds.png new file mode 100755 index 0000000..1035e55 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_003357_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_011810_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_011810_gtFine_labelIds.png new file mode 100755 index 0000000..a86913b Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_011810_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_012868_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_012868_gtFine_labelIds.png new file mode 100755 index 0000000..fe81c83 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000000_012868_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_013710_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_013710_gtFine_labelIds.png new file mode 100755 index 0000000..72b4be4 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_013710_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_015328_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_015328_gtFine_labelIds.png new file mode 100755 index 0000000..afefb6b Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_015328_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_023769_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_023769_gtFine_labelIds.png new file mode 100755 index 0000000..f3af9df Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_023769_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_028335_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_028335_gtFine_labelIds.png new file mode 100755 index 0000000..5e65e3e Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_028335_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_032711_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_032711_gtFine_labelIds.png new file mode 100755 index 0000000..ba07b73 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_032711_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_033655_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_033655_gtFine_labelIds.png new file mode 100755 index 0000000..77f519c Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_033655_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_042733_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_042733_gtFine_labelIds.png new file mode 100755 index 0000000..ba08f1d Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_042733_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_047552_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_047552_gtFine_labelIds.png new file mode 100755 index 0000000..5dff09a Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_047552_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_054640_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_054640_gtFine_labelIds.png new file mode 100755 index 0000000..cb2ab2b Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_054640_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_055387_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_055387_gtFine_labelIds.png new file mode 100755 index 0000000..b00ef7e Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/test_label/frankfurt_000001_055387_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_img/aachen_000000_000019_leftImg8bit.png b/pix2pixHD/datasets/cityscapes/train_img/aachen_000000_000019_leftImg8bit.png new file mode 100755 index 0000000..0e6867e Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_img/aachen_000000_000019_leftImg8bit.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_img/aachen_000001_000019_leftImg8bit.png b/pix2pixHD/datasets/cityscapes/train_img/aachen_000001_000019_leftImg8bit.png new file mode 100755 index 0000000..d5a96ce Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_img/aachen_000001_000019_leftImg8bit.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_img/aachen_000002_000019_leftImg8bit.png b/pix2pixHD/datasets/cityscapes/train_img/aachen_000002_000019_leftImg8bit.png new file mode 100755 index 0000000..10ce563 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_img/aachen_000002_000019_leftImg8bit.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_img/aachen_000003_000019_leftImg8bit.png b/pix2pixHD/datasets/cityscapes/train_img/aachen_000003_000019_leftImg8bit.png new file mode 100755 index 0000000..3027fe1 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_img/aachen_000003_000019_leftImg8bit.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_img/aachen_000004_000019_leftImg8bit.png b/pix2pixHD/datasets/cityscapes/train_img/aachen_000004_000019_leftImg8bit.png new file mode 100755 index 0000000..26945fc Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_img/aachen_000004_000019_leftImg8bit.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_img/aachen_000005_000019_leftImg8bit.png b/pix2pixHD/datasets/cityscapes/train_img/aachen_000005_000019_leftImg8bit.png new file mode 100755 index 0000000..71fb41f Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_img/aachen_000005_000019_leftImg8bit.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_img/aachen_000006_000019_leftImg8bit.png b/pix2pixHD/datasets/cityscapes/train_img/aachen_000006_000019_leftImg8bit.png new file mode 100755 index 0000000..dd5cf30 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_img/aachen_000006_000019_leftImg8bit.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_img/aachen_000007_000019_leftImg8bit.png b/pix2pixHD/datasets/cityscapes/train_img/aachen_000007_000019_leftImg8bit.png new file mode 100755 index 0000000..65653d7 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_img/aachen_000007_000019_leftImg8bit.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_inst/aachen_000000_000019_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000000_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..f4ee222 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000000_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_inst/aachen_000001_000019_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000001_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..dd69137 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000001_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_inst/aachen_000002_000019_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000002_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..bdad5e3 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000002_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_inst/aachen_000003_000019_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000003_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..91a035b Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000003_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_inst/aachen_000004_000019_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000004_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..0f5fc70 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000004_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_inst/aachen_000005_000019_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000005_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..ac54ee9 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000005_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_inst/aachen_000006_000019_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000006_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..49f435f Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000006_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_inst/aachen_000007_000019_gtFine_instanceIds.png b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000007_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..7c5ca0a Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_inst/aachen_000007_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_label/aachen_000000_000019_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/train_label/aachen_000000_000019_gtFine_labelIds.png new file mode 100755 index 0000000..eed7ee6 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_label/aachen_000000_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_label/aachen_000001_000019_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/train_label/aachen_000001_000019_gtFine_labelIds.png new file mode 100755 index 0000000..e9c25ee Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_label/aachen_000001_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_label/aachen_000002_000019_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/train_label/aachen_000002_000019_gtFine_labelIds.png new file mode 100755 index 0000000..c96ab17 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_label/aachen_000002_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_label/aachen_000003_000019_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/train_label/aachen_000003_000019_gtFine_labelIds.png new file mode 100755 index 0000000..da05594 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_label/aachen_000003_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_label/aachen_000004_000019_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/train_label/aachen_000004_000019_gtFine_labelIds.png new file mode 100755 index 0000000..bb30bd9 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_label/aachen_000004_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_label/aachen_000005_000019_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/train_label/aachen_000005_000019_gtFine_labelIds.png new file mode 100755 index 0000000..958fc40 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_label/aachen_000005_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_label/aachen_000006_000019_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/train_label/aachen_000006_000019_gtFine_labelIds.png new file mode 100755 index 0000000..89f042e Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_label/aachen_000006_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD/datasets/cityscapes/train_label/aachen_000007_000019_gtFine_labelIds.png b/pix2pixHD/datasets/cityscapes/train_label/aachen_000007_000019_gtFine_labelIds.png new file mode 100755 index 0000000..85b6922 Binary files /dev/null and b/pix2pixHD/datasets/cityscapes/train_label/aachen_000007_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD/encode_features.py b/pix2pixHD/encode_features.py new file mode 100755 index 0000000..158c85a --- /dev/null +++ b/pix2pixHD/encode_features.py @@ -0,0 +1,54 @@ +from options.train_options import TrainOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import numpy as np +import os + +opt = TrainOptions().parse() +opt.nThreads = 1 +opt.batchSize = 1 +opt.serial_batches = True +opt.no_flip = True +opt.instance_feat = True +opt.continue_train = True + +name = 'features' +save_path = os.path.join(opt.checkpoints_dir, opt.name) + +############ Initialize ######### +data_loader = CreateDataLoader(opt) +dataset = data_loader.load_data() +dataset_size = len(data_loader) +model = create_model(opt) + +########### Encode features ########### +reencode = True +if reencode: + features = {} + for label in range(opt.label_nc): + features[label] = np.zeros((0, opt.feat_num+1)) + for i, data in enumerate(dataset): + feat = model.module.encode_features(data['image'], data['inst']) + for label in range(opt.label_nc): + features[label] = np.append(features[label], feat[label], axis=0) + + print('%d / %d images' % (i+1, dataset_size)) + save_name = os.path.join(save_path, name + '.npy') + np.save(save_name, features) + +############## Clustering ########### +n_clusters = opt.n_clusters +load_name = os.path.join(save_path, name + '.npy') +features = np.load(load_name).item() +from sklearn.cluster import KMeans +centers = {} +for label in range(opt.label_nc): + feat = features[label] + feat = feat[feat[:,-1] > 0.5, :-1] + if feat.shape[0]: + n_clusters = min(feat.shape[0], opt.n_clusters) + kmeans = KMeans(n_clusters=n_clusters, random_state=0).fit(feat) + centers[label] = kmeans.cluster_centers_ +save_name = os.path.join(save_path, name + '_clustered_%03d.npy' % opt.n_clusters) +np.save(save_name, centers) +print('saving to %s' % save_name) \ No newline at end of file diff --git a/pix2pixHD/models/__init__.py b/pix2pixHD/models/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/pix2pixHD/models/base_model.py b/pix2pixHD/models/base_model.py new file mode 100755 index 0000000..f3f6b53 --- /dev/null +++ b/pix2pixHD/models/base_model.py @@ -0,0 +1,91 @@ +import os +import torch +import sys + +class BaseModel(torch.nn.Module): + def name(self): + return 'BaseModel' + + def initialize(self, opt): + self.opt = opt + self.gpu_ids = opt.gpu_ids + self.isTrain = opt.isTrain + self.Tensor = torch.cuda.FloatTensor if self.gpu_ids else torch.Tensor + self.save_dir = os.path.join(opt.checkpoints_dir, opt.name) + + def set_input(self, input): + self.input = input + + def forward(self): + pass + + # used in test time, no backprop + def test(self): + pass + + def get_image_paths(self): + pass + + def optimize_parameters(self): + pass + + def get_current_visuals(self): + return self.input + + def get_current_errors(self): + return {} + + def save(self, label): + pass + + # helper saving function that can be used by subclasses + def save_network(self, network, network_label, epoch_label, gpu_ids): + save_filename = '%s_net_%s.pth' % (epoch_label, network_label) + save_path = os.path.join(self.save_dir, save_filename) + torch.save(network.cpu().state_dict(), save_path) + if len(gpu_ids) and torch.cuda.is_available(): + network.cuda() + + # helper loading function that can be used by subclasses + def load_network(self, network, network_label, epoch_label, save_dir=''): + save_filename = '%s_net_%s.pth' % (epoch_label, network_label) + if not save_dir: + save_dir = self.save_dir + save_path = os.path.join(save_dir, save_filename) + if not os.path.isfile(save_path): + print('%s not exists yet!' % save_path) + if network_label == 'G': + raise('Generator must exist!') + else: + #network.load_state_dict(torch.load(save_path)) + try: + network.load_state_dict(torch.load(save_path)) + except: + pretrained_dict = torch.load(save_path) + model_dict = network.state_dict() + try: + pretrained_dict = {k: v for k, v in pretrained_dict.items() if k in model_dict} + network.load_state_dict(pretrained_dict) + if self.opt.verbose: + print('Pretrained network %s has excessive layers; Only loading layers that are used' % network_label) + except: + print('Pretrained network %s has fewer layers; The following are not initialized:' % network_label) + for k, v in pretrained_dict.items(): + if v.size() == model_dict[k].size(): + model_dict[k] = v + + if sys.version_info >= (3,0): + not_initialized = set() + else: + from sets import Set + not_initialized = Set() + + for k, v in model_dict.items(): + if k not in pretrained_dict or v.size() != pretrained_dict[k].size(): + not_initialized.add(k.split('.')[0]) + + print(sorted(not_initialized)) + network.load_state_dict(model_dict) + + def update_learning_rate(): + pass diff --git a/pix2pixHD/models/models.py b/pix2pixHD/models/models.py new file mode 100755 index 0000000..be1e30e --- /dev/null +++ b/pix2pixHD/models/models.py @@ -0,0 +1,20 @@ +import torch + +def create_model(opt): + if opt.model == 'pix2pixHD': + from .pix2pixHD_model import Pix2PixHDModel, InferenceModel + if opt.isTrain: + model = Pix2PixHDModel() + else: + model = InferenceModel() + else: + from .ui_model import UIModel + model = UIModel() + model.initialize(opt) + if opt.verbose: + print("model [%s] was created" % (model.name())) + + if opt.isTrain and len(opt.gpu_ids) and not opt.fp16: + model = torch.nn.DataParallel(model, device_ids=opt.gpu_ids) + + return model diff --git a/pix2pixHD/models/networks.py b/pix2pixHD/models/networks.py new file mode 100755 index 0000000..ee05d85 --- /dev/null +++ b/pix2pixHD/models/networks.py @@ -0,0 +1,416 @@ +import torch +import torch.nn as nn +import functools +from torch.autograd import Variable +import numpy as np + +############################################################################### +# Functions +############################################################################### +def weights_init(m): + classname = m.__class__.__name__ + if classname.find('Conv') != -1: + m.weight.data.normal_(0.0, 0.02) + elif classname.find('BatchNorm2d') != -1: + m.weight.data.normal_(1.0, 0.02) + m.bias.data.fill_(0) + +def get_norm_layer(norm_type='instance'): + if norm_type == 'batch': + norm_layer = functools.partial(nn.BatchNorm2d, affine=True) + elif norm_type == 'instance': + norm_layer = functools.partial(nn.InstanceNorm2d, affine=False) + else: + raise NotImplementedError('normalization layer [%s] is not found' % norm_type) + return norm_layer + +def define_G(input_nc, output_nc, ngf, netG, n_downsample_global=3, n_blocks_global=9, n_local_enhancers=1, + n_blocks_local=3, norm='instance', gpu_ids=[]): + norm_layer = get_norm_layer(norm_type=norm) + if netG == 'global': + netG = GlobalGenerator(input_nc, output_nc, ngf, n_downsample_global, n_blocks_global, norm_layer) + elif netG == 'local': + netG = LocalEnhancer(input_nc, output_nc, ngf, n_downsample_global, n_blocks_global, + n_local_enhancers, n_blocks_local, norm_layer) + elif netG == 'encoder': + netG = Encoder(input_nc, output_nc, ngf, n_downsample_global, norm_layer) + else: + raise('generator not implemented!') + print(netG) + if len(gpu_ids) > 0: + assert(torch.cuda.is_available()) + netG.cuda(gpu_ids[0]) + netG.apply(weights_init) + return netG + +def define_D(input_nc, ndf, n_layers_D, norm='instance', use_sigmoid=False, num_D=1, getIntermFeat=False, gpu_ids=[]): + norm_layer = get_norm_layer(norm_type=norm) + netD = MultiscaleDiscriminator(input_nc, ndf, n_layers_D, norm_layer, use_sigmoid, num_D, getIntermFeat) + print(netD) + if len(gpu_ids) > 0: + assert(torch.cuda.is_available()) + netD.cuda(gpu_ids[0]) + netD.apply(weights_init) + return netD + +def print_network(net): + if isinstance(net, list): + net = net[0] + num_params = 0 + for param in net.parameters(): + num_params += param.numel() + print(net) + print('Total number of parameters: %d' % num_params) + +############################################################################## +# Losses +############################################################################## +class GANLoss(nn.Module): + def __init__(self, use_lsgan=True, target_real_label=1.0, target_fake_label=0.0, + tensor=torch.FloatTensor): + super(GANLoss, self).__init__() + self.real_label = target_real_label + self.fake_label = target_fake_label + self.real_label_var = None + self.fake_label_var = None + self.Tensor = tensor + if use_lsgan: + self.loss = nn.MSELoss() + else: + self.loss = nn.BCELoss() + + def get_target_tensor(self, input, target_is_real): + target_tensor = None + if target_is_real: + create_label = ((self.real_label_var is None) or + (self.real_label_var.numel() != input.numel())) + if create_label: + real_tensor = self.Tensor(input.size()).fill_(self.real_label) + self.real_label_var = Variable(real_tensor, requires_grad=False) + target_tensor = self.real_label_var + else: + create_label = ((self.fake_label_var is None) or + (self.fake_label_var.numel() != input.numel())) + if create_label: + fake_tensor = self.Tensor(input.size()).fill_(self.fake_label) + self.fake_label_var = Variable(fake_tensor, requires_grad=False) + target_tensor = self.fake_label_var + return target_tensor + + def __call__(self, input, target_is_real): + if isinstance(input[0], list): + loss = 0 + for input_i in input: + pred = input_i[-1] + target_tensor = self.get_target_tensor(pred, target_is_real) + loss += self.loss(pred, target_tensor) + return loss + else: + target_tensor = self.get_target_tensor(input[-1], target_is_real) + return self.loss(input[-1], target_tensor) + +class VGGLoss(nn.Module): + def __init__(self, gpu_ids): + super(VGGLoss, self).__init__() + self.vgg = Vgg19().cuda() + self.criterion = nn.L1Loss() + self.weights = [1.0/32, 1.0/16, 1.0/8, 1.0/4, 1.0] + + def forward(self, x, y): + x_vgg, y_vgg = self.vgg(x), self.vgg(y) + loss = 0 + for i in range(len(x_vgg)): + loss += self.weights[i] * self.criterion(x_vgg[i], y_vgg[i].detach()) + return loss + +############################################################################## +# Generator +############################################################################## +class LocalEnhancer(nn.Module): + def __init__(self, input_nc, output_nc, ngf=32, n_downsample_global=3, n_blocks_global=9, + n_local_enhancers=1, n_blocks_local=3, norm_layer=nn.BatchNorm2d, padding_type='reflect'): + super(LocalEnhancer, self).__init__() + self.n_local_enhancers = n_local_enhancers + + ###### global generator model ##### + ngf_global = ngf * (2**n_local_enhancers) + model_global = GlobalGenerator(input_nc, output_nc, ngf_global, n_downsample_global, n_blocks_global, norm_layer).model + model_global = [model_global[i] for i in range(len(model_global)-3)] # get rid of final convolution layers + self.model = nn.Sequential(*model_global) + + ###### local enhancer layers ##### + for n in range(1, n_local_enhancers+1): + ### downsample + ngf_global = ngf * (2**(n_local_enhancers-n)) + model_downsample = [nn.ReflectionPad2d(3), nn.Conv2d(input_nc, ngf_global, kernel_size=7, padding=0), + norm_layer(ngf_global), nn.ReLU(True), + nn.Conv2d(ngf_global, ngf_global * 2, kernel_size=3, stride=2, padding=1), + norm_layer(ngf_global * 2), nn.ReLU(True)] + ### residual blocks + model_upsample = [] + for i in range(n_blocks_local): + model_upsample += [ResnetBlock(ngf_global * 2, padding_type=padding_type, norm_layer=norm_layer)] + + ### upsample + model_upsample += [nn.ConvTranspose2d(ngf_global * 2, ngf_global, kernel_size=3, stride=2, padding=1, output_padding=1), + norm_layer(ngf_global), nn.ReLU(True)] + + ### final convolution + if n == n_local_enhancers: + model_upsample += [nn.ReflectionPad2d(3), nn.Conv2d(ngf, output_nc, kernel_size=7, padding=0), nn.Tanh()] + + setattr(self, 'model'+str(n)+'_1', nn.Sequential(*model_downsample)) + setattr(self, 'model'+str(n)+'_2', nn.Sequential(*model_upsample)) + + self.downsample = nn.AvgPool2d(3, stride=2, padding=[1, 1], count_include_pad=False) + + def forward(self, input): + ### create input pyramid + input_downsampled = [input] + for i in range(self.n_local_enhancers): + input_downsampled.append(self.downsample(input_downsampled[-1])) + + ### output at coarest level + output_prev = self.model(input_downsampled[-1]) + ### build up one layer at a time + for n_local_enhancers in range(1, self.n_local_enhancers+1): + model_downsample = getattr(self, 'model'+str(n_local_enhancers)+'_1') + model_upsample = getattr(self, 'model'+str(n_local_enhancers)+'_2') + input_i = input_downsampled[self.n_local_enhancers-n_local_enhancers] + output_prev = model_upsample(model_downsample(input_i) + output_prev) + return output_prev + +class GlobalGenerator(nn.Module): + def __init__(self, input_nc, output_nc, ngf=64, n_downsampling=3, n_blocks=9, norm_layer=nn.BatchNorm2d, + padding_type='reflect'): + assert(n_blocks >= 0) + super(GlobalGenerator, self).__init__() + activation = nn.ReLU(True) + + model = [nn.ReflectionPad2d(3), nn.Conv2d(input_nc, ngf, kernel_size=7, padding=0), norm_layer(ngf), activation] + ### downsample + for i in range(n_downsampling): + mult = 2**i + model += [nn.Conv2d(ngf * mult, ngf * mult * 2, kernel_size=3, stride=2, padding=1), + norm_layer(ngf * mult * 2), activation] + + ### resnet blocks + mult = 2**n_downsampling + for i in range(n_blocks): + model += [ResnetBlock(ngf * mult, padding_type=padding_type, activation=activation, norm_layer=norm_layer)] + + ### upsample + for i in range(n_downsampling): + mult = 2**(n_downsampling - i) + model += [nn.ConvTranspose2d(ngf * mult, int(ngf * mult / 2), kernel_size=3, stride=2, padding=1, output_padding=1), + norm_layer(int(ngf * mult / 2)), activation] + model += [nn.ReflectionPad2d(3), nn.Conv2d(ngf, output_nc, kernel_size=7, padding=0), nn.Tanh()] + self.model = nn.Sequential(*model) + + def forward(self, input): + return self.model(input) + +# Define a resnet block +class ResnetBlock(nn.Module): + def __init__(self, dim, padding_type, norm_layer, activation=nn.ReLU(True), use_dropout=False): + super(ResnetBlock, self).__init__() + self.conv_block = self.build_conv_block(dim, padding_type, norm_layer, activation, use_dropout) + + def build_conv_block(self, dim, padding_type, norm_layer, activation, use_dropout): + conv_block = [] + p = 0 + if padding_type == 'reflect': + conv_block += [nn.ReflectionPad2d(1)] + elif padding_type == 'replicate': + conv_block += [nn.ReplicationPad2d(1)] + elif padding_type == 'zero': + p = 1 + else: + raise NotImplementedError('padding [%s] is not implemented' % padding_type) + + conv_block += [nn.Conv2d(dim, dim, kernel_size=3, padding=p), + norm_layer(dim), + activation] + if use_dropout: + conv_block += [nn.Dropout(0.5)] + + p = 0 + if padding_type == 'reflect': + conv_block += [nn.ReflectionPad2d(1)] + elif padding_type == 'replicate': + conv_block += [nn.ReplicationPad2d(1)] + elif padding_type == 'zero': + p = 1 + else: + raise NotImplementedError('padding [%s] is not implemented' % padding_type) + conv_block += [nn.Conv2d(dim, dim, kernel_size=3, padding=p), + norm_layer(dim)] + + return nn.Sequential(*conv_block) + + def forward(self, x): + out = x + self.conv_block(x) + return out + +class Encoder(nn.Module): + def __init__(self, input_nc, output_nc, ngf=32, n_downsampling=4, norm_layer=nn.BatchNorm2d): + super(Encoder, self).__init__() + self.output_nc = output_nc + + model = [nn.ReflectionPad2d(3), nn.Conv2d(input_nc, ngf, kernel_size=7, padding=0), + norm_layer(ngf), nn.ReLU(True)] + ### downsample + for i in range(n_downsampling): + mult = 2**i + model += [nn.Conv2d(ngf * mult, ngf * mult * 2, kernel_size=3, stride=2, padding=1), + norm_layer(ngf * mult * 2), nn.ReLU(True)] + + ### upsample + for i in range(n_downsampling): + mult = 2**(n_downsampling - i) + model += [nn.ConvTranspose2d(ngf * mult, int(ngf * mult / 2), kernel_size=3, stride=2, padding=1, output_padding=1), + norm_layer(int(ngf * mult / 2)), nn.ReLU(True)] + + model += [nn.ReflectionPad2d(3), nn.Conv2d(ngf, output_nc, kernel_size=7, padding=0), nn.Tanh()] + self.model = nn.Sequential(*model) + + def forward(self, input, inst): + outputs = self.model(input) + + # instance-wise average pooling + outputs_mean = outputs.clone() + inst_list = np.unique(inst.cpu().numpy().astype(int)) + for i in inst_list: + for b in range(input.size()[0]): + indices = (inst[b:b+1] == int(i)).nonzero() # n x 4 + for j in range(self.output_nc): + output_ins = outputs[indices[:,0] + b, indices[:,1] + j, indices[:,2], indices[:,3]] + mean_feat = torch.mean(output_ins).expand_as(output_ins) + outputs_mean[indices[:,0] + b, indices[:,1] + j, indices[:,2], indices[:,3]] = mean_feat + return outputs_mean + +class MultiscaleDiscriminator(nn.Module): + def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d, + use_sigmoid=False, num_D=3, getIntermFeat=False): + super(MultiscaleDiscriminator, self).__init__() + self.num_D = num_D + self.n_layers = n_layers + self.getIntermFeat = getIntermFeat + + for i in range(num_D): + netD = NLayerDiscriminator(input_nc, ndf, n_layers, norm_layer, use_sigmoid, getIntermFeat) + if getIntermFeat: + for j in range(n_layers+2): + setattr(self, 'scale'+str(i)+'_layer'+str(j), getattr(netD, 'model'+str(j))) + else: + setattr(self, 'layer'+str(i), netD.model) + + self.downsample = nn.AvgPool2d(3, stride=2, padding=[1, 1], count_include_pad=False) + + def singleD_forward(self, model, input): + if self.getIntermFeat: + result = [input] + for i in range(len(model)): + result.append(model[i](result[-1])) + return result[1:] + else: + return [model(input)] + + def forward(self, input): + num_D = self.num_D + result = [] + input_downsampled = input + for i in range(num_D): + if self.getIntermFeat: + model = [getattr(self, 'scale'+str(num_D-1-i)+'_layer'+str(j)) for j in range(self.n_layers+2)] + else: + model = getattr(self, 'layer'+str(num_D-1-i)) + result.append(self.singleD_forward(model, input_downsampled)) + if i != (num_D-1): + input_downsampled = self.downsample(input_downsampled) + return result + +# Defines the PatchGAN discriminator with the specified arguments. +class NLayerDiscriminator(nn.Module): + def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d, use_sigmoid=False, getIntermFeat=False): + super(NLayerDiscriminator, self).__init__() + self.getIntermFeat = getIntermFeat + self.n_layers = n_layers + + kw = 4 + padw = int(np.ceil((kw-1.0)/2)) + sequence = [[nn.Conv2d(input_nc, ndf, kernel_size=kw, stride=2, padding=padw), nn.LeakyReLU(0.2, True)]] + + nf = ndf + for n in range(1, n_layers): + nf_prev = nf + nf = min(nf * 2, 512) + sequence += [[ + nn.Conv2d(nf_prev, nf, kernel_size=kw, stride=2, padding=padw), + norm_layer(nf), nn.LeakyReLU(0.2, True) + ]] + + nf_prev = nf + nf = min(nf * 2, 512) + sequence += [[ + nn.Conv2d(nf_prev, nf, kernel_size=kw, stride=1, padding=padw), + norm_layer(nf), + nn.LeakyReLU(0.2, True) + ]] + + sequence += [[nn.Conv2d(nf, 1, kernel_size=kw, stride=1, padding=padw)]] + + if use_sigmoid: + sequence += [[nn.Sigmoid()]] + + if getIntermFeat: + for n in range(len(sequence)): + setattr(self, 'model'+str(n), nn.Sequential(*sequence[n])) + else: + sequence_stream = [] + for n in range(len(sequence)): + sequence_stream += sequence[n] + self.model = nn.Sequential(*sequence_stream) + + def forward(self, input): + if self.getIntermFeat: + res = [input] + for n in range(self.n_layers+2): + model = getattr(self, 'model'+str(n)) + res.append(model(res[-1])) + return res[1:] + else: + return self.model(input) + +from torchvision import models +class Vgg19(torch.nn.Module): + def __init__(self, requires_grad=False): + super(Vgg19, self).__init__() + vgg_pretrained_features = models.vgg19(pretrained=True).features + self.slice1 = torch.nn.Sequential() + self.slice2 = torch.nn.Sequential() + self.slice3 = torch.nn.Sequential() + self.slice4 = torch.nn.Sequential() + self.slice5 = torch.nn.Sequential() + for x in range(2): + self.slice1.add_module(str(x), vgg_pretrained_features[x]) + for x in range(2, 7): + self.slice2.add_module(str(x), vgg_pretrained_features[x]) + for x in range(7, 12): + self.slice3.add_module(str(x), vgg_pretrained_features[x]) + for x in range(12, 21): + self.slice4.add_module(str(x), vgg_pretrained_features[x]) + for x in range(21, 30): + self.slice5.add_module(str(x), vgg_pretrained_features[x]) + if not requires_grad: + for param in self.parameters(): + param.requires_grad = False + + def forward(self, X): + h_relu1 = self.slice1(X) + h_relu2 = self.slice2(h_relu1) + h_relu3 = self.slice3(h_relu2) + h_relu4 = self.slice4(h_relu3) + h_relu5 = self.slice5(h_relu4) + out = [h_relu1, h_relu2, h_relu3, h_relu4, h_relu5] + return out diff --git a/pix2pixHD/models/pix2pixHD_model.py b/pix2pixHD/models/pix2pixHD_model.py new file mode 100755 index 0000000..1f2d0f7 --- /dev/null +++ b/pix2pixHD/models/pix2pixHD_model.py @@ -0,0 +1,274 @@ +import numpy as np +import torch +import os +from torch.autograd import Variable +from util.image_pool import ImagePool +from .base_model import BaseModel +from . import networks + +class Pix2PixHDModel(BaseModel): + def name(self): + return 'Pix2PixHDModel' + + def init_loss_filter(self, use_gan_feat_loss, use_vgg_loss): + flags = (True, use_gan_feat_loss, use_vgg_loss, True, True) + def loss_filter(g_gan, g_gan_feat, g_vgg, d_real, d_fake): + return [l for (l,f) in zip((g_gan,g_gan_feat,g_vgg,d_real,d_fake),flags) if f] + return loss_filter + + def initialize(self, opt): + BaseModel.initialize(self, opt) + if opt.resize_or_crop != 'none' or not opt.isTrain: # when training at full res this causes OOM + torch.backends.cudnn.benchmark = True + self.isTrain = opt.isTrain + self.use_features = opt.instance_feat or opt.label_feat + self.gen_features = self.use_features and not self.opt.load_features + input_nc = opt.label_nc if opt.label_nc != 0 else opt.input_nc + + ##### define networks + # Generator network + netG_input_nc = 6 + self.netG = networks.define_G(netG_input_nc, opt.output_nc, opt.ngf, opt.netG, + opt.n_downsample_global, opt.n_blocks_global, opt.n_local_enhancers, + opt.n_blocks_local, opt.norm, gpu_ids=self.gpu_ids) + + # Discriminator network + if self.isTrain: + use_sigmoid = opt.no_lsgan + netD_input_nc = 6 + self.netD = networks.define_D(netD_input_nc, opt.ndf, opt.n_layers_D, opt.norm, use_sigmoid, + opt.num_D, not opt.no_ganFeat_loss, gpu_ids=self.gpu_ids) + + ### Encoder network + if self.gen_features: + self.netE = networks.define_G(opt.output_nc, opt.feat_num, opt.nef, 'encoder', + opt.n_downsample_E, norm=opt.norm, gpu_ids=self.gpu_ids) + if self.opt.verbose: + print('---------- Networks initialized -------------') + + # load networks + if not self.isTrain or opt.continue_train or opt.load_pretrain: + pretrained_path = '' if not self.isTrain else opt.load_pretrain + self.load_network(self.netG, 'G', opt.which_epoch, pretrained_path) + if self.isTrain: + self.load_network(self.netD, 'D', opt.which_epoch, pretrained_path) + if self.gen_features: + self.load_network(self.netE, 'E', opt.which_epoch, pretrained_path) + + # set loss functions and optimizers + if self.isTrain: + if opt.pool_size > 0 and (len(self.gpu_ids)) > 1: + raise NotImplementedError("Fake Pool Not Implemented for MultiGPU") + self.fake_pool = ImagePool(opt.pool_size) + self.old_lr = opt.lr + + # define loss functions + self.loss_filter = self.init_loss_filter(not opt.no_ganFeat_loss, not opt.no_vgg_loss) + + self.criterionGAN = networks.GANLoss(use_lsgan=not opt.no_lsgan, tensor=self.Tensor) + self.criterionFeat = torch.nn.L1Loss() + if not opt.no_vgg_loss: + self.criterionVGG = networks.VGGLoss(self.gpu_ids) + + + # Names so we can breakout loss + self.loss_names = self.loss_filter('G_GAN','G_GAN_Feat','G_VGG','D_real', 'D_fake') + + # initialize optimizers + # optimizer G + if opt.niter_fix_global > 0: + import sys + if sys.version_info >= (3,0): + finetune_list = set() + else: + from sets import Set + finetune_list = Set() + + params_dict = dict(self.netG.named_parameters()) + params = [] + for key, value in params_dict.items(): + if key.startswith('model' + str(opt.n_local_enhancers)): + params += [value] + finetune_list.add(key.split('.')[0]) + print('------------- Only training the local enhancer network (for %d epochs) ------------' % opt.niter_fix_global) + print('The layers that are finetuned are ', sorted(finetune_list)) + else: + params = list(self.netG.parameters()) + if self.gen_features: + params += list(self.netE.parameters()) + self.optimizer_G = torch.optim.Adam(params, lr=opt.lr, betas=(opt.beta1, 0.999)) + + # optimizer D + params = list(self.netD.parameters()) + self.optimizer_D = torch.optim.Adam(params, lr=opt.lr, betas=(opt.beta1, 0.999)) + + def encode_input(self, label_map, inst_map=None, real_image=None, feat_map=None, infer=False): + if self.opt.label_nc == 0: + input_label = label_map.data.cuda() + else: + # create one-hot vector for label map + size = label_map.size() + oneHot_size = (size[0], self.opt.label_nc, size[2], size[3]) + input_label = torch.cuda.FloatTensor(torch.Size(oneHot_size)).zero_() + input_label = input_label.scatter_(1, label_map.data.long().cuda(), 1.0) + if self.opt.data_type == 16: + input_label = input_label.half() + + # get edges from instance map + if not self.opt.no_instance: + inst_map = inst_map.data.cuda() + edge_map = self.get_edges(inst_map) + input_label = torch.cat((input_label, edge_map), dim=1) + input_label = Variable(input_label, volatile=infer) + + # real images for training + if real_image is not None: + real_image = Variable(real_image.data.cuda()) + + # instance map for feature encoding + if self.use_features: + # get precomputed feature maps + if self.opt.load_features: + feat_map = Variable(feat_map.data.cuda()) + if self.opt.label_feat: + inst_map = label_map.cuda() + + return input_label, inst_map, real_image, feat_map + + def discriminate(self, tgt_lnd, test_image, use_pool=False): + input_concat = torch.cat((tgt_lnd, test_image.detach()), dim=1) + if use_pool: + fake_query = self.fake_pool.query(input_concat) + return self.netD.forward(fake_query) + else: + return self.netD.forward(input_concat) + + def forward(self, tgt_lnd, ref_img, tgt_img, infer=False): + # Fake Generation + input_concat = torch.cat((tgt_lnd, ref_img), dim=1) + fake_image = self.netG.forward(input_concat) + + # Fake Detection and Loss + pred_fake_pool = self.discriminate(tgt_lnd, fake_image, use_pool=True) + loss_D_fake = self.criterionGAN(pred_fake_pool, False) + + # Real Detection and Loss + pred_real = self.discriminate(tgt_lnd, tgt_img) + loss_D_real = self.criterionGAN(pred_real, True) + + # GAN loss (Fake Passability Loss) + pred_fake = self.netD.forward(torch.cat((tgt_lnd, fake_image), dim=1)) + loss_G_GAN = self.criterionGAN(pred_fake, True) + + # GAN feature matching loss + loss_G_GAN_Feat = 0 + if not self.opt.no_ganFeat_loss: + feat_weights = 4.0 / (self.opt.n_layers_D + 1) + D_weights = 1.0 / self.opt.num_D + for i in range(self.opt.num_D): + for j in range(len(pred_fake[i])-1): + loss_G_GAN_Feat += D_weights * feat_weights * \ + self.criterionFeat(pred_fake[i][j], pred_real[i][j].detach()) * self.opt.lambda_feat * 0.1 + + # VGG feature matching loss + loss_G_VGG = 0 + if not self.opt.no_vgg_loss: + loss_G_VGG = self.criterionVGG(fake_image, tgt_img) * self.opt.lambda_feat + + # Only return the fake_B image if necessary to save BW + return [ self.loss_filter( loss_G_GAN, loss_G_GAN_Feat, loss_G_VGG, loss_D_real, loss_D_fake ), None if not infer else fake_image ] + + def inference(self, tgt_lnd, ref_img): + # Fake Generation + input_concat = torch.cat((tgt_lnd, ref_img), dim=1) + with torch.no_grad(): + fake_image = self.netG.forward(input_concat) + + return fake_image + + def sample_features(self, inst): + # read precomputed feature clusters + cluster_path = os.path.join(self.opt.checkpoints_dir, self.opt.name, self.opt.cluster_path) + features_clustered = np.load(cluster_path, encoding='latin1').item() + + # randomly sample from the feature clusters + inst_np = inst.cpu().numpy().astype(int) + feat_map = self.Tensor(inst.size()[0], self.opt.feat_num, inst.size()[2], inst.size()[3]) + for i in np.unique(inst_np): + label = i if i < 1000 else i//1000 + if label in features_clustered: + feat = features_clustered[label] + cluster_idx = np.random.randint(0, feat.shape[0]) + + idx = (inst == int(i)).nonzero() + for k in range(self.opt.feat_num): + feat_map[idx[:,0], idx[:,1] + k, idx[:,2], idx[:,3]] = feat[cluster_idx, k] + if self.opt.data_type==16: + feat_map = feat_map.half() + return feat_map + + def encode_features(self, image, inst): + image = Variable(image.cuda(), volatile=True) + feat_num = self.opt.feat_num + h, w = inst.size()[2], inst.size()[3] + block_num = 32 + feat_map = self.netE.forward(image, inst.cuda()) + inst_np = inst.cpu().numpy().astype(int) + feature = {} + for i in range(self.opt.label_nc): + feature[i] = np.zeros((0, feat_num+1)) + for i in np.unique(inst_np): + label = i if i < 1000 else i//1000 + idx = (inst == int(i)).nonzero() + num = idx.size()[0] + idx = idx[num//2,:] + val = np.zeros((1, feat_num+1)) + for k in range(feat_num): + val[0, k] = feat_map[idx[0], idx[1] + k, idx[2], idx[3]].data[0] + val[0, feat_num] = float(num) / (h * w // block_num) + feature[label] = np.append(feature[label], val, axis=0) + return feature + + def get_edges(self, t): + edge = torch.cuda.ByteTensor(t.size()).zero_() + edge[:,:,:,1:] = edge[:,:,:,1:] | (t[:,:,:,1:] != t[:,:,:,:-1]) + edge[:,:,:,:-1] = edge[:,:,:,:-1] | (t[:,:,:,1:] != t[:,:,:,:-1]) + edge[:,:,1:,:] = edge[:,:,1:,:] | (t[:,:,1:,:] != t[:,:,:-1,:]) + edge[:,:,:-1,:] = edge[:,:,:-1,:] | (t[:,:,1:,:] != t[:,:,:-1,:]) + if self.opt.data_type==16: + return edge.half() + else: + return edge.float() + + def save(self, which_epoch): + self.save_network(self.netG, 'G', which_epoch, self.gpu_ids) + self.save_network(self.netD, 'D', which_epoch, self.gpu_ids) + if self.gen_features: + self.save_network(self.netE, 'E', which_epoch, self.gpu_ids) + + def update_fixed_params(self): + # after fixing the global generator for a number of iterations, also start finetuning it + params = list(self.netG.parameters()) + if self.gen_features: + params += list(self.netE.parameters()) + self.optimizer_G = torch.optim.Adam(params, lr=self.opt.lr, betas=(self.opt.beta1, 0.999)) + if self.opt.verbose: + print('------------ Now also finetuning global generator -----------') + + def update_learning_rate(self): + lrd = self.opt.lr / self.opt.niter_decay + lr = self.old_lr - lrd + for param_group in self.optimizer_D.param_groups: + param_group['lr'] = lr + for param_group in self.optimizer_G.param_groups: + param_group['lr'] = lr + if self.opt.verbose: + print('update learning rate: %f -> %f' % (self.old_lr, lr)) + self.old_lr = lr + +class InferenceModel(Pix2PixHDModel): + def forward(self, inp): + label, inst = inp + return self.inference(label, inst) + + diff --git a/pix2pixHD/models/ui_model.py b/pix2pixHD/models/ui_model.py new file mode 100755 index 0000000..c5b3433 --- /dev/null +++ b/pix2pixHD/models/ui_model.py @@ -0,0 +1,347 @@ +import torch +from torch.autograd import Variable +from collections import OrderedDict +import numpy as np +import os +from PIL import Image +import util.util as util +from .base_model import BaseModel +from . import networks + +class UIModel(BaseModel): + def name(self): + return 'UIModel' + + def initialize(self, opt): + assert(not opt.isTrain) + BaseModel.initialize(self, opt) + self.use_features = opt.instance_feat or opt.label_feat + + netG_input_nc = opt.label_nc + if not opt.no_instance: + netG_input_nc += 1 + if self.use_features: + netG_input_nc += opt.feat_num + + self.netG = networks.define_G(netG_input_nc, opt.output_nc, opt.ngf, opt.netG, + opt.n_downsample_global, opt.n_blocks_global, opt.n_local_enhancers, + opt.n_blocks_local, opt.norm, gpu_ids=self.gpu_ids) + self.load_network(self.netG, 'G', opt.which_epoch) + + print('---------- Networks initialized -------------') + + def toTensor(self, img, normalize=False): + tensor = torch.from_numpy(np.array(img, np.int32, copy=False)) + tensor = tensor.view(1, img.size[1], img.size[0], len(img.mode)) + tensor = tensor.transpose(1, 2).transpose(1, 3).contiguous() + if normalize: + return (tensor.float()/255.0 - 0.5) / 0.5 + return tensor.float() + + def load_image(self, label_path, inst_path, feat_path): + opt = self.opt + # read label map + label_img = Image.open(label_path) + if label_path.find('face') != -1: + label_img = label_img.convert('L') + ow, oh = label_img.size + w = opt.loadSize + h = int(w * oh / ow) + label_img = label_img.resize((w, h), Image.NEAREST) + label_map = self.toTensor(label_img) + + # onehot vector input for label map + self.label_map = label_map.cuda() + oneHot_size = (1, opt.label_nc, h, w) + input_label = self.Tensor(torch.Size(oneHot_size)).zero_() + self.input_label = input_label.scatter_(1, label_map.long().cuda(), 1.0) + + # read instance map + if not opt.no_instance: + inst_img = Image.open(inst_path) + inst_img = inst_img.resize((w, h), Image.NEAREST) + self.inst_map = self.toTensor(inst_img).cuda() + self.edge_map = self.get_edges(self.inst_map) + self.net_input = Variable(torch.cat((self.input_label, self.edge_map), dim=1), volatile=True) + else: + self.net_input = Variable(self.input_label, volatile=True) + + self.features_clustered = np.load(feat_path).item() + self.object_map = self.inst_map if opt.instance_feat else self.label_map + + object_np = self.object_map.cpu().numpy().astype(int) + self.feat_map = self.Tensor(1, opt.feat_num, h, w).zero_() + self.cluster_indices = np.zeros(self.opt.label_nc, np.uint8) + for i in np.unique(object_np): + label = i if i < 1000 else i//1000 + if label in self.features_clustered: + feat = self.features_clustered[label] + np.random.seed(i+1) + cluster_idx = np.random.randint(0, feat.shape[0]) + self.cluster_indices[label] = cluster_idx + idx = (self.object_map == i).nonzero() + self.set_features(idx, feat, cluster_idx) + + self.net_input_original = self.net_input.clone() + self.label_map_original = self.label_map.clone() + self.feat_map_original = self.feat_map.clone() + if not opt.no_instance: + self.inst_map_original = self.inst_map.clone() + + def reset(self): + self.net_input = self.net_input_prev = self.net_input_original.clone() + self.label_map = self.label_map_prev = self.label_map_original.clone() + self.feat_map = self.feat_map_prev = self.feat_map_original.clone() + if not self.opt.no_instance: + self.inst_map = self.inst_map_prev = self.inst_map_original.clone() + self.object_map = self.inst_map if self.opt.instance_feat else self.label_map + + def undo(self): + self.net_input = self.net_input_prev + self.label_map = self.label_map_prev + self.feat_map = self.feat_map_prev + if not self.opt.no_instance: + self.inst_map = self.inst_map_prev + self.object_map = self.inst_map if self.opt.instance_feat else self.label_map + + # get boundary map from instance map + def get_edges(self, t): + edge = torch.cuda.ByteTensor(t.size()).zero_() + edge[:,:,:,1:] = edge[:,:,:,1:] | (t[:,:,:,1:] != t[:,:,:,:-1]) + edge[:,:,:,:-1] = edge[:,:,:,:-1] | (t[:,:,:,1:] != t[:,:,:,:-1]) + edge[:,:,1:,:] = edge[:,:,1:,:] | (t[:,:,1:,:] != t[:,:,:-1,:]) + edge[:,:,:-1,:] = edge[:,:,:-1,:] | (t[:,:,1:,:] != t[:,:,:-1,:]) + return edge.float() + + # change the label at the source position to the label at the target position + def change_labels(self, click_src, click_tgt): + y_src, x_src = click_src[0], click_src[1] + y_tgt, x_tgt = click_tgt[0], click_tgt[1] + label_src = int(self.label_map[0, 0, y_src, x_src]) + inst_src = self.inst_map[0, 0, y_src, x_src] + label_tgt = int(self.label_map[0, 0, y_tgt, x_tgt]) + inst_tgt = self.inst_map[0, 0, y_tgt, x_tgt] + + idx_src = (self.inst_map == inst_src).nonzero() + # need to change 3 things: label map, instance map, and feature map + if idx_src.shape: + # backup current maps + self.backup_current_state() + + # change both the label map and the network input + self.label_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + self.net_input[idx_src[:,0], idx_src[:,1] + label_src, idx_src[:,2], idx_src[:,3]] = 0 + self.net_input[idx_src[:,0], idx_src[:,1] + label_tgt, idx_src[:,2], idx_src[:,3]] = 1 + + # update the instance map (and the network input) + if inst_tgt > 1000: + # if different instances have different ids, give the new object a new id + tgt_indices = (self.inst_map > label_tgt * 1000) & (self.inst_map < (label_tgt+1) * 1000) + inst_tgt = self.inst_map[tgt_indices].max() + 1 + self.inst_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = inst_tgt + self.net_input[:,-1,:,:] = self.get_edges(self.inst_map) + + # also copy the source features to the target position + idx_tgt = (self.inst_map == inst_tgt).nonzero() + if idx_tgt.shape: + self.copy_features(idx_src, idx_tgt[0,:]) + + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + + # add strokes of target label in the image + def add_strokes(self, click_src, label_tgt, bw, save): + # get the region of the new strokes (bw is the brush width) + size = self.net_input.size() + h, w = size[2], size[3] + idx_src = torch.LongTensor(bw**2, 4).fill_(0) + for i in range(bw): + idx_src[i*bw:(i+1)*bw, 2] = min(h-1, max(0, click_src[0]-bw//2 + i)) + for j in range(bw): + idx_src[i*bw+j, 3] = min(w-1, max(0, click_src[1]-bw//2 + j)) + idx_src = idx_src.cuda() + + # again, need to update 3 things + if idx_src.shape: + # backup current maps + if save: + self.backup_current_state() + + # update the label map (and the network input) in the stroke region + self.label_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + for k in range(self.opt.label_nc): + self.net_input[idx_src[:,0], idx_src[:,1] + k, idx_src[:,2], idx_src[:,3]] = 0 + self.net_input[idx_src[:,0], idx_src[:,1] + label_tgt, idx_src[:,2], idx_src[:,3]] = 1 + + # update the instance map (and the network input) + self.inst_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + self.net_input[:,-1,:,:] = self.get_edges(self.inst_map) + + # also update the features if available + if self.opt.instance_feat: + feat = self.features_clustered[label_tgt] + #np.random.seed(label_tgt+1) + #cluster_idx = np.random.randint(0, feat.shape[0]) + cluster_idx = self.cluster_indices[label_tgt] + self.set_features(idx_src, feat, cluster_idx) + + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + + # add an object to the clicked position with selected style + def add_objects(self, click_src, label_tgt, mask, style_id=0): + y, x = click_src[0], click_src[1] + mask = np.transpose(mask, (2, 0, 1))[np.newaxis,...] + idx_src = torch.from_numpy(mask).cuda().nonzero() + idx_src[:,2] += y + idx_src[:,3] += x + + # backup current maps + self.backup_current_state() + + # update label map + self.label_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + for k in range(self.opt.label_nc): + self.net_input[idx_src[:,0], idx_src[:,1] + k, idx_src[:,2], idx_src[:,3]] = 0 + self.net_input[idx_src[:,0], idx_src[:,1] + label_tgt, idx_src[:,2], idx_src[:,3]] = 1 + + # update instance map + self.inst_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + self.net_input[:,-1,:,:] = self.get_edges(self.inst_map) + + # update feature map + self.set_features(idx_src, self.feat, style_id) + + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + + def single_forward(self, net_input, feat_map): + net_input = torch.cat((net_input, feat_map), dim=1) + fake_image = self.netG.forward(net_input) + + if fake_image.size()[0] == 1: + return fake_image.data[0] + return fake_image.data + + + # generate all outputs for different styles + def style_forward(self, click_pt, style_id=-1): + if click_pt is None: + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + self.crop = None + self.mask = None + else: + instToChange = int(self.object_map[0, 0, click_pt[0], click_pt[1]]) + self.instToChange = instToChange + label = instToChange if instToChange < 1000 else instToChange//1000 + self.feat = self.features_clustered[label] + self.fake_image = [] + self.mask = self.object_map == instToChange + idx = self.mask.nonzero() + self.get_crop_region(idx) + if idx.size(): + if style_id == -1: + (min_y, min_x, max_y, max_x) = self.crop + ### original + for cluster_idx in range(self.opt.multiple_output): + self.set_features(idx, self.feat, cluster_idx) + fake_image = self.single_forward(self.net_input, self.feat_map) + fake_image = util.tensor2im(fake_image[:,min_y:max_y,min_x:max_x]) + self.fake_image.append(fake_image) + """### To speed up previewing different style results, either crop or downsample the label maps + if instToChange > 1000: + (min_y, min_x, max_y, max_x) = self.crop + ### crop + _, _, h, w = self.net_input.size() + offset = 512 + y_start, x_start = max(0, min_y-offset), max(0, min_x-offset) + y_end, x_end = min(h, (max_y + offset)), min(w, (max_x + offset)) + y_region = slice(y_start, y_start+(y_end-y_start)//16*16) + x_region = slice(x_start, x_start+(x_end-x_start)//16*16) + net_input = self.net_input[:,:,y_region,x_region] + for cluster_idx in range(self.opt.multiple_output): + self.set_features(idx, self.feat, cluster_idx) + fake_image = self.single_forward(net_input, self.feat_map[:,:,y_region,x_region]) + fake_image = util.tensor2im(fake_image[:,min_y-y_start:max_y-y_start,min_x-x_start:max_x-x_start]) + self.fake_image.append(fake_image) + else: + ### downsample + (min_y, min_x, max_y, max_x) = [crop//2 for crop in self.crop] + net_input = self.net_input[:,:,::2,::2] + size = net_input.size() + net_input_batch = net_input.expand(self.opt.multiple_output, size[1], size[2], size[3]) + for cluster_idx in range(self.opt.multiple_output): + self.set_features(idx, self.feat, cluster_idx) + feat_map = self.feat_map[:,:,::2,::2] + if cluster_idx == 0: + feat_map_batch = feat_map + else: + feat_map_batch = torch.cat((feat_map_batch, feat_map), dim=0) + fake_image_batch = self.single_forward(net_input_batch, feat_map_batch) + for i in range(self.opt.multiple_output): + self.fake_image.append(util.tensor2im(fake_image_batch[i,:,min_y:max_y,min_x:max_x]))""" + + else: + self.set_features(idx, self.feat, style_id) + self.cluster_indices[label] = style_id + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + + def backup_current_state(self): + self.net_input_prev = self.net_input.clone() + self.label_map_prev = self.label_map.clone() + self.inst_map_prev = self.inst_map.clone() + self.feat_map_prev = self.feat_map.clone() + + # crop the ROI and get the mask of the object + def get_crop_region(self, idx): + size = self.net_input.size() + h, w = size[2], size[3] + min_y, min_x = idx[:,2].min(), idx[:,3].min() + max_y, max_x = idx[:,2].max(), idx[:,3].max() + crop_min = 128 + if max_y - min_y < crop_min: + min_y = max(0, (max_y + min_y) // 2 - crop_min // 2) + max_y = min(h-1, min_y + crop_min) + if max_x - min_x < crop_min: + min_x = max(0, (max_x + min_x) // 2 - crop_min // 2) + max_x = min(w-1, min_x + crop_min) + self.crop = (min_y, min_x, max_y, max_x) + self.mask = self.mask[:,:, min_y:max_y, min_x:max_x] + + # update the feature map once a new object is added or the label is changed + def update_features(self, cluster_idx, mask=None, click_pt=None): + self.feat_map_prev = self.feat_map.clone() + # adding a new object + if mask is not None: + y, x = click_pt[0], click_pt[1] + mask = np.transpose(mask, (2,0,1))[np.newaxis,...] + idx = torch.from_numpy(mask).cuda().nonzero() + idx[:,2] += y + idx[:,3] += x + # changing the label of an existing object + else: + idx = (self.object_map == self.instToChange).nonzero() + + # update feature map + self.set_features(idx, self.feat, cluster_idx) + + # set the class features to the target feature + def set_features(self, idx, feat, cluster_idx): + for k in range(self.opt.feat_num): + self.feat_map[idx[:,0], idx[:,1] + k, idx[:,2], idx[:,3]] = feat[cluster_idx, k] + + # copy the features at the target position to the source position + def copy_features(self, idx_src, idx_tgt): + for k in range(self.opt.feat_num): + val = self.feat_map[idx_tgt[0], idx_tgt[1] + k, idx_tgt[2], idx_tgt[3]] + self.feat_map[idx_src[:,0], idx_src[:,1] + k, idx_src[:,2], idx_src[:,3]] = val + + def get_current_visuals(self, getLabel=False): + mask = self.mask + if self.mask is not None: + mask = np.transpose(self.mask[0].cpu().float().numpy(), (1,2,0)).astype(np.uint8) + + dict_list = [('fake_image', self.fake_image), ('mask', mask)] + + if getLabel: # only output label map if needed to save bandwidth + label = util.tensor2label(self.net_input.data[0], self.opt.label_nc) + dict_list += [('label', label)] + + return OrderedDict(dict_list) \ No newline at end of file diff --git a/pix2pixHD/options/__init__.py b/pix2pixHD/options/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/pix2pixHD/options/base_options.py b/pix2pixHD/options/base_options.py new file mode 100755 index 0000000..d64fcaa --- /dev/null +++ b/pix2pixHD/options/base_options.py @@ -0,0 +1,99 @@ +import argparse +import os +from util import util +import torch + +class BaseOptions(): + def __init__(self): + self.parser = argparse.ArgumentParser() + self.initialized = False + + def initialize(self): + # experiment specifics + self.parser.add_argument('--name', type=str, default='fsynth', help='name of the experiment. It decides where to store samples and models') + self.parser.add_argument('--gpu_ids', type=str, default='0', help='gpu ids: e.g. 0 0,1,2, 0,2. use -1 for CPU') + self.parser.add_argument('--checkpoints_dir', type=str, default='./checkpoints', help='models are saved here') + self.parser.add_argument('--model', type=str, default='pix2pixHD', help='which model to use') + self.parser.add_argument('--norm', type=str, default='instance', help='instance normalization or batch normalization') + self.parser.add_argument('--use_dropout', action='store_true', help='use dropout for the generator') + self.parser.add_argument('--data_type', default=32, type=int, choices=[8, 16, 32], help="Supported data type i.e. 8, 16, 32 bit") + self.parser.add_argument('--verbose', action='store_true', default=False, help='toggles verbose') + self.parser.add_argument('--fp16', action='store_true', default=False, help='train with AMP') + self.parser.add_argument('--local_rank', type=int, default=0, help='local rank for distributed training') + + # input/output sizes + self.parser.add_argument('--batchSize', type=int, default=8, help='input batch size') + self.parser.add_argument('--loadSize', type=int, default=256, help='scale images to this size') + self.parser.add_argument('--fineSize', type=int, default=128, help='then crop to this size') + self.parser.add_argument('--label_nc', type=int, default=3, help='# of input label channels') + self.parser.add_argument('--input_nc', type=int, default=3, help='# of input image channels') + self.parser.add_argument('--output_nc', type=int, default=3, help='# of output image channels') + + # for setting inputs + self.parser.add_argument('--dataroot', type=str, default='./datasets/cityscapes/') + self.parser.add_argument('--resize_or_crop', type=str, default='scale_width', help='scaling and cropping of images at load time [resize_and_crop|crop|scale_width|scale_width_and_crop]') + self.parser.add_argument('--serial_batches', action='store_true', help='if true, takes images in order to make batches, otherwise takes them randomly') + self.parser.add_argument('--no_flip', action='store_true', help='if specified, do not flip the images for data argumentation') + self.parser.add_argument('--nThreads', default=2, type=int, help='# threads for loading data') + self.parser.add_argument('--max_dataset_size', type=int, default=float("inf"), help='Maximum number of samples allowed per dataset. If the dataset directory contains more than max_dataset_size, only a subset is loaded.') + + # for displays + self.parser.add_argument('--display_winsize', type=int, default=512, help='display window size') + self.parser.add_argument('--tf_log', action='store_true', help='if specified, use tensorboard logging. Requires tensorflow installed') + + # for generator + self.parser.add_argument('--netG', type=str, default='global', help='selects model to use for netG') + self.parser.add_argument('--ngf', type=int, default=64, help='# of gen filters in first conv layer') + self.parser.add_argument('--n_downsample_global', type=int, default=4, help='number of downsampling layers in netG') + self.parser.add_argument('--n_blocks_global', type=int, default=9, help='number of residual blocks in the global generator network') + self.parser.add_argument('--n_blocks_local', type=int, default=3, help='number of residual blocks in the local enhancer network') + self.parser.add_argument('--n_local_enhancers', type=int, default=1, help='number of local enhancers to use') + self.parser.add_argument('--niter_fix_global', type=int, default=0, help='number of epochs that we only train the outmost local enhancer') + + # for instance-wise features + self.parser.add_argument('--no_instance', action='store_true', help='if specified, do *not* add instance map as input') + self.parser.add_argument('--instance_feat', action='store_true', help='if specified, add encoded instance features as input') + self.parser.add_argument('--label_feat', action='store_true', help='if specified, add encoded label features as input') + self.parser.add_argument('--feat_num', type=int, default=3, help='vector length for encoded features') + self.parser.add_argument('--load_features', action='store_true', help='if specified, load precomputed feature maps') + self.parser.add_argument('--n_downsample_E', type=int, default=4, help='# of downsampling layers in encoder') + self.parser.add_argument('--nef', type=int, default=16, help='# of encoder filters in the first conv layer') + self.parser.add_argument('--n_clusters', type=int, default=10, help='number of clusters for features') + + self.initialized = True + + def parse(self, save=True): + if not self.initialized: + self.initialize() + self.opt = self.parser.parse_args() + self.opt.isTrain = self.isTrain # train or test + + str_ids = self.opt.gpu_ids.split(',') + self.opt.gpu_ids = [] + for str_id in str_ids: + id = int(str_id) + if id >= 0: + self.opt.gpu_ids.append(id) + + # set gpu ids + if len(self.opt.gpu_ids) > 0: + torch.cuda.set_device(self.opt.gpu_ids[0]) + + args = vars(self.opt) + + print('------------ Options -------------') + for k, v in sorted(args.items()): + print('%s: %s' % (str(k), str(v))) + print('-------------- End ----------------') + + # save to the disk + expr_dir = os.path.join(self.opt.checkpoints_dir, self.opt.name) + util.mkdirs(expr_dir) + if save and not self.opt.continue_train: + file_name = os.path.join(expr_dir, 'opt.txt') + with open(file_name, 'wt') as opt_file: + opt_file.write('------------ Options -------------\n') + for k, v in sorted(args.items()): + opt_file.write('%s: %s\n' % (str(k), str(v))) + opt_file.write('-------------- End ----------------\n') + return self.opt diff --git a/pix2pixHD/options/test_options.py b/pix2pixHD/options/test_options.py new file mode 100755 index 0000000..f27fc5e --- /dev/null +++ b/pix2pixHD/options/test_options.py @@ -0,0 +1,17 @@ +from .base_options import BaseOptions + +class TestOptions(BaseOptions): + def initialize(self): + BaseOptions.initialize(self) + self.parser.add_argument('--ntest', type=int, default=float("inf"), help='# of test examples.') + self.parser.add_argument('--results_dir', type=str, default='./results/', help='saves results here.') + self.parser.add_argument('--aspect_ratio', type=float, default=1.0, help='aspect ratio of result images') + self.parser.add_argument('--phase', type=str, default='test', help='train, val, test, etc') + self.parser.add_argument('--which_epoch', type=str, default='latest', help='which epoch to load? set to latest to use latest cached model') + self.parser.add_argument('--how_many', type=int, default=50, help='how many test images to run') + self.parser.add_argument('--cluster_path', type=str, default='features_clustered_010.npy', help='the path for clustered results of encoded features') + self.parser.add_argument('--use_encoded_image', action='store_true', help='if specified, encode the real image to get the feature map') + self.parser.add_argument("--export_onnx", type=str, help="export ONNX model to a given file") + self.parser.add_argument("--engine", type=str, help="run serialized TRT engine") + self.parser.add_argument("--onnx", type=str, help="run ONNX model via TRT") + self.isTrain = False diff --git a/pix2pixHD/options/train_options.py b/pix2pixHD/options/train_options.py new file mode 100755 index 0000000..0a20057 --- /dev/null +++ b/pix2pixHD/options/train_options.py @@ -0,0 +1,34 @@ +from .base_options import BaseOptions + +class TrainOptions(BaseOptions): + def initialize(self): + BaseOptions.initialize(self) + # for displays + self.parser.add_argument('--display_freq', type=int, default=100, help='frequency of showing training results on screen') + self.parser.add_argument('--print_freq', type=int, default=100, help='frequency of showing training results on console') + self.parser.add_argument('--save_latest_freq', type=int, default=1000, help='frequency of saving the latest results') + self.parser.add_argument('--save_epoch_freq', type=int, default=10, help='frequency of saving checkpoints at the end of epochs') + self.parser.add_argument('--no_html', action='store_true', help='do not save intermediate training results to [opt.checkpoints_dir]/[opt.name]/web/') + self.parser.add_argument('--debug', action='store_true', help='only do one epoch and displays at each iteration') + + # for training + self.parser.add_argument('--continue_train', action='store_true', help='continue training: load the latest model') + self.parser.add_argument('--load_pretrain', type=str, default='', help='load the pretrained model from the specified location') + self.parser.add_argument('--which_epoch', type=str, default='latest', help='which epoch to load? set to latest to use latest cached model') + self.parser.add_argument('--phase', type=str, default='train', help='train, val, test, etc') + self.parser.add_argument('--niter', type=int, default=100, help='# of iter at starting learning rate') + self.parser.add_argument('--niter_decay', type=int, default=100, help='# of iter to linearly decay learning rate to zero') + self.parser.add_argument('--beta1', type=float, default=0.5, help='momentum term of adam') + self.parser.add_argument('--lr', type=float, default=0.0002, help='initial learning rate for adam') + + # for discriminators + self.parser.add_argument('--num_D', type=int, default=2, help='number of discriminators to use') + self.parser.add_argument('--n_layers_D', type=int, default=3, help='only used if which_model_netD==n_layers') + self.parser.add_argument('--ndf', type=int, default=64, help='# of discrim filters in first conv layer') + self.parser.add_argument('--lambda_feat', type=float, default=100.0, help='weight for feature matching loss') + self.parser.add_argument('--no_ganFeat_loss', action='store_true', help='if specified, do *not* use discriminator feature matching loss') + self.parser.add_argument('--no_vgg_loss', action='store_true', help='if specified, do *not* use VGG feature matching loss') + self.parser.add_argument('--no_lsgan', action='store_true', help='do *not* use least square GAN, if false, use vanilla GAN') + self.parser.add_argument('--pool_size', type=int, default=0, help='the size of image buffer that stores previously generated images') + + self.isTrain = True diff --git a/pix2pixHD/precompute_feature_maps.py b/pix2pixHD/precompute_feature_maps.py new file mode 100755 index 0000000..8836ea2 --- /dev/null +++ b/pix2pixHD/precompute_feature_maps.py @@ -0,0 +1,33 @@ +from options.train_options import TrainOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import os +import util.util as util +from torch.autograd import Variable +import torch.nn as nn + +opt = TrainOptions().parse() +opt.nThreads = 1 +opt.batchSize = 1 +opt.serial_batches = True +opt.no_flip = True +opt.instance_feat = True + +name = 'features' +save_path = os.path.join(opt.checkpoints_dir, opt.name) + +############ Initialize ######### +data_loader = CreateDataLoader(opt) +dataset = data_loader.load_data() +dataset_size = len(data_loader) +model = create_model(opt) +util.mkdirs(os.path.join(opt.dataroot, opt.phase + '_feat')) + +######## Save precomputed feature maps for 1024p training ####### +for i, data in enumerate(dataset): + print('%d / %d images' % (i+1, dataset_size)) + feat_map = model.module.netE.forward(Variable(data['image'].cuda(), volatile=True), data['inst'].cuda()) + feat_map = nn.Upsample(scale_factor=2, mode='nearest')(feat_map) + image_numpy = util.tensor2im(feat_map.data[0]) + save_path = data['path'][0].replace('/train_label/', '/train_feat/') + util.save_image(image_numpy, save_path) \ No newline at end of file diff --git a/pix2pixHD/results b/pix2pixHD/results new file mode 120000 index 0000000..d5ed8d1 --- /dev/null +++ b/pix2pixHD/results @@ -0,0 +1 @@ +/scratch2/fsynth/results \ No newline at end of file diff --git a/pix2pixHD/run_engine.py b/pix2pixHD/run_engine.py new file mode 100644 index 0000000..700494d --- /dev/null +++ b/pix2pixHD/run_engine.py @@ -0,0 +1,173 @@ +import os +import sys +from random import randint +import numpy as np +import tensorrt + +try: + from PIL import Image + import pycuda.driver as cuda + import pycuda.gpuarray as gpuarray + import pycuda.autoinit + import argparse +except ImportError as err: + sys.stderr.write("""ERROR: failed to import module ({}) +Please make sure you have pycuda and the example dependencies installed. +https://wiki.tiker.net/PyCuda/Installation/Linux +pip(3) install tensorrt[examples] +""".format(err)) + exit(1) + +try: + import tensorrt as trt + from tensorrt.parsers import caffeparser + from tensorrt.parsers import onnxparser +except ImportError as err: + sys.stderr.write("""ERROR: failed to import module ({}) +Please make sure you have the TensorRT Library installed +and accessible in your LD_LIBRARY_PATH +""".format(err)) + exit(1) + + +G_LOGGER = trt.infer.ConsoleLogger(trt.infer.LogSeverity.INFO) + +class Profiler(trt.infer.Profiler): + """ + Example Implimentation of a Profiler + Is identical to the Profiler class in trt.infer so it is possible + to just use that instead of implementing this if further + functionality is not needed + """ + def __init__(self, timing_iter): + trt.infer.Profiler.__init__(self) + self.timing_iterations = timing_iter + self.profile = [] + + def report_layer_time(self, layerName, ms): + record = next((r for r in self.profile if r[0] == layerName), (None, None)) + if record == (None, None): + self.profile.append((layerName, ms)) + else: + self.profile[self.profile.index(record)] = (record[0], record[1] + ms) + + def print_layer_times(self): + totalTime = 0 + for i in range(len(self.profile)): + print("{:40.40} {:4.3f}ms".format(self.profile[i][0], self.profile[i][1] / self.timing_iterations)) + totalTime += self.profile[i][1] + print("Time over all layers: {:4.2f} ms per iteration".format(totalTime / self.timing_iterations)) + + +def get_input_output_names(trt_engine): + nbindings = trt_engine.get_nb_bindings(); + maps = [] + + for b in range(0, nbindings): + dims = trt_engine.get_binding_dimensions(b).to_DimsCHW() + name = trt_engine.get_binding_name(b) + type = trt_engine.get_binding_data_type(b) + + if (trt_engine.binding_is_input(b)): + maps.append(name) + print("Found input: ", name) + else: + maps.append(name) + print("Found output: ", name) + + print("shape=" + str(dims.C()) + " , " + str(dims.H()) + " , " + str(dims.W())) + print("dtype=" + str(type)) + return maps + +def create_memory(engine, name, buf, mem, batchsize, inp, inp_idx): + binding_idx = engine.get_binding_index(name) + if binding_idx == -1: + raise AttributeError("Not a valid binding") + print("Binding: name={}, bindingIndex={}".format(name, str(binding_idx))) + dims = engine.get_binding_dimensions(binding_idx).to_DimsCHW() + eltCount = dims.C() * dims.H() * dims.W() * batchsize + + if engine.binding_is_input(binding_idx): + h_mem = inp[inp_idx] + inp_idx = inp_idx + 1 + else: + h_mem = np.random.uniform(0.0, 255.0, eltCount).astype(np.dtype('f4')) + + d_mem = cuda.mem_alloc(eltCount * 4) + cuda.memcpy_htod(d_mem, h_mem) + buf.insert(binding_idx, int(d_mem)) + mem.append(d_mem) + return inp_idx + + +#Run inference on device +def time_inference(engine, batch_size, inp): + bindings = [] + mem = [] + inp_idx = 0 + for io in get_input_output_names(engine): + inp_idx = create_memory(engine, io, bindings, mem, + batch_size, inp, inp_idx) + + context = engine.create_execution_context() + g_prof = Profiler(500) + context.set_profiler(g_prof) + for i in range(iter): + context.execute(batch_size, bindings) + g_prof.print_layer_times() + + context.destroy() + return + + +def convert_to_datatype(v): + if v==8: + return trt.infer.DataType.INT8 + elif v==16: + return trt.infer.DataType.HALF + elif v==32: + return trt.infer.DataType.FLOAT + else: + print("ERROR: Invalid model data type bit depth: " + str(v)) + return trt.infer.DataType.INT8 + +def run_trt_engine(engine_file, bs, it): + engine = trt.utils.load_engine(G_LOGGER, engine_file) + time_inference(engine, bs, it) + +def run_onnx(onnx_file, data_type, bs, inp): + # Create onnx_config + apex = onnxparser.create_onnxconfig() + apex.set_model_file_name(onnx_file) + apex.set_model_dtype(convert_to_datatype(data_type)) + + # create parser + trt_parser = onnxparser.create_onnxparser(apex) + assert(trt_parser) + data_type = apex.get_model_dtype() + onnx_filename = apex.get_model_file_name() + trt_parser.parse(onnx_filename, data_type) + trt_parser.report_parsing_info() + trt_parser.convert_to_trtnetwork() + trt_network = trt_parser.get_trtnetwork() + assert(trt_network) + + # create infer builder + trt_builder = trt.infer.create_infer_builder(G_LOGGER) + trt_builder.set_max_batch_size(max_batch_size) + trt_builder.set_max_workspace_size(max_workspace_size) + + if (apex.get_model_dtype() == trt.infer.DataType_kHALF): + print("------------------- Running FP16 -----------------------------") + trt_builder.set_half2_mode(True) + elif (apex.get_model_dtype() == trt.infer.DataType_kINT8): + print("------------------- Running INT8 -----------------------------") + trt_builder.set_int8_mode(True) + else: + print("------------------- Running FP32 -----------------------------") + + print("----- Builder is Done -----") + print("----- Creating Engine -----") + trt_engine = trt_builder.build_cuda_engine(trt_network) + print("----- Engine is built -----") + time_inference(engine, bs, inp) diff --git a/pix2pixHD/scripts/test_1024p.sh b/pix2pixHD/scripts/test_1024p.sh new file mode 100755 index 0000000..319803c --- /dev/null +++ b/pix2pixHD/scripts/test_1024p.sh @@ -0,0 +1,4 @@ +#!/bin/bash +################################ Testing ################################ +# labels only +python test.py --name label2city_1024p --netG local --ngf 32 --resize_or_crop none $@ diff --git a/pix2pixHD/scripts/test_1024p_feat.sh b/pix2pixHD/scripts/test_1024p_feat.sh new file mode 100755 index 0000000..2f4ba17 --- /dev/null +++ b/pix2pixHD/scripts/test_1024p_feat.sh @@ -0,0 +1,5 @@ +################################ Testing ################################ +# first precompute and cluster all features +python encode_features.py --name label2city_1024p_feat --netG local --ngf 32 --resize_or_crop none; +# use instance-wise features +python test.py --name label2city_1024p_feat ---netG local --ngf 32 --resize_or_crop none --instance_feat \ No newline at end of file diff --git a/pix2pixHD/scripts/test_512p.sh b/pix2pixHD/scripts/test_512p.sh new file mode 100755 index 0000000..3131043 --- /dev/null +++ b/pix2pixHD/scripts/test_512p.sh @@ -0,0 +1,3 @@ +################################ Testing ################################ +# labels only +python test.py --name label2city_512p \ No newline at end of file diff --git a/pix2pixHD/scripts/test_512p_feat.sh b/pix2pixHD/scripts/test_512p_feat.sh new file mode 100755 index 0000000..8f25e9c --- /dev/null +++ b/pix2pixHD/scripts/test_512p_feat.sh @@ -0,0 +1,5 @@ +################################ Testing ################################ +# first precompute and cluster all features +python encode_features.py --name label2city_512p_feat; +# use instance-wise features +python test.py --name label2city_512p_feat --instance_feat \ No newline at end of file diff --git a/pix2pixHD/scripts/train_1024p_12G.sh b/pix2pixHD/scripts/train_1024p_12G.sh new file mode 100755 index 0000000..d5ea7d7 --- /dev/null +++ b/pix2pixHD/scripts/train_1024p_12G.sh @@ -0,0 +1,4 @@ +############## To train images at 2048 x 1024 resolution after training 1024 x 512 resolution models ############# +##### Using GPUs with 12G memory (not tested) +# Using labels only +python train.py --name label2city_1024p --netG local --ngf 32 --num_D 3 --load_pretrain checkpoints/label2city_512p/ --niter_fix_global 20 --resize_or_crop crop --fineSize 1024 \ No newline at end of file diff --git a/pix2pixHD/scripts/train_1024p_24G.sh b/pix2pixHD/scripts/train_1024p_24G.sh new file mode 100755 index 0000000..88e58f7 --- /dev/null +++ b/pix2pixHD/scripts/train_1024p_24G.sh @@ -0,0 +1,4 @@ +############## To train images at 2048 x 1024 resolution after training 1024 x 512 resolution models ############# +######## Using GPUs with 24G memory +# Using labels only +python train.py --name label2city_1024p --netG local --ngf 32 --num_D 3 --load_pretrain checkpoints/label2city_512p/ --niter 50 --niter_decay 50 --niter_fix_global 10 --resize_or_crop none \ No newline at end of file diff --git a/pix2pixHD/scripts/train_1024p_feat_12G.sh b/pix2pixHD/scripts/train_1024p_feat_12G.sh new file mode 100755 index 0000000..f8e3d61 --- /dev/null +++ b/pix2pixHD/scripts/train_1024p_feat_12G.sh @@ -0,0 +1,6 @@ +############## To train images at 2048 x 1024 resolution after training 1024 x 512 resolution models ############# +##### Using GPUs with 12G memory (not tested) +# First precompute feature maps and save them +python precompute_feature_maps.py --name label2city_512p_feat; +# Adding instances and encoded features +python train.py --name label2city_1024p_feat --netG local --ngf 32 --num_D 3 --load_pretrain checkpoints/label2city_512p_feat/ --niter_fix_global 20 --resize_or_crop crop --fineSize 896 --instance_feat --load_features \ No newline at end of file diff --git a/pix2pixHD/scripts/train_1024p_feat_24G.sh b/pix2pixHD/scripts/train_1024p_feat_24G.sh new file mode 100755 index 0000000..399d720 --- /dev/null +++ b/pix2pixHD/scripts/train_1024p_feat_24G.sh @@ -0,0 +1,6 @@ +############## To train images at 2048 x 1024 resolution after training 1024 x 512 resolution models ############# +######## Using GPUs with 24G memory +# First precompute feature maps and save them +python precompute_feature_maps.py --name label2city_512p_feat; +# Adding instances and encoded features +python train.py --name label2city_1024p_feat --netG local --ngf 32 --num_D 3 --load_pretrain checkpoints/label2city_512p_feat/ --niter 50 --niter_decay 50 --niter_fix_global 10 --resize_or_crop none --instance_feat --load_features \ No newline at end of file diff --git a/pix2pixHD/scripts/train_512p.sh b/pix2pixHD/scripts/train_512p.sh new file mode 100755 index 0000000..222c348 --- /dev/null +++ b/pix2pixHD/scripts/train_512p.sh @@ -0,0 +1,2 @@ +### Using labels only +python train.py --name label2city_512p \ No newline at end of file diff --git a/pix2pixHD/scripts/train_512p_feat.sh b/pix2pixHD/scripts/train_512p_feat.sh new file mode 100755 index 0000000..9d4859c --- /dev/null +++ b/pix2pixHD/scripts/train_512p_feat.sh @@ -0,0 +1,2 @@ +### Adding instances and encoded features +python train.py --name label2city_512p_feat --instance_feat \ No newline at end of file diff --git a/pix2pixHD/scripts/train_512p_fp16.sh b/pix2pixHD/scripts/train_512p_fp16.sh new file mode 100755 index 0000000..2bd5e07 --- /dev/null +++ b/pix2pixHD/scripts/train_512p_fp16.sh @@ -0,0 +1,2 @@ +### Using labels only + python -m torch.distributed.launch train.py --name label2city_512p --fp16 \ No newline at end of file diff --git a/pix2pixHD/scripts/train_512p_fp16_multigpu.sh b/pix2pixHD/scripts/train_512p_fp16_multigpu.sh new file mode 100755 index 0000000..0d9686c --- /dev/null +++ b/pix2pixHD/scripts/train_512p_fp16_multigpu.sh @@ -0,0 +1,2 @@ +######## Multi-GPU training example ####### +python -m torch.distributed.launch train.py --name label2city_512p --batchSize 8 --gpu_ids 0,1,2,3,4,5,6,7 --fp16 \ No newline at end of file diff --git a/pix2pixHD/scripts/train_512p_multigpu.sh b/pix2pixHD/scripts/train_512p_multigpu.sh new file mode 100755 index 0000000..16f0a1a --- /dev/null +++ b/pix2pixHD/scripts/train_512p_multigpu.sh @@ -0,0 +1,2 @@ +######## Multi-GPU training example ####### +python train.py --name label2city_512p --batchSize 8 --gpu_ids 0,1,2,3,4,5,6,7 \ No newline at end of file diff --git a/pix2pixHD/test.py b/pix2pixHD/test.py new file mode 100755 index 0000000..e0b1ec3 --- /dev/null +++ b/pix2pixHD/test.py @@ -0,0 +1,67 @@ +import os +from collections import OrderedDict +from torch.autograd import Variable +from options.test_options import TestOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import util.util as util +from util.visualizer import Visualizer +from util import html +import torch + +opt = TestOptions().parse(save=False) +opt.nThreads = 1 # test code only supports nThreads = 1 +opt.batchSize = 1 # test code only supports batchSize = 1 +opt.serial_batches = True # no shuffle +opt.no_flip = True # no flip + +data_loader = CreateDataLoader(opt) +dataset = data_loader.load_data() +visualizer = Visualizer(opt) +# create website +web_dir = os.path.join(opt.results_dir, opt.name, '%s_%s' % (opt.phase, opt.which_epoch)) +webpage = html.HTML(web_dir, 'Experiment = %s, Phase = %s, Epoch = %s' % (opt.name, opt.phase, opt.which_epoch)) + +# test +if not opt.engine and not opt.onnx: + model = create_model(opt) + if opt.data_type == 16: + model.half() + elif opt.data_type == 8: + model.type(torch.uint8) + + if opt.verbose: + print(model) +else: + from run_engine import run_trt_engine, run_onnx + +for i, data in enumerate(dataset): + if i >= opt.how_many: + break + if opt.data_type == 16: + data['label'] = data['label'].half() + data['inst'] = data['inst'].half() + elif opt.data_type == 8: + data['label'] = data['label'].uint8() + data['inst'] = data['inst'].uint8() + if opt.export_onnx: + print ("Exporting to ONNX: ", opt.export_onnx) + assert opt.export_onnx.endswith("onnx"), "Export model file should end with .onnx" + torch.onnx.export(model, [data['label'], data['inst']], + opt.export_onnx, verbose=True) + exit(0) + minibatch = 1 + if opt.engine: + generated = run_trt_engine(opt.engine, minibatch, [data['label'], data['inst']]) + elif opt.onnx: + generated = run_onnx(opt.onnx, opt.data_type, minibatch, [data['label'], data['inst']]) + else: + generated = model.inference(data['label'], data['inst'], data['image']) + + visuals = OrderedDict([('input_label', util.tensor2label(data['label'][0], opt.label_nc)), + ('synthesized_image', util.tensor2im(generated.data[0]))]) + img_path = data['path'] + print('process image... %s' % img_path) + visualizer.save_images(webpage, visuals, img_path) + +webpage.save() diff --git a/pix2pixHD/train.py b/pix2pixHD/train.py new file mode 100755 index 0000000..acedac2 --- /dev/null +++ b/pix2pixHD/train.py @@ -0,0 +1,141 @@ +import time +import os +import numpy as np +import torch +from torch.autograd import Variable +from collections import OrderedDict +from subprocess import call +import fractions +def lcm(a,b): return abs(a * b)/fractions.gcd(a,b) if a and b else 0 + +from options.train_options import TrainOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import util.util as util +from util.visualizer import Visualizer + +opt = TrainOptions().parse() +iter_path = os.path.join(opt.checkpoints_dir, opt.name, 'iter.txt') +if opt.continue_train: + try: + start_epoch, epoch_iter = np.loadtxt(iter_path , delimiter=',', dtype=int) + except: + start_epoch, epoch_iter = 1, 0 + print('Resuming from epoch %d at iteration %d' % (start_epoch, epoch_iter)) +else: + start_epoch, epoch_iter = 1, 0 + +opt.print_freq = lcm(opt.print_freq, opt.batchSize) +if opt.debug: + opt.display_freq = 1 + opt.print_freq = 1 + opt.niter = 1 + opt.niter_decay = 0 + opt.max_dataset_size = 10 + +data_loader = CreateDataLoader(opt) +dataset = data_loader.load_data() +dataset_size = len(data_loader) +print('#training images = %d' % dataset_size) + +model = create_model(opt) +visualizer = Visualizer(opt) +if opt.fp16: + from apex import amp + model, [optimizer_G, optimizer_D] = amp.initialize(model, [model.optimizer_G, model.optimizer_D], opt_level='O1') + model = torch.nn.DataParallel(model, device_ids=opt.gpu_ids) +else: + optimizer_G, optimizer_D = model.module.optimizer_G, model.module.optimizer_D + +total_steps = (start_epoch-1) * dataset_size + epoch_iter + +display_delta = total_steps % opt.display_freq +print_delta = total_steps % opt.print_freq +save_delta = total_steps % opt.save_latest_freq + +for epoch in range(start_epoch, opt.niter + opt.niter_decay + 1): + epoch_start_time = time.time() + if epoch != start_epoch: + epoch_iter = epoch_iter % dataset_size + for i, data in enumerate(dataset, start=epoch_iter): + if total_steps % opt.print_freq == print_delta: + iter_start_time = time.time() + total_steps += opt.batchSize + epoch_iter += opt.batchSize + + # whether to collect output images + save_fake = total_steps % opt.display_freq == display_delta + + ############## Forward Pass ###################### + losses, generated = model(Variable(data['label']), Variable(data['inst']), + Variable(data['image']), Variable(data['feat']), infer=save_fake) + + # sum per device losses + losses = [ torch.mean(x) if not isinstance(x, int) else x for x in losses ] + loss_dict = dict(zip(model.module.loss_names, losses)) + + # calculate final loss scalar + loss_D = (loss_dict['D_fake'] + loss_dict['D_real']) * 0.5 + loss_G = loss_dict['G_GAN'] + loss_dict.get('G_GAN_Feat',0) + loss_dict.get('G_VGG',0) + + ############### Backward Pass #################### + # update generator weights + optimizer_G.zero_grad() + if opt.fp16: + with amp.scale_loss(loss_G, optimizer_G) as scaled_loss: scaled_loss.backward() + else: + loss_G.backward() + optimizer_G.step() + + # update discriminator weights + optimizer_D.zero_grad() + if opt.fp16: + with amp.scale_loss(loss_D, optimizer_D) as scaled_loss: scaled_loss.backward() + else: + loss_D.backward() + optimizer_D.step() + + ############## Display results and errors ########## + ### print out errors + if total_steps % opt.print_freq == print_delta: + errors = {k: v.data.item() if not isinstance(v, int) else v for k, v in loss_dict.items()} + t = (time.time() - iter_start_time) / opt.print_freq + visualizer.print_current_errors(epoch, epoch_iter, errors, t) + visualizer.plot_current_errors(errors, total_steps) + #call(["nvidia-smi", "--format=csv", "--query-gpu=memory.used,memory.free"]) + + ### display output images + if save_fake: + visuals = OrderedDict([('input_label', util.tensor2label(data['label'][0], opt.label_nc)), + ('synthesized_image', util.tensor2im(generated.data[0])), + ('real_image', util.tensor2im(data['image'][0]))]) + visualizer.display_current_results(visuals, epoch, total_steps) + + ### save latest model + if total_steps % opt.save_latest_freq == save_delta: + print('saving the latest model (epoch %d, total_steps %d)' % (epoch, total_steps)) + model.module.save('latest') + np.savetxt(iter_path, (epoch, epoch_iter), delimiter=',', fmt='%d') + + if epoch_iter >= dataset_size: + break + + # end of epoch + iter_end_time = time.time() + print('End of epoch %d / %d \t Time Taken: %d sec' % + (epoch, opt.niter + opt.niter_decay, time.time() - epoch_start_time)) + + ### save model for this epoch + if epoch % opt.save_epoch_freq == 0: + print('saving the model at the end of epoch %d, iters %d' % (epoch, total_steps)) + model.module.save('latest') + model.module.save(epoch) + np.savetxt(iter_path, (epoch+1, 0), delimiter=',', fmt='%d') + + ### instead of only training the local enhancer, train the entire network after certain iterations + if (opt.niter_fix_global != 0) and (epoch == opt.niter_fix_global): + model.module.update_fixed_params() + + ### linearly decay learning rate after certain iterations + if epoch > opt.niter: + model.module.update_learning_rate() diff --git a/pix2pixHD/train_fsynth.py b/pix2pixHD/train_fsynth.py new file mode 100755 index 0000000..7f827ea --- /dev/null +++ b/pix2pixHD/train_fsynth.py @@ -0,0 +1,153 @@ +import time +import os +import numpy as np +import torch +from torch.autograd import Variable +from collections import OrderedDict +from subprocess import call +import fractions +def lcm(a,b): return abs(a * b)/fractions.gcd(a,b) if a and b else 0 + +from options.train_options import TrainOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import util.util as util +from util.visualizer import Visualizer +from torchvision import transforms + +from data import avspeech +from torch.utils.data import DataLoader + +opt = TrainOptions().parse() +iter_path = os.path.join(opt.checkpoints_dir, opt.name, 'iter.txt') +if opt.continue_train: + try: + start_epoch, epoch_iter = np.loadtxt(iter_path , delimiter=',', dtype=int) + except: + start_epoch, epoch_iter = 1, 0 + print('Resuming from epoch %d at iteration %d' % (start_epoch, epoch_iter)) +else: + start_epoch, epoch_iter = 1, 0 + +opt.print_freq = lcm(opt.print_freq, opt.batchSize) +if opt.debug: + opt.display_freq = 1 + opt.print_freq = 1 + opt.niter = 1 + opt.niter_decay = 0 + opt.max_dataset_size = 10 + +transform = transforms.Compose([ + transforms.ToTensor(), + transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)) + ]) + +dataset = avspeech.AVSpeech(transform) +loader = DataLoader(dataset, batch_size=opt.batchSize, shuffle=True, num_workers=2) +dataset_size = len(dataset) +print('#training images = %d' % dataset_size) + +model = create_model(opt) +visualizer = Visualizer(opt) +if opt.fp16: + from apex import amp + model, [optimizer_G, optimizer_D] = amp.initialize(model, [model.optimizer_G, model.optimizer_D], opt_level='O1') + model = torch.nn.DataParallel(model, device_ids=opt.gpu_ids) +else: + optimizer_G, optimizer_D = model.module.optimizer_G, model.module.optimizer_D + +total_steps = (start_epoch-1) * dataset_size + epoch_iter + +display_delta = total_steps % opt.display_freq +print_delta = total_steps % opt.print_freq +save_delta = total_steps % opt.save_latest_freq + +for epoch in range(start_epoch, 1000): + epoch_start_time = time.time() + if epoch != start_epoch: + epoch_iter = epoch_iter % dataset_size + + # 100 per epoch + for _ in range(1000): + for i, data in enumerate(loader, start=epoch_iter): + if total_steps % opt.print_freq == print_delta: + iter_start_time = time.time() + total_steps += opt.batchSize + epoch_iter += opt.batchSize + + # whether to collect output images + save_fake = total_steps % opt.display_freq == display_delta + + ############## Forward Pass ###################### + losses, generated = model(data['tgt_lnd'], data['ref_img'], data['tgt_img'], infer=save_fake) + + # sum per device losses + losses = [ torch.mean(x) if not isinstance(x, int) else x for x in losses ] + loss_dict = dict(zip(model.module.loss_names, losses)) + + # calculate final loss scalar + loss_D = (loss_dict['D_fake'] + loss_dict['D_real']) * 0.5 + loss_G = loss_dict['G_GAN'] + loss_dict.get('G_GAN_Feat',0) + loss_dict.get('G_VGG',0) + + ############### Backward Pass #################### + # update generator weights + optimizer_G.zero_grad() + if opt.fp16: + with amp.scale_loss(loss_G, optimizer_G) as scaled_loss: scaled_loss.backward() + else: + loss_G.backward() + optimizer_G.step() + + # update discriminator weights + optimizer_D.zero_grad() + if opt.fp16: + with amp.scale_loss(loss_D, optimizer_D) as scaled_loss: scaled_loss.backward() + else: + loss_D.backward() + optimizer_D.step() + + ############## Display results and errors ########## + ### print out errors + if total_steps % opt.print_freq == print_delta: + errors = {k: v.data.item() if not isinstance(v, int) else v for k, v in loss_dict.items()} + t = (time.time() - iter_start_time) / opt.print_freq + visualizer.print_current_errors(epoch, epoch_iter, errors, t) + visualizer.plot_current_errors(errors, total_steps) + #call(["nvidia-smi", "--format=csv", "--query-gpu=memory.used,memory.free"]) + + ### display output images + if save_fake: + visuals = OrderedDict([('ref_img', util.tensor2im(data['ref_img'].data[0])), + ('tgt_lnd', util.tensor2im(data['tgt_lnd'][0])), + ('synth_img', util.tensor2im(generated.data[0])), + ('tgt_img', util.tensor2im(data['tgt_img'][0]))]) + visualizer.display_current_results(visuals, epoch, total_steps) + + ### save latest model + if total_steps % opt.save_latest_freq == save_delta: + print('saving the latest model (epoch %d, total_steps %d)' % (epoch, total_steps)) + model.module.save('latest') + np.savetxt(iter_path, (epoch, epoch_iter), delimiter=',', fmt='%d') + + if epoch_iter >= dataset_size: + break + + # end of epoch + iter_end_time = time.time() + print('End of epoch %d / %d \t Time Taken: %d sec' % + (epoch, opt.niter + opt.niter_decay, time.time() - epoch_start_time)) + + ### save model for this epoch + if epoch % opt.save_epoch_freq == 0: + print('saving the model at the end of epoch %d, iters %d' % (epoch, total_steps)) + model.module.save('latest') + model.module.save(epoch) + np.savetxt(iter_path, (epoch+1, 0), delimiter=',', fmt='%d') + + ### instead of only training the local enhancer, train the entire network after certain iterations + if (opt.niter_fix_global != 0) and (epoch == opt.niter_fix_global): + model.module.update_fixed_params() + + ### linearly decay learning rate after certain iterations + if epoch > opt.niter: + model.module.update_learning_rate() diff --git a/pix2pixHD/util/__init__.py b/pix2pixHD/util/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/pix2pixHD/util/html.py b/pix2pixHD/util/html.py new file mode 100755 index 0000000..71c48ad --- /dev/null +++ b/pix2pixHD/util/html.py @@ -0,0 +1,63 @@ +import dominate +from dominate.tags import * +import os + + +class HTML: + def __init__(self, web_dir, title, refresh=0): + self.title = title + self.web_dir = web_dir + self.img_dir = os.path.join(self.web_dir, 'images') + if not os.path.exists(self.web_dir): + os.makedirs(self.web_dir) + if not os.path.exists(self.img_dir): + os.makedirs(self.img_dir) + + self.doc = dominate.document(title=title) + if refresh > 0: + with self.doc.head: + meta(http_equiv="refresh", content=str(refresh)) + + def get_image_dir(self): + return self.img_dir + + def add_header(self, str): + with self.doc: + h3(str) + + def add_table(self, border=1): + self.t = table(border=border, style="table-layout: fixed;") + self.doc.add(self.t) + + def add_images(self, ims, txts, links, width=512): + self.add_table() + with self.t: + with tr(): + for im, txt, link in zip(ims, txts, links): + with td(style="word-wrap: break-word;", halign="center", valign="top"): + with p(): + with a(href=os.path.join('images', link)): + img(style="width:%dpx" % (width), src=os.path.join('images', im)) + br() + p(txt) + + def save(self): + html_file = '%s/index.html' % self.web_dir + f = open(html_file, 'wt') + f.write(self.doc.render()) + f.close() + + +if __name__ == '__main__': + html = HTML('web/', 'test_html') + html.add_header('hello world') + + ims = [] + txts = [] + links = [] + for n in range(4): + ims.append('image_%d.jpg' % n) + txts.append('text_%d' % n) + links.append('image_%d.jpg' % n) + html.add_images(ims, txts, links) + html.save() diff --git a/pix2pixHD/util/image_pool.py b/pix2pixHD/util/image_pool.py new file mode 100755 index 0000000..63e1877 --- /dev/null +++ b/pix2pixHD/util/image_pool.py @@ -0,0 +1,31 @@ +import random +import torch +from torch.autograd import Variable +class ImagePool(): + def __init__(self, pool_size): + self.pool_size = pool_size + if self.pool_size > 0: + self.num_imgs = 0 + self.images = [] + + def query(self, images): + if self.pool_size == 0: + return images + return_images = [] + for image in images.data: + image = torch.unsqueeze(image, 0) + if self.num_imgs < self.pool_size: + self.num_imgs = self.num_imgs + 1 + self.images.append(image) + return_images.append(image) + else: + p = random.uniform(0, 1) + if p > 0.5: + random_id = random.randint(0, self.pool_size-1) + tmp = self.images[random_id].clone() + self.images[random_id] = image + return_images.append(tmp) + else: + return_images.append(image) + return_images = Variable(torch.cat(return_images, 0)) + return return_images diff --git a/pix2pixHD/util/util.py b/pix2pixHD/util/util.py new file mode 100755 index 0000000..f4f79ec --- /dev/null +++ b/pix2pixHD/util/util.py @@ -0,0 +1,100 @@ +from __future__ import print_function +import torch +import numpy as np +from PIL import Image +import numpy as np +import os + +# Converts a Tensor into a Numpy array +# |imtype|: the desired type of the converted numpy array +def tensor2im(image_tensor, imtype=np.uint8, normalize=True): + if isinstance(image_tensor, list): + image_numpy = [] + for i in range(len(image_tensor)): + image_numpy.append(tensor2im(image_tensor[i], imtype, normalize)) + return image_numpy + image_numpy = image_tensor.cpu().float().numpy() + if normalize: + image_numpy = (np.transpose(image_numpy, (1, 2, 0)) + 1) / 2.0 * 255.0 + else: + image_numpy = np.transpose(image_numpy, (1, 2, 0)) * 255.0 + image_numpy = np.clip(image_numpy, 0, 255) + if image_numpy.shape[2] == 1 or image_numpy.shape[2] > 3: + image_numpy = image_numpy[:,:,0] + return image_numpy.astype(imtype) + +# Converts a one-hot tensor into a colorful label map +def tensor2label(label_tensor, n_label, imtype=np.uint8): + if n_label == 0: + return tensor2im(label_tensor, imtype) + label_tensor = label_tensor.cpu().float() + if label_tensor.size()[0] > 1: + label_tensor = label_tensor.max(0, keepdim=True)[1] + label_tensor = Colorize(n_label)(label_tensor) + label_numpy = np.transpose(label_tensor.numpy(), (1, 2, 0)) + return label_numpy.astype(imtype) + +def save_image(image_numpy, image_path): + image_pil = Image.fromarray(image_numpy) + image_pil.save(image_path) + +def mkdirs(paths): + if isinstance(paths, list) and not isinstance(paths, str): + for path in paths: + mkdir(path) + else: + mkdir(paths) + +def mkdir(path): + if not os.path.exists(path): + os.makedirs(path) + +############################################################################### +# Code from +# https://github.com/ycszen/pytorch-seg/blob/master/transform.py +# Modified so it complies with the Citscape label map colors +############################################################################### +def uint82bin(n, count=8): + """returns the binary of integer n, count refers to amount of bits""" + return ''.join([str((n >> y) & 1) for y in range(count-1, -1, -1)]) + +def labelcolormap(N): + if N == 35: # cityscape + cmap = np.array([( 0, 0, 0), ( 0, 0, 0), ( 0, 0, 0), ( 0, 0, 0), ( 0, 0, 0), (111, 74, 0), ( 81, 0, 81), + (128, 64,128), (244, 35,232), (250,170,160), (230,150,140), ( 70, 70, 70), (102,102,156), (190,153,153), + (180,165,180), (150,100,100), (150,120, 90), (153,153,153), (153,153,153), (250,170, 30), (220,220, 0), + (107,142, 35), (152,251,152), ( 70,130,180), (220, 20, 60), (255, 0, 0), ( 0, 0,142), ( 0, 0, 70), + ( 0, 60,100), ( 0, 0, 90), ( 0, 0,110), ( 0, 80,100), ( 0, 0,230), (119, 11, 32), ( 0, 0,142)], + dtype=np.uint8) + else: + cmap = np.zeros((N, 3), dtype=np.uint8) + for i in range(N): + r, g, b = 0, 0, 0 + id = i + for j in range(7): + str_id = uint82bin(id) + r = r ^ (np.uint8(str_id[-1]) << (7-j)) + g = g ^ (np.uint8(str_id[-2]) << (7-j)) + b = b ^ (np.uint8(str_id[-3]) << (7-j)) + id = id >> 3 + cmap[i, 0] = r + cmap[i, 1] = g + cmap[i, 2] = b + return cmap + +class Colorize(object): + def __init__(self, n=35): + self.cmap = labelcolormap(n) + self.cmap = torch.from_numpy(self.cmap[:n]) + + def __call__(self, gray_image): + size = gray_image.size() + color_image = torch.ByteTensor(3, size[1], size[2]).fill_(0) + + for label in range(0, len(self.cmap)): + mask = (label == gray_image[0]).cpu() + color_image[0][mask] = self.cmap[label][0] + color_image[1][mask] = self.cmap[label][1] + color_image[2][mask] = self.cmap[label][2] + + return color_image diff --git a/pix2pixHD/util/visualizer.py b/pix2pixHD/util/visualizer.py new file mode 100755 index 0000000..584ac45 --- /dev/null +++ b/pix2pixHD/util/visualizer.py @@ -0,0 +1,131 @@ +import numpy as np +import os +import ntpath +import time +from . import util +from . import html +import scipy.misc +try: + from StringIO import StringIO # Python 2.7 +except ImportError: + from io import BytesIO # Python 3.x + +class Visualizer(): + def __init__(self, opt): + # self.opt = opt + self.tf_log = opt.tf_log + self.use_html = opt.isTrain and not opt.no_html + self.win_size = opt.display_winsize + self.name = opt.name + if self.tf_log: + import tensorflow as tf + self.tf = tf + self.log_dir = os.path.join(opt.checkpoints_dir, opt.name, 'logs') + self.writer = tf.summary.FileWriter(self.log_dir) + + if self.use_html: + self.web_dir = os.path.join(opt.checkpoints_dir, opt.name, 'web') + self.img_dir = os.path.join(self.web_dir, 'images') + print('create web directory %s...' % self.web_dir) + util.mkdirs([self.web_dir, self.img_dir]) + self.log_name = os.path.join(opt.checkpoints_dir, opt.name, 'loss_log.txt') + with open(self.log_name, "a") as log_file: + now = time.strftime("%c") + log_file.write('================ Training Loss (%s) ================\n' % now) + + # |visuals|: dictionary of images to display or save + def display_current_results(self, visuals, epoch, step): + if self.tf_log: # show images in tensorboard output + img_summaries = [] + for label, image_numpy in visuals.items(): + # Write the image to a string + try: + s = StringIO() + except: + s = BytesIO() + scipy.misc.toimage(image_numpy).save(s, format="jpeg") + # Create an Image object + img_sum = self.tf.Summary.Image(encoded_image_string=s.getvalue(), height=image_numpy.shape[0], width=image_numpy.shape[1]) + # Create a Summary value + img_summaries.append(self.tf.Summary.Value(tag=label, image=img_sum)) + + # Create and write Summary + summary = self.tf.Summary(value=img_summaries) + self.writer.add_summary(summary, step) + + if self.use_html: # save images to a html file + for label, image_numpy in visuals.items(): + if isinstance(image_numpy, list): + for i in range(len(image_numpy)): + img_path = os.path.join(self.img_dir, 'epoch%.3d_%s_%d.jpg' % (epoch, label, i)) + util.save_image(image_numpy[i], img_path) + else: + img_path = os.path.join(self.img_dir, 'epoch%.3d_%s.jpg' % (epoch, label)) + util.save_image(image_numpy, img_path) + + # update website + webpage = html.HTML(self.web_dir, 'Experiment name = %s' % self.name, refresh=30) + for n in range(epoch, 0, -1): + webpage.add_header('epoch [%d]' % n) + ims = [] + txts = [] + links = [] + + for label, image_numpy in visuals.items(): + if isinstance(image_numpy, list): + for i in range(len(image_numpy)): + img_path = 'epoch%.3d_%s_%d.jpg' % (n, label, i) + ims.append(img_path) + txts.append(label+str(i)) + links.append(img_path) + else: + img_path = 'epoch%.3d_%s.jpg' % (n, label) + ims.append(img_path) + txts.append(label) + links.append(img_path) + if len(ims) < 10: + webpage.add_images(ims, txts, links, width=self.win_size) + else: + num = int(round(len(ims)/2.0)) + webpage.add_images(ims[:num], txts[:num], links[:num], width=self.win_size) + webpage.add_images(ims[num:], txts[num:], links[num:], width=self.win_size) + webpage.save() + + # errors: dictionary of error labels and values + def plot_current_errors(self, errors, step): + if self.tf_log: + for tag, value in errors.items(): + summary = self.tf.Summary(value=[self.tf.Summary.Value(tag=tag, simple_value=value)]) + self.writer.add_summary(summary, step) + + # errors: same format as |errors| of plotCurrentErrors + def print_current_errors(self, epoch, i, errors, t): + message = '(epoch: %d, iters: %d, time: %.3f) ' % (epoch, i, t) + for k, v in errors.items(): + if v != 0: + message += '%s: %.3f ' % (k, v) + + print(message) + with open(self.log_name, "a") as log_file: + log_file.write('%s\n' % message) + + # save image to the disk + def save_images(self, webpage, visuals, image_path): + image_dir = webpage.get_image_dir() + short_path = ntpath.basename(image_path[0]) + name = os.path.splitext(short_path)[0] + + webpage.add_header(name) + ims = [] + txts = [] + links = [] + + for label, image_numpy in visuals.items(): + image_name = '%s_%s.jpg' % (name, label) + save_path = os.path.join(image_dir, image_name) + util.save_image(image_numpy, save_path) + + ims.append(image_name) + txts.append(label) + links.append(image_name) + webpage.add_images(ims, txts, links, width=self.win_size) diff --git a/pix2pixHD_attack/._LICENSE.txt b/pix2pixHD_attack/._LICENSE.txt new file mode 100644 index 0000000..b58f854 Binary files /dev/null and b/pix2pixHD_attack/._LICENSE.txt differ diff --git a/pix2pixHD_attack/._README.md b/pix2pixHD_attack/._README.md new file mode 100644 index 0000000..9d8f3c8 Binary files /dev/null and b/pix2pixHD_attack/._README.md differ diff --git a/pix2pixHD_attack/._encode_features.py b/pix2pixHD_attack/._encode_features.py new file mode 100644 index 0000000..4f41162 Binary files /dev/null and b/pix2pixHD_attack/._encode_features.py differ diff --git a/pix2pixHD_attack/._precompute_feature_maps.py b/pix2pixHD_attack/._precompute_feature_maps.py new file mode 100644 index 0000000..b014bf7 Binary files /dev/null and b/pix2pixHD_attack/._precompute_feature_maps.py differ diff --git a/pix2pixHD_attack/._run_engine.py b/pix2pixHD_attack/._run_engine.py new file mode 100644 index 0000000..d17effe Binary files /dev/null and b/pix2pixHD_attack/._run_engine.py differ diff --git a/pix2pixHD_attack/._test.py b/pix2pixHD_attack/._test.py new file mode 100644 index 0000000..b23fc58 Binary files /dev/null and b/pix2pixHD_attack/._test.py differ diff --git a/pix2pixHD_attack/._train.py b/pix2pixHD_attack/._train.py new file mode 100644 index 0000000..0d41fae Binary files /dev/null and b/pix2pixHD_attack/._train.py differ diff --git a/pix2pixHD_attack/.gitignore b/pix2pixHD_attack/.gitignore new file mode 100755 index 0000000..681efd0 --- /dev/null +++ b/pix2pixHD_attack/.gitignore @@ -0,0 +1,40 @@ +debug* +checkpoints/ +results/ +build/ +dist/ +torch.egg-info/ +*/**/__pycache__ +torch/version.py +torch/csrc/generic/TensorMethods.cpp +torch/lib/*.so* +torch/lib/*.dylib* +torch/lib/*.h +torch/lib/build +torch/lib/tmp_install +torch/lib/include +torch/lib/torch_shm_manager +torch/csrc/cudnn/cuDNN.cpp +torch/csrc/nn/THNN.cwrap +torch/csrc/nn/THNN.cpp +torch/csrc/nn/THCUNN.cwrap +torch/csrc/nn/THCUNN.cpp +torch/csrc/nn/THNN_generic.cwrap +torch/csrc/nn/THNN_generic.cpp +torch/csrc/nn/THNN_generic.h +docs/src/**/* +test/data/legacy_modules.t7 +test/data/gpu_tensors.pt +test/htmlcov +test/.coverage +*/*.pyc +*/**/*.pyc +*/**/**/*.pyc +*/**/**/**/*.pyc +*/**/**/**/**/*.pyc +*/*.so* +*/**/*.so* +*/**/*.dylib* +test/data/legacy_serialized.pt +*.DS_Store +*~ diff --git a/pix2pixHD_attack/LICENSE.txt b/pix2pixHD_attack/LICENSE.txt new file mode 100755 index 0000000..091b42f --- /dev/null +++ b/pix2pixHD_attack/LICENSE.txt @@ -0,0 +1,45 @@ +Copyright (C) 2019 NVIDIA Corporation. Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu. +BSD License. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------------------- LICENSE FOR pytorch-CycleGAN-and-pix2pix ---------------- +Copyright (c) 2017, Jun-Yan Zhu and Taesung Park +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pix2pixHD_attack/README.md b/pix2pixHD_attack/README.md new file mode 100755 index 0000000..7c3315c --- /dev/null +++ b/pix2pixHD_attack/README.md @@ -0,0 +1,144 @@ + + +



+ +# pix2pixHD +### [Project](https://tcwang0509.github.io/pix2pixHD/) | [Youtube](https://youtu.be/3AIpPlzM_qs) | [Paper](https://arxiv.org/pdf/1711.11585.pdf)
+Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic image-to-image translation. It can be used for turning semantic label maps into photo-realistic images or synthesizing portraits from face label maps.

+[High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs](https://tcwang0509.github.io/pix2pixHD/) + [Ting-Chun Wang](https://tcwang0509.github.io/)1, [Ming-Yu Liu](http://mingyuliu.net/)1, [Jun-Yan Zhu](http://people.eecs.berkeley.edu/~junyanz/)2, Andrew Tao1, [Jan Kautz](http://jankautz.com/)1, [Bryan Catanzaro](http://catanzaro.name/)1 + 1NVIDIA Corporation, 2UC Berkeley + In CVPR 2018. + +## Image-to-image translation at 2k/1k resolution +- Our label-to-streetview results +

+ + +

+- Interactive editing results +

+ + +

+- Additional streetview results +

+ + +

+

+ + +

+ +- Label-to-face and interactive editing results +

+ + + +

+

+ + + +

+ +- Our editing interface +

+ + +

+ +## Prerequisites +- Linux or macOS +- Python 2 or 3 +- NVIDIA GPU (11G memory or larger) + CUDA cuDNN + +## Getting Started +### Installation +- Install PyTorch and dependencies from http://pytorch.org +- Install python libraries [dominate](https://github.com/Knio/dominate). +```bash +pip install dominate +``` +- Clone this repo: +```bash +git clone https://github.com/NVIDIA/pix2pixHD +cd pix2pixHD +``` + + +### Testing +- A few example Cityscapes test images are included in the `datasets` folder. +- Please download the pre-trained Cityscapes model from [here](https://drive.google.com/file/d/1h9SykUnuZul7J3Nbms2QGH1wa85nbN2-/view?usp=sharing) (google drive link), and put it under `./checkpoints/label2city_1024p/` +- Test the model (`bash ./scripts/test_1024p.sh`): +```bash +#!./scripts/test_1024p.sh +python test.py --name label2city_1024p --netG local --ngf 32 --resize_or_crop none +``` +The test results will be saved to a html file here: `./results/label2city_1024p/test_latest/index.html`. + +More example scripts can be found in the `scripts` directory. + + +### Dataset +- We use the Cityscapes dataset. To train a model on the full dataset, please download it from the [official website](https://www.cityscapes-dataset.com/) (registration required). +After downloading, please put it under the `datasets` folder in the same way the example images are provided. + + +### Training +- Train a model at 1024 x 512 resolution (`bash ./scripts/train_512p.sh`): +```bash +#!./scripts/train_512p.sh +python train.py --name label2city_512p +``` +- To view training results, please checkout intermediate results in `./checkpoints/label2city_512p/web/index.html`. +If you have tensorflow installed, you can see tensorboard logs in `./checkpoints/label2city_512p/logs` by adding `--tf_log` to the training scripts. + +### Multi-GPU training +- Train a model using multiple GPUs (`bash ./scripts/train_512p_multigpu.sh`): +```bash +#!./scripts/train_512p_multigpu.sh +python train.py --name label2city_512p --batchSize 8 --gpu_ids 0,1,2,3,4,5,6,7 +``` +Note: this is not tested and we trained our model using single GPU only. Please use at your own discretion. + +### Training with Automatic Mixed Precision (AMP) for faster speed +- To train with mixed precision support, please first install apex from: https://github.com/NVIDIA/apex +- You can then train the model by adding `--fp16`. For example, +```bash +#!./scripts/train_512p_fp16.sh +python -m torch.distributed.launch train.py --name label2city_512p --fp16 +``` +In our test case, it trains about 80% faster with AMP on a Volta machine. + +### Training at full resolution +- To train the images at full resolution (2048 x 1024) requires a GPU with 24G memory (`bash ./scripts/train_1024p_24G.sh`), or 16G memory if using mixed precision (AMP). +- If only GPUs with 12G memory are available, please use the 12G script (`bash ./scripts/train_1024p_12G.sh`), which will crop the images during training. Performance is not guaranteed using this script. + +### Training with your own dataset +- If you want to train with your own dataset, please generate label maps which are one-channel whose pixel values correspond to the object labels (i.e. 0,1,...,N-1, where N is the number of labels). This is because we need to generate one-hot vectors from the label maps. Please also specity `--label_nc N` during both training and testing. +- If your input is not a label map, please just specify `--label_nc 0` which will directly use the RGB colors as input. The folders should then be named `train_A`, `train_B` instead of `train_label`, `train_img`, where the goal is to translate images from A to B. +- If you don't have instance maps or don't want to use them, please specify `--no_instance`. +- The default setting for preprocessing is `scale_width`, which will scale the width of all training images to `opt.loadSize` (1024) while keeping the aspect ratio. If you want a different setting, please change it by using the `--resize_or_crop` option. For example, `scale_width_and_crop` first resizes the image to have width `opt.loadSize` and then does random cropping of size `(opt.fineSize, opt.fineSize)`. `crop` skips the resizing step and only performs random cropping. If you don't want any preprocessing, please specify `none`, which will do nothing other than making sure the image is divisible by 32. + +## More Training/Test Details +- Flags: see `options/train_options.py` and `options/base_options.py` for all the training flags; see `options/test_options.py` and `options/base_options.py` for all the test flags. +- Instance map: we take in both label maps and instance maps as input. If you don't want to use instance maps, please specify the flag `--no_instance`. + + +## Citation + +If you find this useful for your research, please use the following. + +``` +@inproceedings{wang2018pix2pixHD, + title={High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs}, + author={Ting-Chun Wang and Ming-Yu Liu and Jun-Yan Zhu and Andrew Tao and Jan Kautz and Bryan Catanzaro}, + booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition}, + year={2018} +} +``` + +## Acknowledgments +This code borrows heavily from [pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix). diff --git a/pix2pixHD_attack/_config.yml b/pix2pixHD_attack/_config.yml new file mode 100755 index 0000000..2f7efbe --- /dev/null +++ b/pix2pixHD_attack/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file diff --git a/pix2pixHD_attack/checkpoints b/pix2pixHD_attack/checkpoints new file mode 120000 index 0000000..5c90d1e --- /dev/null +++ b/pix2pixHD_attack/checkpoints @@ -0,0 +1 @@ +/scratch2/fsynth/checkpoints \ No newline at end of file diff --git a/pix2pixHD_attack/data/__init__.py b/pix2pixHD_attack/data/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/pix2pixHD_attack/data/aligned_dataset.py b/pix2pixHD_attack/data/aligned_dataset.py new file mode 100755 index 0000000..29785c1 --- /dev/null +++ b/pix2pixHD_attack/data/aligned_dataset.py @@ -0,0 +1,76 @@ +import os.path +from data.base_dataset import BaseDataset, get_params, get_transform, normalize +from data.image_folder import make_dataset +from PIL import Image + +class AlignedDataset(BaseDataset): + def initialize(self, opt): + self.opt = opt + self.root = opt.dataroot + + ### input A (label maps) + dir_A = '_A' if self.opt.label_nc == 0 else '_label' + self.dir_A = os.path.join(opt.dataroot, opt.phase + dir_A) + self.A_paths = sorted(make_dataset(self.dir_A)) + + ### input B (real images) + if opt.isTrain or opt.use_encoded_image: + dir_B = '_B' if self.opt.label_nc == 0 else '_img' + self.dir_B = os.path.join(opt.dataroot, opt.phase + dir_B) + self.B_paths = sorted(make_dataset(self.dir_B)) + + ### instance maps + if not opt.no_instance: + self.dir_inst = os.path.join(opt.dataroot, opt.phase + '_inst') + self.inst_paths = sorted(make_dataset(self.dir_inst)) + + ### load precomputed instance-wise encoded features + if opt.load_features: + self.dir_feat = os.path.join(opt.dataroot, opt.phase + '_feat') + print('----------- loading features from %s ----------' % self.dir_feat) + self.feat_paths = sorted(make_dataset(self.dir_feat)) + + self.dataset_size = len(self.A_paths) + + def __getitem__(self, index): + ### input A (label maps) + A_path = self.A_paths[index] + A = Image.open(A_path) + params = get_params(self.opt, A.size) + if self.opt.label_nc == 0: + transform_A = get_transform(self.opt, params) + A_tensor = transform_A(A.convert('RGB')) + else: + transform_A = get_transform(self.opt, params, method=Image.NEAREST, normalize=False) + A_tensor = transform_A(A) * 255.0 + + B_tensor = inst_tensor = feat_tensor = 0 + ### input B (real images) + if self.opt.isTrain or self.opt.use_encoded_image: + B_path = self.B_paths[index] + B = Image.open(B_path).convert('RGB') + transform_B = get_transform(self.opt, params) + B_tensor = transform_B(B) + + ### if using instance maps + if not self.opt.no_instance: + inst_path = self.inst_paths[index] + inst = Image.open(inst_path) + inst_tensor = transform_A(inst) + + if self.opt.load_features: + feat_path = self.feat_paths[index] + feat = Image.open(feat_path).convert('RGB') + norm = normalize() + feat_tensor = norm(transform_A(feat)) + + input_dict = {'label': A_tensor, 'inst': inst_tensor, 'image': B_tensor, + 'feat': feat_tensor, 'path': A_path} + + return input_dict + + def __len__(self): + return len(self.A_paths) // self.opt.batchSize * self.opt.batchSize + + def name(self): + return 'AlignedDataset' \ No newline at end of file diff --git a/pix2pixHD_attack/data/base_data_loader.py b/pix2pixHD_attack/data/base_data_loader.py new file mode 100755 index 0000000..0e1deb5 --- /dev/null +++ b/pix2pixHD_attack/data/base_data_loader.py @@ -0,0 +1,14 @@ + +class BaseDataLoader(): + def __init__(self): + pass + + def initialize(self, opt): + self.opt = opt + pass + + def load_data(): + return None + + + diff --git a/pix2pixHD_attack/data/base_dataset.py b/pix2pixHD_attack/data/base_dataset.py new file mode 100755 index 0000000..ece8813 --- /dev/null +++ b/pix2pixHD_attack/data/base_dataset.py @@ -0,0 +1,90 @@ +import torch.utils.data as data +from PIL import Image +import torchvision.transforms as transforms +import numpy as np +import random + +class BaseDataset(data.Dataset): + def __init__(self): + super(BaseDataset, self).__init__() + + def name(self): + return 'BaseDataset' + + def initialize(self, opt): + pass + +def get_params(opt, size): + w, h = size + new_h = h + new_w = w + if opt.resize_or_crop == 'resize_and_crop': + new_h = new_w = opt.loadSize + elif opt.resize_or_crop == 'scale_width_and_crop': + new_w = opt.loadSize + new_h = opt.loadSize * h // w + + x = random.randint(0, np.maximum(0, new_w - opt.fineSize)) + y = random.randint(0, np.maximum(0, new_h - opt.fineSize)) + + flip = random.random() > 0.5 + return {'crop_pos': (x, y), 'flip': flip} + +def get_transform(opt, params, method=Image.BICUBIC, normalize=True): + transform_list = [] + if 'resize' in opt.resize_or_crop: + osize = [opt.loadSize, opt.loadSize] + transform_list.append(transforms.Scale(osize, method)) + elif 'scale_width' in opt.resize_or_crop: + transform_list.append(transforms.Lambda(lambda img: __scale_width(img, opt.loadSize, method))) + + if 'crop' in opt.resize_or_crop: + transform_list.append(transforms.Lambda(lambda img: __crop(img, params['crop_pos'], opt.fineSize))) + + if opt.resize_or_crop == 'none': + base = float(2 ** opt.n_downsample_global) + if opt.netG == 'local': + base *= (2 ** opt.n_local_enhancers) + transform_list.append(transforms.Lambda(lambda img: __make_power_2(img, base, method))) + + if opt.isTrain and not opt.no_flip: + transform_list.append(transforms.Lambda(lambda img: __flip(img, params['flip']))) + + transform_list += [transforms.ToTensor()] + + if normalize: + transform_list += [transforms.Normalize((0.5, 0.5, 0.5), + (0.5, 0.5, 0.5))] + return transforms.Compose(transform_list) + +def normalize(): + return transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)) + +def __make_power_2(img, base, method=Image.BICUBIC): + ow, oh = img.size + h = int(round(oh / base) * base) + w = int(round(ow / base) * base) + if (h == oh) and (w == ow): + return img + return img.resize((w, h), method) + +def __scale_width(img, target_width, method=Image.BICUBIC): + ow, oh = img.size + if (ow == target_width): + return img + w = target_width + h = int(target_width * oh / ow) + return img.resize((w, h), method) + +def __crop(img, pos, size): + ow, oh = img.size + x1, y1 = pos + tw = th = size + if (ow > tw or oh > th): + return img.crop((x1, y1, x1 + tw, y1 + th)) + return img + +def __flip(img, flip): + if flip: + return img.transpose(Image.FLIP_LEFT_RIGHT) + return img diff --git a/pix2pixHD_attack/data/custom_dataset_data_loader.py b/pix2pixHD_attack/data/custom_dataset_data_loader.py new file mode 100755 index 0000000..0b98254 --- /dev/null +++ b/pix2pixHD_attack/data/custom_dataset_data_loader.py @@ -0,0 +1,31 @@ +import torch.utils.data +from data.base_data_loader import BaseDataLoader + + +def CreateDataset(opt): + dataset = None + from data.aligned_dataset import AlignedDataset + dataset = AlignedDataset() + + print("dataset [%s] was created" % (dataset.name())) + dataset.initialize(opt) + return dataset + +class CustomDatasetDataLoader(BaseDataLoader): + def name(self): + return 'CustomDatasetDataLoader' + + def initialize(self, opt): + BaseDataLoader.initialize(self, opt) + self.dataset = CreateDataset(opt) + self.dataloader = torch.utils.data.DataLoader( + self.dataset, + batch_size=opt.batchSize, + shuffle=not opt.serial_batches, + num_workers=int(opt.nThreads)) + + def load_data(self): + return self.dataloader + + def __len__(self): + return min(len(self.dataset), self.opt.max_dataset_size) diff --git a/pix2pixHD_attack/data/data_loader.py b/pix2pixHD_attack/data/data_loader.py new file mode 100755 index 0000000..2a4433a --- /dev/null +++ b/pix2pixHD_attack/data/data_loader.py @@ -0,0 +1,7 @@ + +def CreateDataLoader(opt): + from data.custom_dataset_data_loader import CustomDatasetDataLoader + data_loader = CustomDatasetDataLoader() + print(data_loader.name()) + data_loader.initialize(opt) + return data_loader diff --git a/pix2pixHD_attack/data/image_folder.py b/pix2pixHD_attack/data/image_folder.py new file mode 100755 index 0000000..df0141f --- /dev/null +++ b/pix2pixHD_attack/data/image_folder.py @@ -0,0 +1,65 @@ +############################################################################### +# Code from +# https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py +# Modified the original code so that it also loads images from the current +# directory as well as the subdirectories +############################################################################### +import torch.utils.data as data +from PIL import Image +import os + +IMG_EXTENSIONS = [ + '.jpg', '.JPG', '.jpeg', '.JPEG', + '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', '.tiff' +] + + +def is_image_file(filename): + return any(filename.endswith(extension) for extension in IMG_EXTENSIONS) + + +def make_dataset(dir): + images = [] + assert os.path.isdir(dir), '%s is not a valid directory' % dir + + for root, _, fnames in sorted(os.walk(dir)): + for fname in fnames: + if is_image_file(fname): + path = os.path.join(root, fname) + images.append(path) + + return images + + +def default_loader(path): + return Image.open(path).convert('RGB') + + +class ImageFolder(data.Dataset): + + def __init__(self, root, transform=None, return_paths=False, + loader=default_loader): + imgs = make_dataset(root) + if len(imgs) == 0: + raise(RuntimeError("Found 0 images in: " + root + "\n" + "Supported image extensions are: " + + ",".join(IMG_EXTENSIONS))) + + self.root = root + self.imgs = imgs + self.transform = transform + self.return_paths = return_paths + self.loader = loader + + def __getitem__(self, index): + path = self.imgs[index] + img = self.loader(path) + if self.transform is not None: + img = self.transform(img) + if self.return_paths: + return img, path + else: + return img + + def __len__(self): + return len(self.imgs) diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_000576_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_000576_gtFine_instanceIds.png new file mode 100755 index 0000000..01da7ed Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_000576_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_001236_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_001236_gtFine_instanceIds.png new file mode 100755 index 0000000..75506bc Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_001236_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_003357_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_003357_gtFine_instanceIds.png new file mode 100755 index 0000000..9bd27b0 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_003357_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_011810_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_011810_gtFine_instanceIds.png new file mode 100755 index 0000000..df84eee Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_011810_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_012868_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_012868_gtFine_instanceIds.png new file mode 100755 index 0000000..ba1f7aa Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000000_012868_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_013710_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_013710_gtFine_instanceIds.png new file mode 100755 index 0000000..d05b7db Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_013710_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_015328_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_015328_gtFine_instanceIds.png new file mode 100755 index 0000000..32d62a3 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_015328_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_023769_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_023769_gtFine_instanceIds.png new file mode 100755 index 0000000..9eef682 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_023769_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_028335_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_028335_gtFine_instanceIds.png new file mode 100755 index 0000000..b1909d5 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_028335_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_032711_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_032711_gtFine_instanceIds.png new file mode 100755 index 0000000..ac2e293 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_032711_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_033655_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_033655_gtFine_instanceIds.png new file mode 100755 index 0000000..de7328e Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_033655_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_042733_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_042733_gtFine_instanceIds.png new file mode 100755 index 0000000..a98d096 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_042733_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_047552_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_047552_gtFine_instanceIds.png new file mode 100755 index 0000000..ab569e3 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_047552_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_054640_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_054640_gtFine_instanceIds.png new file mode 100755 index 0000000..5f246a6 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_054640_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_055387_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_055387_gtFine_instanceIds.png new file mode 100755 index 0000000..2e7d01f Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_inst/frankfurt_000001_055387_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_000576_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_000576_gtFine_labelIds.png new file mode 100755 index 0000000..8c9464c Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_000576_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_001236_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_001236_gtFine_labelIds.png new file mode 100755 index 0000000..9f0ca9f Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_001236_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_003357_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_003357_gtFine_labelIds.png new file mode 100755 index 0000000..1035e55 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_003357_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_011810_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_011810_gtFine_labelIds.png new file mode 100755 index 0000000..a86913b Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_011810_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_012868_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_012868_gtFine_labelIds.png new file mode 100755 index 0000000..fe81c83 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000000_012868_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_013710_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_013710_gtFine_labelIds.png new file mode 100755 index 0000000..72b4be4 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_013710_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_015328_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_015328_gtFine_labelIds.png new file mode 100755 index 0000000..afefb6b Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_015328_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_023769_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_023769_gtFine_labelIds.png new file mode 100755 index 0000000..f3af9df Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_023769_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_028335_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_028335_gtFine_labelIds.png new file mode 100755 index 0000000..5e65e3e Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_028335_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_032711_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_032711_gtFine_labelIds.png new file mode 100755 index 0000000..ba07b73 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_032711_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_033655_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_033655_gtFine_labelIds.png new file mode 100755 index 0000000..77f519c Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_033655_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_042733_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_042733_gtFine_labelIds.png new file mode 100755 index 0000000..ba08f1d Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_042733_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_047552_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_047552_gtFine_labelIds.png new file mode 100755 index 0000000..5dff09a Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_047552_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_054640_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_054640_gtFine_labelIds.png new file mode 100755 index 0000000..cb2ab2b Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_054640_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_055387_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_055387_gtFine_labelIds.png new file mode 100755 index 0000000..b00ef7e Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/test_label/frankfurt_000001_055387_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000000_000019_leftImg8bit.png b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000000_000019_leftImg8bit.png new file mode 100755 index 0000000..0e6867e Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000000_000019_leftImg8bit.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000001_000019_leftImg8bit.png b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000001_000019_leftImg8bit.png new file mode 100755 index 0000000..d5a96ce Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000001_000019_leftImg8bit.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000002_000019_leftImg8bit.png b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000002_000019_leftImg8bit.png new file mode 100755 index 0000000..10ce563 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000002_000019_leftImg8bit.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000003_000019_leftImg8bit.png b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000003_000019_leftImg8bit.png new file mode 100755 index 0000000..3027fe1 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000003_000019_leftImg8bit.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000004_000019_leftImg8bit.png b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000004_000019_leftImg8bit.png new file mode 100755 index 0000000..26945fc Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000004_000019_leftImg8bit.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000005_000019_leftImg8bit.png b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000005_000019_leftImg8bit.png new file mode 100755 index 0000000..71fb41f Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000005_000019_leftImg8bit.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000006_000019_leftImg8bit.png b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000006_000019_leftImg8bit.png new file mode 100755 index 0000000..dd5cf30 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000006_000019_leftImg8bit.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000007_000019_leftImg8bit.png b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000007_000019_leftImg8bit.png new file mode 100755 index 0000000..65653d7 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_img/aachen_000007_000019_leftImg8bit.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000000_000019_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000000_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..f4ee222 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000000_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000001_000019_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000001_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..dd69137 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000001_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000002_000019_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000002_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..bdad5e3 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000002_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000003_000019_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000003_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..91a035b Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000003_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000004_000019_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000004_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..0f5fc70 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000004_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000005_000019_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000005_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..ac54ee9 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000005_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000006_000019_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000006_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..49f435f Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000006_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000007_000019_gtFine_instanceIds.png b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000007_000019_gtFine_instanceIds.png new file mode 100755 index 0000000..7c5ca0a Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_inst/aachen_000007_000019_gtFine_instanceIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000000_000019_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000000_000019_gtFine_labelIds.png new file mode 100755 index 0000000..eed7ee6 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000000_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000001_000019_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000001_000019_gtFine_labelIds.png new file mode 100755 index 0000000..e9c25ee Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000001_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000002_000019_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000002_000019_gtFine_labelIds.png new file mode 100755 index 0000000..c96ab17 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000002_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000003_000019_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000003_000019_gtFine_labelIds.png new file mode 100755 index 0000000..da05594 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000003_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000004_000019_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000004_000019_gtFine_labelIds.png new file mode 100755 index 0000000..bb30bd9 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000004_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000005_000019_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000005_000019_gtFine_labelIds.png new file mode 100755 index 0000000..958fc40 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000005_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000006_000019_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000006_000019_gtFine_labelIds.png new file mode 100755 index 0000000..89f042e Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000006_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000007_000019_gtFine_labelIds.png b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000007_000019_gtFine_labelIds.png new file mode 100755 index 0000000..85b6922 Binary files /dev/null and b/pix2pixHD_attack/datasets/cityscapes/train_label/aachen_000007_000019_gtFine_labelIds.png differ diff --git a/pix2pixHD_attack/encode_features.py b/pix2pixHD_attack/encode_features.py new file mode 100755 index 0000000..158c85a --- /dev/null +++ b/pix2pixHD_attack/encode_features.py @@ -0,0 +1,54 @@ +from options.train_options import TrainOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import numpy as np +import os + +opt = TrainOptions().parse() +opt.nThreads = 1 +opt.batchSize = 1 +opt.serial_batches = True +opt.no_flip = True +opt.instance_feat = True +opt.continue_train = True + +name = 'features' +save_path = os.path.join(opt.checkpoints_dir, opt.name) + +############ Initialize ######### +data_loader = CreateDataLoader(opt) +dataset = data_loader.load_data() +dataset_size = len(data_loader) +model = create_model(opt) + +########### Encode features ########### +reencode = True +if reencode: + features = {} + for label in range(opt.label_nc): + features[label] = np.zeros((0, opt.feat_num+1)) + for i, data in enumerate(dataset): + feat = model.module.encode_features(data['image'], data['inst']) + for label in range(opt.label_nc): + features[label] = np.append(features[label], feat[label], axis=0) + + print('%d / %d images' % (i+1, dataset_size)) + save_name = os.path.join(save_path, name + '.npy') + np.save(save_name, features) + +############## Clustering ########### +n_clusters = opt.n_clusters +load_name = os.path.join(save_path, name + '.npy') +features = np.load(load_name).item() +from sklearn.cluster import KMeans +centers = {} +for label in range(opt.label_nc): + feat = features[label] + feat = feat[feat[:,-1] > 0.5, :-1] + if feat.shape[0]: + n_clusters = min(feat.shape[0], opt.n_clusters) + kmeans = KMeans(n_clusters=n_clusters, random_state=0).fit(feat) + centers[label] = kmeans.cluster_centers_ +save_name = os.path.join(save_path, name + '_clustered_%03d.npy' % opt.n_clusters) +np.save(save_name, centers) +print('saving to %s' % save_name) \ No newline at end of file diff --git a/pix2pixHD_attack/models/__init__.py b/pix2pixHD_attack/models/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/pix2pixHD_attack/models/base_model.py b/pix2pixHD_attack/models/base_model.py new file mode 100755 index 0000000..f3f6b53 --- /dev/null +++ b/pix2pixHD_attack/models/base_model.py @@ -0,0 +1,91 @@ +import os +import torch +import sys + +class BaseModel(torch.nn.Module): + def name(self): + return 'BaseModel' + + def initialize(self, opt): + self.opt = opt + self.gpu_ids = opt.gpu_ids + self.isTrain = opt.isTrain + self.Tensor = torch.cuda.FloatTensor if self.gpu_ids else torch.Tensor + self.save_dir = os.path.join(opt.checkpoints_dir, opt.name) + + def set_input(self, input): + self.input = input + + def forward(self): + pass + + # used in test time, no backprop + def test(self): + pass + + def get_image_paths(self): + pass + + def optimize_parameters(self): + pass + + def get_current_visuals(self): + return self.input + + def get_current_errors(self): + return {} + + def save(self, label): + pass + + # helper saving function that can be used by subclasses + def save_network(self, network, network_label, epoch_label, gpu_ids): + save_filename = '%s_net_%s.pth' % (epoch_label, network_label) + save_path = os.path.join(self.save_dir, save_filename) + torch.save(network.cpu().state_dict(), save_path) + if len(gpu_ids) and torch.cuda.is_available(): + network.cuda() + + # helper loading function that can be used by subclasses + def load_network(self, network, network_label, epoch_label, save_dir=''): + save_filename = '%s_net_%s.pth' % (epoch_label, network_label) + if not save_dir: + save_dir = self.save_dir + save_path = os.path.join(save_dir, save_filename) + if not os.path.isfile(save_path): + print('%s not exists yet!' % save_path) + if network_label == 'G': + raise('Generator must exist!') + else: + #network.load_state_dict(torch.load(save_path)) + try: + network.load_state_dict(torch.load(save_path)) + except: + pretrained_dict = torch.load(save_path) + model_dict = network.state_dict() + try: + pretrained_dict = {k: v for k, v in pretrained_dict.items() if k in model_dict} + network.load_state_dict(pretrained_dict) + if self.opt.verbose: + print('Pretrained network %s has excessive layers; Only loading layers that are used' % network_label) + except: + print('Pretrained network %s has fewer layers; The following are not initialized:' % network_label) + for k, v in pretrained_dict.items(): + if v.size() == model_dict[k].size(): + model_dict[k] = v + + if sys.version_info >= (3,0): + not_initialized = set() + else: + from sets import Set + not_initialized = Set() + + for k, v in model_dict.items(): + if k not in pretrained_dict or v.size() != pretrained_dict[k].size(): + not_initialized.add(k.split('.')[0]) + + print(sorted(not_initialized)) + network.load_state_dict(model_dict) + + def update_learning_rate(): + pass diff --git a/pix2pixHD_attack/models/models.py b/pix2pixHD_attack/models/models.py new file mode 100755 index 0000000..be1e30e --- /dev/null +++ b/pix2pixHD_attack/models/models.py @@ -0,0 +1,20 @@ +import torch + +def create_model(opt): + if opt.model == 'pix2pixHD': + from .pix2pixHD_model import Pix2PixHDModel, InferenceModel + if opt.isTrain: + model = Pix2PixHDModel() + else: + model = InferenceModel() + else: + from .ui_model import UIModel + model = UIModel() + model.initialize(opt) + if opt.verbose: + print("model [%s] was created" % (model.name())) + + if opt.isTrain and len(opt.gpu_ids) and not opt.fp16: + model = torch.nn.DataParallel(model, device_ids=opt.gpu_ids) + + return model diff --git a/pix2pixHD_attack/models/networks.py b/pix2pixHD_attack/models/networks.py new file mode 100755 index 0000000..ee05d85 --- /dev/null +++ b/pix2pixHD_attack/models/networks.py @@ -0,0 +1,416 @@ +import torch +import torch.nn as nn +import functools +from torch.autograd import Variable +import numpy as np + +############################################################################### +# Functions +############################################################################### +def weights_init(m): + classname = m.__class__.__name__ + if classname.find('Conv') != -1: + m.weight.data.normal_(0.0, 0.02) + elif classname.find('BatchNorm2d') != -1: + m.weight.data.normal_(1.0, 0.02) + m.bias.data.fill_(0) + +def get_norm_layer(norm_type='instance'): + if norm_type == 'batch': + norm_layer = functools.partial(nn.BatchNorm2d, affine=True) + elif norm_type == 'instance': + norm_layer = functools.partial(nn.InstanceNorm2d, affine=False) + else: + raise NotImplementedError('normalization layer [%s] is not found' % norm_type) + return norm_layer + +def define_G(input_nc, output_nc, ngf, netG, n_downsample_global=3, n_blocks_global=9, n_local_enhancers=1, + n_blocks_local=3, norm='instance', gpu_ids=[]): + norm_layer = get_norm_layer(norm_type=norm) + if netG == 'global': + netG = GlobalGenerator(input_nc, output_nc, ngf, n_downsample_global, n_blocks_global, norm_layer) + elif netG == 'local': + netG = LocalEnhancer(input_nc, output_nc, ngf, n_downsample_global, n_blocks_global, + n_local_enhancers, n_blocks_local, norm_layer) + elif netG == 'encoder': + netG = Encoder(input_nc, output_nc, ngf, n_downsample_global, norm_layer) + else: + raise('generator not implemented!') + print(netG) + if len(gpu_ids) > 0: + assert(torch.cuda.is_available()) + netG.cuda(gpu_ids[0]) + netG.apply(weights_init) + return netG + +def define_D(input_nc, ndf, n_layers_D, norm='instance', use_sigmoid=False, num_D=1, getIntermFeat=False, gpu_ids=[]): + norm_layer = get_norm_layer(norm_type=norm) + netD = MultiscaleDiscriminator(input_nc, ndf, n_layers_D, norm_layer, use_sigmoid, num_D, getIntermFeat) + print(netD) + if len(gpu_ids) > 0: + assert(torch.cuda.is_available()) + netD.cuda(gpu_ids[0]) + netD.apply(weights_init) + return netD + +def print_network(net): + if isinstance(net, list): + net = net[0] + num_params = 0 + for param in net.parameters(): + num_params += param.numel() + print(net) + print('Total number of parameters: %d' % num_params) + +############################################################################## +# Losses +############################################################################## +class GANLoss(nn.Module): + def __init__(self, use_lsgan=True, target_real_label=1.0, target_fake_label=0.0, + tensor=torch.FloatTensor): + super(GANLoss, self).__init__() + self.real_label = target_real_label + self.fake_label = target_fake_label + self.real_label_var = None + self.fake_label_var = None + self.Tensor = tensor + if use_lsgan: + self.loss = nn.MSELoss() + else: + self.loss = nn.BCELoss() + + def get_target_tensor(self, input, target_is_real): + target_tensor = None + if target_is_real: + create_label = ((self.real_label_var is None) or + (self.real_label_var.numel() != input.numel())) + if create_label: + real_tensor = self.Tensor(input.size()).fill_(self.real_label) + self.real_label_var = Variable(real_tensor, requires_grad=False) + target_tensor = self.real_label_var + else: + create_label = ((self.fake_label_var is None) or + (self.fake_label_var.numel() != input.numel())) + if create_label: + fake_tensor = self.Tensor(input.size()).fill_(self.fake_label) + self.fake_label_var = Variable(fake_tensor, requires_grad=False) + target_tensor = self.fake_label_var + return target_tensor + + def __call__(self, input, target_is_real): + if isinstance(input[0], list): + loss = 0 + for input_i in input: + pred = input_i[-1] + target_tensor = self.get_target_tensor(pred, target_is_real) + loss += self.loss(pred, target_tensor) + return loss + else: + target_tensor = self.get_target_tensor(input[-1], target_is_real) + return self.loss(input[-1], target_tensor) + +class VGGLoss(nn.Module): + def __init__(self, gpu_ids): + super(VGGLoss, self).__init__() + self.vgg = Vgg19().cuda() + self.criterion = nn.L1Loss() + self.weights = [1.0/32, 1.0/16, 1.0/8, 1.0/4, 1.0] + + def forward(self, x, y): + x_vgg, y_vgg = self.vgg(x), self.vgg(y) + loss = 0 + for i in range(len(x_vgg)): + loss += self.weights[i] * self.criterion(x_vgg[i], y_vgg[i].detach()) + return loss + +############################################################################## +# Generator +############################################################################## +class LocalEnhancer(nn.Module): + def __init__(self, input_nc, output_nc, ngf=32, n_downsample_global=3, n_blocks_global=9, + n_local_enhancers=1, n_blocks_local=3, norm_layer=nn.BatchNorm2d, padding_type='reflect'): + super(LocalEnhancer, self).__init__() + self.n_local_enhancers = n_local_enhancers + + ###### global generator model ##### + ngf_global = ngf * (2**n_local_enhancers) + model_global = GlobalGenerator(input_nc, output_nc, ngf_global, n_downsample_global, n_blocks_global, norm_layer).model + model_global = [model_global[i] for i in range(len(model_global)-3)] # get rid of final convolution layers + self.model = nn.Sequential(*model_global) + + ###### local enhancer layers ##### + for n in range(1, n_local_enhancers+1): + ### downsample + ngf_global = ngf * (2**(n_local_enhancers-n)) + model_downsample = [nn.ReflectionPad2d(3), nn.Conv2d(input_nc, ngf_global, kernel_size=7, padding=0), + norm_layer(ngf_global), nn.ReLU(True), + nn.Conv2d(ngf_global, ngf_global * 2, kernel_size=3, stride=2, padding=1), + norm_layer(ngf_global * 2), nn.ReLU(True)] + ### residual blocks + model_upsample = [] + for i in range(n_blocks_local): + model_upsample += [ResnetBlock(ngf_global * 2, padding_type=padding_type, norm_layer=norm_layer)] + + ### upsample + model_upsample += [nn.ConvTranspose2d(ngf_global * 2, ngf_global, kernel_size=3, stride=2, padding=1, output_padding=1), + norm_layer(ngf_global), nn.ReLU(True)] + + ### final convolution + if n == n_local_enhancers: + model_upsample += [nn.ReflectionPad2d(3), nn.Conv2d(ngf, output_nc, kernel_size=7, padding=0), nn.Tanh()] + + setattr(self, 'model'+str(n)+'_1', nn.Sequential(*model_downsample)) + setattr(self, 'model'+str(n)+'_2', nn.Sequential(*model_upsample)) + + self.downsample = nn.AvgPool2d(3, stride=2, padding=[1, 1], count_include_pad=False) + + def forward(self, input): + ### create input pyramid + input_downsampled = [input] + for i in range(self.n_local_enhancers): + input_downsampled.append(self.downsample(input_downsampled[-1])) + + ### output at coarest level + output_prev = self.model(input_downsampled[-1]) + ### build up one layer at a time + for n_local_enhancers in range(1, self.n_local_enhancers+1): + model_downsample = getattr(self, 'model'+str(n_local_enhancers)+'_1') + model_upsample = getattr(self, 'model'+str(n_local_enhancers)+'_2') + input_i = input_downsampled[self.n_local_enhancers-n_local_enhancers] + output_prev = model_upsample(model_downsample(input_i) + output_prev) + return output_prev + +class GlobalGenerator(nn.Module): + def __init__(self, input_nc, output_nc, ngf=64, n_downsampling=3, n_blocks=9, norm_layer=nn.BatchNorm2d, + padding_type='reflect'): + assert(n_blocks >= 0) + super(GlobalGenerator, self).__init__() + activation = nn.ReLU(True) + + model = [nn.ReflectionPad2d(3), nn.Conv2d(input_nc, ngf, kernel_size=7, padding=0), norm_layer(ngf), activation] + ### downsample + for i in range(n_downsampling): + mult = 2**i + model += [nn.Conv2d(ngf * mult, ngf * mult * 2, kernel_size=3, stride=2, padding=1), + norm_layer(ngf * mult * 2), activation] + + ### resnet blocks + mult = 2**n_downsampling + for i in range(n_blocks): + model += [ResnetBlock(ngf * mult, padding_type=padding_type, activation=activation, norm_layer=norm_layer)] + + ### upsample + for i in range(n_downsampling): + mult = 2**(n_downsampling - i) + model += [nn.ConvTranspose2d(ngf * mult, int(ngf * mult / 2), kernel_size=3, stride=2, padding=1, output_padding=1), + norm_layer(int(ngf * mult / 2)), activation] + model += [nn.ReflectionPad2d(3), nn.Conv2d(ngf, output_nc, kernel_size=7, padding=0), nn.Tanh()] + self.model = nn.Sequential(*model) + + def forward(self, input): + return self.model(input) + +# Define a resnet block +class ResnetBlock(nn.Module): + def __init__(self, dim, padding_type, norm_layer, activation=nn.ReLU(True), use_dropout=False): + super(ResnetBlock, self).__init__() + self.conv_block = self.build_conv_block(dim, padding_type, norm_layer, activation, use_dropout) + + def build_conv_block(self, dim, padding_type, norm_layer, activation, use_dropout): + conv_block = [] + p = 0 + if padding_type == 'reflect': + conv_block += [nn.ReflectionPad2d(1)] + elif padding_type == 'replicate': + conv_block += [nn.ReplicationPad2d(1)] + elif padding_type == 'zero': + p = 1 + else: + raise NotImplementedError('padding [%s] is not implemented' % padding_type) + + conv_block += [nn.Conv2d(dim, dim, kernel_size=3, padding=p), + norm_layer(dim), + activation] + if use_dropout: + conv_block += [nn.Dropout(0.5)] + + p = 0 + if padding_type == 'reflect': + conv_block += [nn.ReflectionPad2d(1)] + elif padding_type == 'replicate': + conv_block += [nn.ReplicationPad2d(1)] + elif padding_type == 'zero': + p = 1 + else: + raise NotImplementedError('padding [%s] is not implemented' % padding_type) + conv_block += [nn.Conv2d(dim, dim, kernel_size=3, padding=p), + norm_layer(dim)] + + return nn.Sequential(*conv_block) + + def forward(self, x): + out = x + self.conv_block(x) + return out + +class Encoder(nn.Module): + def __init__(self, input_nc, output_nc, ngf=32, n_downsampling=4, norm_layer=nn.BatchNorm2d): + super(Encoder, self).__init__() + self.output_nc = output_nc + + model = [nn.ReflectionPad2d(3), nn.Conv2d(input_nc, ngf, kernel_size=7, padding=0), + norm_layer(ngf), nn.ReLU(True)] + ### downsample + for i in range(n_downsampling): + mult = 2**i + model += [nn.Conv2d(ngf * mult, ngf * mult * 2, kernel_size=3, stride=2, padding=1), + norm_layer(ngf * mult * 2), nn.ReLU(True)] + + ### upsample + for i in range(n_downsampling): + mult = 2**(n_downsampling - i) + model += [nn.ConvTranspose2d(ngf * mult, int(ngf * mult / 2), kernel_size=3, stride=2, padding=1, output_padding=1), + norm_layer(int(ngf * mult / 2)), nn.ReLU(True)] + + model += [nn.ReflectionPad2d(3), nn.Conv2d(ngf, output_nc, kernel_size=7, padding=0), nn.Tanh()] + self.model = nn.Sequential(*model) + + def forward(self, input, inst): + outputs = self.model(input) + + # instance-wise average pooling + outputs_mean = outputs.clone() + inst_list = np.unique(inst.cpu().numpy().astype(int)) + for i in inst_list: + for b in range(input.size()[0]): + indices = (inst[b:b+1] == int(i)).nonzero() # n x 4 + for j in range(self.output_nc): + output_ins = outputs[indices[:,0] + b, indices[:,1] + j, indices[:,2], indices[:,3]] + mean_feat = torch.mean(output_ins).expand_as(output_ins) + outputs_mean[indices[:,0] + b, indices[:,1] + j, indices[:,2], indices[:,3]] = mean_feat + return outputs_mean + +class MultiscaleDiscriminator(nn.Module): + def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d, + use_sigmoid=False, num_D=3, getIntermFeat=False): + super(MultiscaleDiscriminator, self).__init__() + self.num_D = num_D + self.n_layers = n_layers + self.getIntermFeat = getIntermFeat + + for i in range(num_D): + netD = NLayerDiscriminator(input_nc, ndf, n_layers, norm_layer, use_sigmoid, getIntermFeat) + if getIntermFeat: + for j in range(n_layers+2): + setattr(self, 'scale'+str(i)+'_layer'+str(j), getattr(netD, 'model'+str(j))) + else: + setattr(self, 'layer'+str(i), netD.model) + + self.downsample = nn.AvgPool2d(3, stride=2, padding=[1, 1], count_include_pad=False) + + def singleD_forward(self, model, input): + if self.getIntermFeat: + result = [input] + for i in range(len(model)): + result.append(model[i](result[-1])) + return result[1:] + else: + return [model(input)] + + def forward(self, input): + num_D = self.num_D + result = [] + input_downsampled = input + for i in range(num_D): + if self.getIntermFeat: + model = [getattr(self, 'scale'+str(num_D-1-i)+'_layer'+str(j)) for j in range(self.n_layers+2)] + else: + model = getattr(self, 'layer'+str(num_D-1-i)) + result.append(self.singleD_forward(model, input_downsampled)) + if i != (num_D-1): + input_downsampled = self.downsample(input_downsampled) + return result + +# Defines the PatchGAN discriminator with the specified arguments. +class NLayerDiscriminator(nn.Module): + def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d, use_sigmoid=False, getIntermFeat=False): + super(NLayerDiscriminator, self).__init__() + self.getIntermFeat = getIntermFeat + self.n_layers = n_layers + + kw = 4 + padw = int(np.ceil((kw-1.0)/2)) + sequence = [[nn.Conv2d(input_nc, ndf, kernel_size=kw, stride=2, padding=padw), nn.LeakyReLU(0.2, True)]] + + nf = ndf + for n in range(1, n_layers): + nf_prev = nf + nf = min(nf * 2, 512) + sequence += [[ + nn.Conv2d(nf_prev, nf, kernel_size=kw, stride=2, padding=padw), + norm_layer(nf), nn.LeakyReLU(0.2, True) + ]] + + nf_prev = nf + nf = min(nf * 2, 512) + sequence += [[ + nn.Conv2d(nf_prev, nf, kernel_size=kw, stride=1, padding=padw), + norm_layer(nf), + nn.LeakyReLU(0.2, True) + ]] + + sequence += [[nn.Conv2d(nf, 1, kernel_size=kw, stride=1, padding=padw)]] + + if use_sigmoid: + sequence += [[nn.Sigmoid()]] + + if getIntermFeat: + for n in range(len(sequence)): + setattr(self, 'model'+str(n), nn.Sequential(*sequence[n])) + else: + sequence_stream = [] + for n in range(len(sequence)): + sequence_stream += sequence[n] + self.model = nn.Sequential(*sequence_stream) + + def forward(self, input): + if self.getIntermFeat: + res = [input] + for n in range(self.n_layers+2): + model = getattr(self, 'model'+str(n)) + res.append(model(res[-1])) + return res[1:] + else: + return self.model(input) + +from torchvision import models +class Vgg19(torch.nn.Module): + def __init__(self, requires_grad=False): + super(Vgg19, self).__init__() + vgg_pretrained_features = models.vgg19(pretrained=True).features + self.slice1 = torch.nn.Sequential() + self.slice2 = torch.nn.Sequential() + self.slice3 = torch.nn.Sequential() + self.slice4 = torch.nn.Sequential() + self.slice5 = torch.nn.Sequential() + for x in range(2): + self.slice1.add_module(str(x), vgg_pretrained_features[x]) + for x in range(2, 7): + self.slice2.add_module(str(x), vgg_pretrained_features[x]) + for x in range(7, 12): + self.slice3.add_module(str(x), vgg_pretrained_features[x]) + for x in range(12, 21): + self.slice4.add_module(str(x), vgg_pretrained_features[x]) + for x in range(21, 30): + self.slice5.add_module(str(x), vgg_pretrained_features[x]) + if not requires_grad: + for param in self.parameters(): + param.requires_grad = False + + def forward(self, X): + h_relu1 = self.slice1(X) + h_relu2 = self.slice2(h_relu1) + h_relu3 = self.slice3(h_relu2) + h_relu4 = self.slice4(h_relu3) + h_relu5 = self.slice5(h_relu4) + out = [h_relu1, h_relu2, h_relu3, h_relu4, h_relu5] + return out diff --git a/pix2pixHD_attack/models/pix2pixHD_model.py b/pix2pixHD_attack/models/pix2pixHD_model.py new file mode 100755 index 0000000..dd99e48 --- /dev/null +++ b/pix2pixHD_attack/models/pix2pixHD_model.py @@ -0,0 +1,363 @@ +import numpy as np +import torch +import os +from torch.autograd import Variable +from util.image_pool import ImagePool +from .base_model import BaseModel +from . import networks +from util import attacks + +class Pix2PixHDModel(BaseModel): + def name(self): + return 'Pix2PixHDModel' + + def init_loss_filter(self, use_gan_feat_loss, use_vgg_loss): + flags = (True, use_gan_feat_loss, use_vgg_loss, True, True) + def loss_filter(g_gan, g_gan_feat, g_vgg, d_real, d_fake): + return [l for (l,f) in zip((g_gan,g_gan_feat,g_vgg,d_real,d_fake),flags) if f] + return loss_filter + + def initialize(self, opt): + BaseModel.initialize(self, opt) + if opt.resize_or_crop != 'none' or not opt.isTrain: # when training at full res this causes OOM + torch.backends.cudnn.benchmark = True + self.isTrain = opt.isTrain + self.use_features = opt.instance_feat or opt.label_feat + self.gen_features = self.use_features and not self.opt.load_features + input_nc = opt.label_nc if opt.label_nc != 0 else opt.input_nc + + ##### define networks + # Generator network + netG_input_nc = input_nc + if not opt.no_instance: + netG_input_nc += 1 + if self.use_features: + netG_input_nc += opt.feat_num + self.netG = networks.define_G(netG_input_nc, opt.output_nc, opt.ngf, opt.netG, + opt.n_downsample_global, opt.n_blocks_global, opt.n_local_enhancers, + opt.n_blocks_local, opt.norm, gpu_ids=self.gpu_ids) + + # Discriminator network + if self.isTrain: + use_sigmoid = opt.no_lsgan + netD_input_nc = input_nc + opt.output_nc + if not opt.no_instance: + netD_input_nc += 1 + self.netD = networks.define_D(netD_input_nc, opt.ndf, opt.n_layers_D, opt.norm, use_sigmoid, + opt.num_D, not opt.no_ganFeat_loss, gpu_ids=self.gpu_ids) + + ### Encoder network + if self.gen_features: + self.netE = networks.define_G(opt.output_nc, opt.feat_num, opt.nef, 'encoder', + opt.n_downsample_E, norm=opt.norm, gpu_ids=self.gpu_ids) + if self.opt.verbose: + print('---------- Networks initialized -------------') + + # load networks + if not self.isTrain or opt.continue_train or opt.load_pretrain: + pretrained_path = '' if not self.isTrain else opt.load_pretrain + self.load_network(self.netG, 'G', opt.which_epoch, pretrained_path) + if self.isTrain: + self.load_network(self.netD, 'D', opt.which_epoch, pretrained_path) + if self.gen_features: + self.load_network(self.netE, 'E', opt.which_epoch, pretrained_path) + + # set loss functions and optimizers + if self.isTrain: + if opt.pool_size > 0 and (len(self.gpu_ids)) > 1: + raise NotImplementedError("Fake Pool Not Implemented for MultiGPU") + self.fake_pool = ImagePool(opt.pool_size) + self.old_lr = opt.lr + + # define loss functions + self.loss_filter = self.init_loss_filter(not opt.no_ganFeat_loss, not opt.no_vgg_loss) + + self.criterionGAN = networks.GANLoss(use_lsgan=not opt.no_lsgan, tensor=self.Tensor) + self.criterionFeat = torch.nn.L1Loss() + if not opt.no_vgg_loss: + self.criterionVGG = networks.VGGLoss(self.gpu_ids) + + + # Names so we can breakout loss + self.loss_names = self.loss_filter('G_GAN','G_GAN_Feat','G_VGG','D_real', 'D_fake') + + # initialize optimizers + # optimizer G + if opt.niter_fix_global > 0: + import sys + if sys.version_info >= (3,0): + finetune_list = set() + else: + from sets import Set + finetune_list = Set() + + params_dict = dict(self.netG.named_parameters()) + params = [] + for key, value in params_dict.items(): + if key.startswith('model' + str(opt.n_local_enhancers)): + params += [value] + finetune_list.add(key.split('.')[0]) + print('------------- Only training the local enhancer network (for %d epochs) ------------' % opt.niter_fix_global) + print('The layers that are finetuned are ', sorted(finetune_list)) + else: + params = list(self.netG.parameters()) + if self.gen_features: + params += list(self.netE.parameters()) + self.optimizer_G = torch.optim.Adam(params, lr=opt.lr, betas=(opt.beta1, 0.999)) + + # optimizer D + params = list(self.netD.parameters()) + self.optimizer_D = torch.optim.Adam(params, lr=opt.lr, betas=(opt.beta1, 0.999)) + + def encode_input(self, label_map, inst_map=None, real_image=None, feat_map=None, infer=False): + if self.opt.label_nc == 0: + input_label = label_map.data.cuda() + else: + # create one-hot vector for label map + size = label_map.size() + oneHot_size = (size[0], self.opt.label_nc, size[2], size[3]) + input_label = torch.cuda.FloatTensor(torch.Size(oneHot_size)).zero_() + input_label = input_label.scatter_(1, label_map.data.long().cuda(), 1.0) + if self.opt.data_type == 16: + input_label = input_label.half() + + # get edges from instance map + if not self.opt.no_instance: + inst_map = inst_map.data.cuda() + edge_map = self.get_edges(inst_map) + input_label = torch.cat((input_label, edge_map), dim=1) + input_label = Variable(input_label, volatile=infer) + + # real images for training + if real_image is not None: + real_image = Variable(real_image.data.cuda()) + + # instance map for feature encoding + if self.use_features: + # get precomputed feature maps + if self.opt.load_features: + feat_map = Variable(feat_map.data.cuda()) + if self.opt.label_feat: + inst_map = label_map.cuda() + + return input_label, inst_map, real_image, feat_map + + def discriminate(self, input_label, test_image, use_pool=False): + input_concat = torch.cat((input_label, test_image.detach()), dim=1) + if use_pool: + fake_query = self.fake_pool.query(input_concat) + return self.netD.forward(fake_query) + else: + return self.netD.forward(input_concat) + + def forward(self, label, inst, image, feat, infer=False): + # Encode Inputs + input_label, inst_map, real_image, feat_map = self.encode_input(label, inst, image, feat) + + # Fake Generation + if self.use_features: + if not self.opt.load_features: + feat_map = self.netE.forward(real_image, inst_map) + input_concat = torch.cat((input_label, feat_map), dim=1) + else: + input_concat = input_label + + fake_image = self.netG.forward(input_concat) + # fake_image = self.netG.forward(input_adv) + + # Fake Detection and Loss + pred_fake_pool = self.discriminate(input_label, fake_image, use_pool=True) + loss_D_fake = self.criterionGAN(pred_fake_pool, False) + + # Real Detection and Loss + pred_real = self.discriminate(input_label, real_image) + loss_D_real = self.criterionGAN(pred_real, True) + + # GAN loss (Fake Passability Loss) + pred_fake = self.netD.forward(torch.cat((input_label, fake_image), dim=1)) + loss_G_GAN = self.criterionGAN(pred_fake, True) + + # GAN feature matching loss + loss_G_GAN_Feat = 0 + if not self.opt.no_ganFeat_loss: + feat_weights = 4.0 / (self.opt.n_layers_D + 1) + D_weights = 1.0 / self.opt.num_D + for i in range(self.opt.num_D): + for j in range(len(pred_fake[i])-1): + loss_G_GAN_Feat += D_weights * feat_weights * \ + self.criterionFeat(pred_fake[i][j], pred_real[i][j].detach()) * self.opt.lambda_feat + + # VGG feature matching loss + loss_G_VGG = 0 + if not self.opt.no_vgg_loss: + loss_G_VGG = self.criterionVGG(fake_image, real_image) * self.opt.lambda_feat + + # Only return the fake_B image if necessary to save BW + return [ self.loss_filter( loss_G_GAN, loss_G_GAN_Feat, loss_G_VGG, loss_D_real, loss_D_fake ), None if not infer else fake_image ] + + def inference(self, label, inst, image=None): + # Encode Inputs + image = Variable(image) if image is not None else None + input_label, inst_map, real_image, _ = self.encode_input(Variable(label), Variable(inst), image, infer=True) + + # Fake Generation + if self.use_features: + if self.opt.use_encoded_image: + # encode the real image to get feature map + feat_map = self.netE.forward(real_image, inst_map) + else: + # sample clusters from precomputed features + feat_map = self.sample_features(inst_map) + input_concat = torch.cat((input_label, feat_map), dim=1) + else: + input_concat = input_label + + # Attack + # pgd_attack = attacks.LinfPGDAttack(model=self.netG) + # black = np.zeros((1, 3, input_concat.size(2), input_concat.size(3))) + # black = torch.FloatTensor(black).cuda() + # # print(input_concat.size()) + # input_adv, perturb = pgd_attack.perturb(input_concat, black) + + with torch.no_grad(): + fake_image = self.netG.forward(input_concat) + + return fake_image + + def inference_attack(self, label, inst, image=None, perturb=None): + # Encode Inputs + image = Variable(image) if image is not None else None + input_label, inst_map, real_image, _ = self.encode_input(Variable(label), Variable(inst), image, infer=True) + + # Fake Generation + if self.use_features: + if self.opt.use_encoded_image: + # encode the real image to get feature map + feat_map = self.netE.forward(real_image, inst_map) + else: + # sample clusters from precomputed features + feat_map = self.sample_features(inst_map) + input_concat = torch.cat((input_label, feat_map), dim=1) + else: + input_concat = input_label + + input_adv = torch.clamp(input_concat + perturb * 1000, min=-1, max=1) + + with torch.no_grad(): + fake_image = self.netG.forward(input_adv) + + return fake_image, input_adv + + def attack(self, label, inst, image=None): + # Encode Inputs + image = Variable(image) if image is not None else None + input_label, inst_map, real_image, _ = self.encode_input(Variable(label), Variable(inst), image, infer=True) + + # Fake Generation + if self.use_features: + if self.opt.use_encoded_image: + # encode the real image to get feature map + feat_map = self.netE.forward(real_image, inst_map) + else: + # sample clusters from precomputed features + feat_map = self.sample_features(inst_map) + input_concat = torch.cat((input_label, feat_map), dim=1) + else: + input_concat = input_label + + # Attack + pgd_attack = attacks.LinfPGDAttack(model=self.netG) + black = np.zeros((1, 3, input_concat.size(2), input_concat.size(3))) + black = torch.FloatTensor(black).cuda() + # print(input_concat.size()) + input_adv, perturb = pgd_attack.perturb(input_concat, black) + + return input_adv, perturb + + def sample_features(self, inst): + # read precomputed feature clusters + cluster_path = os.path.join(self.opt.checkpoints_dir, self.opt.name, self.opt.cluster_path) + features_clustered = np.load(cluster_path, encoding='latin1').item() + + # randomly sample from the feature clusters + inst_np = inst.cpu().numpy().astype(int) + feat_map = self.Tensor(inst.size()[0], self.opt.feat_num, inst.size()[2], inst.size()[3]) + for i in np.unique(inst_np): + label = i if i < 1000 else i//1000 + if label in features_clustered: + feat = features_clustered[label] + cluster_idx = np.random.randint(0, feat.shape[0]) + + idx = (inst == int(i)).nonzero() + for k in range(self.opt.feat_num): + feat_map[idx[:,0], idx[:,1] + k, idx[:,2], idx[:,3]] = feat[cluster_idx, k] + if self.opt.data_type==16: + feat_map = feat_map.half() + return feat_map + + def encode_features(self, image, inst): + image = Variable(image.cuda(), volatile=True) + feat_num = self.opt.feat_num + h, w = inst.size()[2], inst.size()[3] + block_num = 32 + feat_map = self.netE.forward(image, inst.cuda()) + inst_np = inst.cpu().numpy().astype(int) + feature = {} + for i in range(self.opt.label_nc): + feature[i] = np.zeros((0, feat_num+1)) + for i in np.unique(inst_np): + label = i if i < 1000 else i//1000 + idx = (inst == int(i)).nonzero() + num = idx.size()[0] + idx = idx[num//2,:] + val = np.zeros((1, feat_num+1)) + for k in range(feat_num): + val[0, k] = feat_map[idx[0], idx[1] + k, idx[2], idx[3]].data[0] + val[0, feat_num] = float(num) / (h * w // block_num) + feature[label] = np.append(feature[label], val, axis=0) + return feature + + def get_edges(self, t): + edge = torch.cuda.ByteTensor(t.size()).zero_() + edge = edge.bool() + edge[:,:,:,1:] = edge[:,:,:,1:] | (t[:,:,:,1:] != t[:,:,:,:-1]) + edge[:,:,:,:-1] = edge[:,:,:,:-1] | (t[:,:,:,1:] != t[:,:,:,:-1]) + edge[:,:,1:,:] = edge[:,:,1:,:] | (t[:,:,1:,:] != t[:,:,:-1,:]) + edge[:,:,:-1,:] = edge[:,:,:-1,:] | (t[:,:,1:,:] != t[:,:,:-1,:]) + if self.opt.data_type==16: + return edge.half() + else: + return edge.float() + + def save(self, which_epoch): + self.save_network(self.netG, 'G', which_epoch, self.gpu_ids) + self.save_network(self.netD, 'D', which_epoch, self.gpu_ids) + if self.gen_features: + self.save_network(self.netE, 'E', which_epoch, self.gpu_ids) + + def update_fixed_params(self): + # after fixing the global generator for a number of iterations, also start finetuning it + params = list(self.netG.parameters()) + if self.gen_features: + params += list(self.netE.parameters()) + self.optimizer_G = torch.optim.Adam(params, lr=self.opt.lr, betas=(self.opt.beta1, 0.999)) + if self.opt.verbose: + print('------------ Now also finetuning global generator -----------') + + def update_learning_rate(self): + lrd = self.opt.lr / self.opt.niter_decay + lr = self.old_lr - lrd + for param_group in self.optimizer_D.param_groups: + param_group['lr'] = lr + for param_group in self.optimizer_G.param_groups: + param_group['lr'] = lr + if self.opt.verbose: + print('update learning rate: %f -> %f' % (self.old_lr, lr)) + self.old_lr = lr + +class InferenceModel(Pix2PixHDModel): + def forward(self, inp): + label, inst = inp + return self.inference(label, inst) + + diff --git a/pix2pixHD_attack/models/ui_model.py b/pix2pixHD_attack/models/ui_model.py new file mode 100755 index 0000000..c5b3433 --- /dev/null +++ b/pix2pixHD_attack/models/ui_model.py @@ -0,0 +1,347 @@ +import torch +from torch.autograd import Variable +from collections import OrderedDict +import numpy as np +import os +from PIL import Image +import util.util as util +from .base_model import BaseModel +from . import networks + +class UIModel(BaseModel): + def name(self): + return 'UIModel' + + def initialize(self, opt): + assert(not opt.isTrain) + BaseModel.initialize(self, opt) + self.use_features = opt.instance_feat or opt.label_feat + + netG_input_nc = opt.label_nc + if not opt.no_instance: + netG_input_nc += 1 + if self.use_features: + netG_input_nc += opt.feat_num + + self.netG = networks.define_G(netG_input_nc, opt.output_nc, opt.ngf, opt.netG, + opt.n_downsample_global, opt.n_blocks_global, opt.n_local_enhancers, + opt.n_blocks_local, opt.norm, gpu_ids=self.gpu_ids) + self.load_network(self.netG, 'G', opt.which_epoch) + + print('---------- Networks initialized -------------') + + def toTensor(self, img, normalize=False): + tensor = torch.from_numpy(np.array(img, np.int32, copy=False)) + tensor = tensor.view(1, img.size[1], img.size[0], len(img.mode)) + tensor = tensor.transpose(1, 2).transpose(1, 3).contiguous() + if normalize: + return (tensor.float()/255.0 - 0.5) / 0.5 + return tensor.float() + + def load_image(self, label_path, inst_path, feat_path): + opt = self.opt + # read label map + label_img = Image.open(label_path) + if label_path.find('face') != -1: + label_img = label_img.convert('L') + ow, oh = label_img.size + w = opt.loadSize + h = int(w * oh / ow) + label_img = label_img.resize((w, h), Image.NEAREST) + label_map = self.toTensor(label_img) + + # onehot vector input for label map + self.label_map = label_map.cuda() + oneHot_size = (1, opt.label_nc, h, w) + input_label = self.Tensor(torch.Size(oneHot_size)).zero_() + self.input_label = input_label.scatter_(1, label_map.long().cuda(), 1.0) + + # read instance map + if not opt.no_instance: + inst_img = Image.open(inst_path) + inst_img = inst_img.resize((w, h), Image.NEAREST) + self.inst_map = self.toTensor(inst_img).cuda() + self.edge_map = self.get_edges(self.inst_map) + self.net_input = Variable(torch.cat((self.input_label, self.edge_map), dim=1), volatile=True) + else: + self.net_input = Variable(self.input_label, volatile=True) + + self.features_clustered = np.load(feat_path).item() + self.object_map = self.inst_map if opt.instance_feat else self.label_map + + object_np = self.object_map.cpu().numpy().astype(int) + self.feat_map = self.Tensor(1, opt.feat_num, h, w).zero_() + self.cluster_indices = np.zeros(self.opt.label_nc, np.uint8) + for i in np.unique(object_np): + label = i if i < 1000 else i//1000 + if label in self.features_clustered: + feat = self.features_clustered[label] + np.random.seed(i+1) + cluster_idx = np.random.randint(0, feat.shape[0]) + self.cluster_indices[label] = cluster_idx + idx = (self.object_map == i).nonzero() + self.set_features(idx, feat, cluster_idx) + + self.net_input_original = self.net_input.clone() + self.label_map_original = self.label_map.clone() + self.feat_map_original = self.feat_map.clone() + if not opt.no_instance: + self.inst_map_original = self.inst_map.clone() + + def reset(self): + self.net_input = self.net_input_prev = self.net_input_original.clone() + self.label_map = self.label_map_prev = self.label_map_original.clone() + self.feat_map = self.feat_map_prev = self.feat_map_original.clone() + if not self.opt.no_instance: + self.inst_map = self.inst_map_prev = self.inst_map_original.clone() + self.object_map = self.inst_map if self.opt.instance_feat else self.label_map + + def undo(self): + self.net_input = self.net_input_prev + self.label_map = self.label_map_prev + self.feat_map = self.feat_map_prev + if not self.opt.no_instance: + self.inst_map = self.inst_map_prev + self.object_map = self.inst_map if self.opt.instance_feat else self.label_map + + # get boundary map from instance map + def get_edges(self, t): + edge = torch.cuda.ByteTensor(t.size()).zero_() + edge[:,:,:,1:] = edge[:,:,:,1:] | (t[:,:,:,1:] != t[:,:,:,:-1]) + edge[:,:,:,:-1] = edge[:,:,:,:-1] | (t[:,:,:,1:] != t[:,:,:,:-1]) + edge[:,:,1:,:] = edge[:,:,1:,:] | (t[:,:,1:,:] != t[:,:,:-1,:]) + edge[:,:,:-1,:] = edge[:,:,:-1,:] | (t[:,:,1:,:] != t[:,:,:-1,:]) + return edge.float() + + # change the label at the source position to the label at the target position + def change_labels(self, click_src, click_tgt): + y_src, x_src = click_src[0], click_src[1] + y_tgt, x_tgt = click_tgt[0], click_tgt[1] + label_src = int(self.label_map[0, 0, y_src, x_src]) + inst_src = self.inst_map[0, 0, y_src, x_src] + label_tgt = int(self.label_map[0, 0, y_tgt, x_tgt]) + inst_tgt = self.inst_map[0, 0, y_tgt, x_tgt] + + idx_src = (self.inst_map == inst_src).nonzero() + # need to change 3 things: label map, instance map, and feature map + if idx_src.shape: + # backup current maps + self.backup_current_state() + + # change both the label map and the network input + self.label_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + self.net_input[idx_src[:,0], idx_src[:,1] + label_src, idx_src[:,2], idx_src[:,3]] = 0 + self.net_input[idx_src[:,0], idx_src[:,1] + label_tgt, idx_src[:,2], idx_src[:,3]] = 1 + + # update the instance map (and the network input) + if inst_tgt > 1000: + # if different instances have different ids, give the new object a new id + tgt_indices = (self.inst_map > label_tgt * 1000) & (self.inst_map < (label_tgt+1) * 1000) + inst_tgt = self.inst_map[tgt_indices].max() + 1 + self.inst_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = inst_tgt + self.net_input[:,-1,:,:] = self.get_edges(self.inst_map) + + # also copy the source features to the target position + idx_tgt = (self.inst_map == inst_tgt).nonzero() + if idx_tgt.shape: + self.copy_features(idx_src, idx_tgt[0,:]) + + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + + # add strokes of target label in the image + def add_strokes(self, click_src, label_tgt, bw, save): + # get the region of the new strokes (bw is the brush width) + size = self.net_input.size() + h, w = size[2], size[3] + idx_src = torch.LongTensor(bw**2, 4).fill_(0) + for i in range(bw): + idx_src[i*bw:(i+1)*bw, 2] = min(h-1, max(0, click_src[0]-bw//2 + i)) + for j in range(bw): + idx_src[i*bw+j, 3] = min(w-1, max(0, click_src[1]-bw//2 + j)) + idx_src = idx_src.cuda() + + # again, need to update 3 things + if idx_src.shape: + # backup current maps + if save: + self.backup_current_state() + + # update the label map (and the network input) in the stroke region + self.label_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + for k in range(self.opt.label_nc): + self.net_input[idx_src[:,0], idx_src[:,1] + k, idx_src[:,2], idx_src[:,3]] = 0 + self.net_input[idx_src[:,0], idx_src[:,1] + label_tgt, idx_src[:,2], idx_src[:,3]] = 1 + + # update the instance map (and the network input) + self.inst_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + self.net_input[:,-1,:,:] = self.get_edges(self.inst_map) + + # also update the features if available + if self.opt.instance_feat: + feat = self.features_clustered[label_tgt] + #np.random.seed(label_tgt+1) + #cluster_idx = np.random.randint(0, feat.shape[0]) + cluster_idx = self.cluster_indices[label_tgt] + self.set_features(idx_src, feat, cluster_idx) + + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + + # add an object to the clicked position with selected style + def add_objects(self, click_src, label_tgt, mask, style_id=0): + y, x = click_src[0], click_src[1] + mask = np.transpose(mask, (2, 0, 1))[np.newaxis,...] + idx_src = torch.from_numpy(mask).cuda().nonzero() + idx_src[:,2] += y + idx_src[:,3] += x + + # backup current maps + self.backup_current_state() + + # update label map + self.label_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + for k in range(self.opt.label_nc): + self.net_input[idx_src[:,0], idx_src[:,1] + k, idx_src[:,2], idx_src[:,3]] = 0 + self.net_input[idx_src[:,0], idx_src[:,1] + label_tgt, idx_src[:,2], idx_src[:,3]] = 1 + + # update instance map + self.inst_map[idx_src[:,0], idx_src[:,1], idx_src[:,2], idx_src[:,3]] = label_tgt + self.net_input[:,-1,:,:] = self.get_edges(self.inst_map) + + # update feature map + self.set_features(idx_src, self.feat, style_id) + + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + + def single_forward(self, net_input, feat_map): + net_input = torch.cat((net_input, feat_map), dim=1) + fake_image = self.netG.forward(net_input) + + if fake_image.size()[0] == 1: + return fake_image.data[0] + return fake_image.data + + + # generate all outputs for different styles + def style_forward(self, click_pt, style_id=-1): + if click_pt is None: + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + self.crop = None + self.mask = None + else: + instToChange = int(self.object_map[0, 0, click_pt[0], click_pt[1]]) + self.instToChange = instToChange + label = instToChange if instToChange < 1000 else instToChange//1000 + self.feat = self.features_clustered[label] + self.fake_image = [] + self.mask = self.object_map == instToChange + idx = self.mask.nonzero() + self.get_crop_region(idx) + if idx.size(): + if style_id == -1: + (min_y, min_x, max_y, max_x) = self.crop + ### original + for cluster_idx in range(self.opt.multiple_output): + self.set_features(idx, self.feat, cluster_idx) + fake_image = self.single_forward(self.net_input, self.feat_map) + fake_image = util.tensor2im(fake_image[:,min_y:max_y,min_x:max_x]) + self.fake_image.append(fake_image) + """### To speed up previewing different style results, either crop or downsample the label maps + if instToChange > 1000: + (min_y, min_x, max_y, max_x) = self.crop + ### crop + _, _, h, w = self.net_input.size() + offset = 512 + y_start, x_start = max(0, min_y-offset), max(0, min_x-offset) + y_end, x_end = min(h, (max_y + offset)), min(w, (max_x + offset)) + y_region = slice(y_start, y_start+(y_end-y_start)//16*16) + x_region = slice(x_start, x_start+(x_end-x_start)//16*16) + net_input = self.net_input[:,:,y_region,x_region] + for cluster_idx in range(self.opt.multiple_output): + self.set_features(idx, self.feat, cluster_idx) + fake_image = self.single_forward(net_input, self.feat_map[:,:,y_region,x_region]) + fake_image = util.tensor2im(fake_image[:,min_y-y_start:max_y-y_start,min_x-x_start:max_x-x_start]) + self.fake_image.append(fake_image) + else: + ### downsample + (min_y, min_x, max_y, max_x) = [crop//2 for crop in self.crop] + net_input = self.net_input[:,:,::2,::2] + size = net_input.size() + net_input_batch = net_input.expand(self.opt.multiple_output, size[1], size[2], size[3]) + for cluster_idx in range(self.opt.multiple_output): + self.set_features(idx, self.feat, cluster_idx) + feat_map = self.feat_map[:,:,::2,::2] + if cluster_idx == 0: + feat_map_batch = feat_map + else: + feat_map_batch = torch.cat((feat_map_batch, feat_map), dim=0) + fake_image_batch = self.single_forward(net_input_batch, feat_map_batch) + for i in range(self.opt.multiple_output): + self.fake_image.append(util.tensor2im(fake_image_batch[i,:,min_y:max_y,min_x:max_x]))""" + + else: + self.set_features(idx, self.feat, style_id) + self.cluster_indices[label] = style_id + self.fake_image = util.tensor2im(self.single_forward(self.net_input, self.feat_map)) + + def backup_current_state(self): + self.net_input_prev = self.net_input.clone() + self.label_map_prev = self.label_map.clone() + self.inst_map_prev = self.inst_map.clone() + self.feat_map_prev = self.feat_map.clone() + + # crop the ROI and get the mask of the object + def get_crop_region(self, idx): + size = self.net_input.size() + h, w = size[2], size[3] + min_y, min_x = idx[:,2].min(), idx[:,3].min() + max_y, max_x = idx[:,2].max(), idx[:,3].max() + crop_min = 128 + if max_y - min_y < crop_min: + min_y = max(0, (max_y + min_y) // 2 - crop_min // 2) + max_y = min(h-1, min_y + crop_min) + if max_x - min_x < crop_min: + min_x = max(0, (max_x + min_x) // 2 - crop_min // 2) + max_x = min(w-1, min_x + crop_min) + self.crop = (min_y, min_x, max_y, max_x) + self.mask = self.mask[:,:, min_y:max_y, min_x:max_x] + + # update the feature map once a new object is added or the label is changed + def update_features(self, cluster_idx, mask=None, click_pt=None): + self.feat_map_prev = self.feat_map.clone() + # adding a new object + if mask is not None: + y, x = click_pt[0], click_pt[1] + mask = np.transpose(mask, (2,0,1))[np.newaxis,...] + idx = torch.from_numpy(mask).cuda().nonzero() + idx[:,2] += y + idx[:,3] += x + # changing the label of an existing object + else: + idx = (self.object_map == self.instToChange).nonzero() + + # update feature map + self.set_features(idx, self.feat, cluster_idx) + + # set the class features to the target feature + def set_features(self, idx, feat, cluster_idx): + for k in range(self.opt.feat_num): + self.feat_map[idx[:,0], idx[:,1] + k, idx[:,2], idx[:,3]] = feat[cluster_idx, k] + + # copy the features at the target position to the source position + def copy_features(self, idx_src, idx_tgt): + for k in range(self.opt.feat_num): + val = self.feat_map[idx_tgt[0], idx_tgt[1] + k, idx_tgt[2], idx_tgt[3]] + self.feat_map[idx_src[:,0], idx_src[:,1] + k, idx_src[:,2], idx_src[:,3]] = val + + def get_current_visuals(self, getLabel=False): + mask = self.mask + if self.mask is not None: + mask = np.transpose(self.mask[0].cpu().float().numpy(), (1,2,0)).astype(np.uint8) + + dict_list = [('fake_image', self.fake_image), ('mask', mask)] + + if getLabel: # only output label map if needed to save bandwidth + label = util.tensor2label(self.net_input.data[0], self.opt.label_nc) + dict_list += [('label', label)] + + return OrderedDict(dict_list) \ No newline at end of file diff --git a/pix2pixHD_attack/options/__init__.py b/pix2pixHD_attack/options/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/pix2pixHD_attack/options/base_options.py b/pix2pixHD_attack/options/base_options.py new file mode 100755 index 0000000..0d5e769 --- /dev/null +++ b/pix2pixHD_attack/options/base_options.py @@ -0,0 +1,99 @@ +import argparse +import os +from util import util +import torch + +class BaseOptions(): + def __init__(self): + self.parser = argparse.ArgumentParser() + self.initialized = False + + def initialize(self): + # experiment specifics + self.parser.add_argument('--name', type=str, default='label2city', help='name of the experiment. It decides where to store samples and models') + self.parser.add_argument('--gpu_ids', type=str, default='0', help='gpu ids: e.g. 0 0,1,2, 0,2. use -1 for CPU') + self.parser.add_argument('--checkpoints_dir', type=str, default='./checkpoints', help='models are saved here') + self.parser.add_argument('--model', type=str, default='pix2pixHD', help='which model to use') + self.parser.add_argument('--norm', type=str, default='instance', help='instance normalization or batch normalization') + self.parser.add_argument('--use_dropout', action='store_true', help='use dropout for the generator') + self.parser.add_argument('--data_type', default=32, type=int, choices=[8, 16, 32], help="Supported data type i.e. 8, 16, 32 bit") + self.parser.add_argument('--verbose', action='store_true', default=False, help='toggles verbose') + self.parser.add_argument('--fp16', action='store_true', default=False, help='train with AMP') + self.parser.add_argument('--local_rank', type=int, default=0, help='local rank for distributed training') + + # input/output sizes + self.parser.add_argument('--batchSize', type=int, default=1, help='input batch size') + self.parser.add_argument('--loadSize', type=int, default=1024, help='scale images to this size') + self.parser.add_argument('--fineSize', type=int, default=512, help='then crop to this size') + self.parser.add_argument('--label_nc', type=int, default=35, help='# of input label channels') + self.parser.add_argument('--input_nc', type=int, default=3, help='# of input image channels') + self.parser.add_argument('--output_nc', type=int, default=3, help='# of output image channels') + + # for setting inputs + self.parser.add_argument('--dataroot', type=str, default='./datasets/cityscapes/') + self.parser.add_argument('--resize_or_crop', type=str, default='scale_width', help='scaling and cropping of images at load time [resize_and_crop|crop|scale_width|scale_width_and_crop]') + self.parser.add_argument('--serial_batches', action='store_true', help='if true, takes images in order to make batches, otherwise takes them randomly') + self.parser.add_argument('--no_flip', action='store_true', help='if specified, do not flip the images for data argumentation') + self.parser.add_argument('--nThreads', default=2, type=int, help='# threads for loading data') + self.parser.add_argument('--max_dataset_size', type=int, default=float("inf"), help='Maximum number of samples allowed per dataset. If the dataset directory contains more than max_dataset_size, only a subset is loaded.') + + # for displays + self.parser.add_argument('--display_winsize', type=int, default=512, help='display window size') + self.parser.add_argument('--tf_log', action='store_true', help='if specified, use tensorboard logging. Requires tensorflow installed') + + # for generator + self.parser.add_argument('--netG', type=str, default='global', help='selects model to use for netG') + self.parser.add_argument('--ngf', type=int, default=64, help='# of gen filters in first conv layer') + self.parser.add_argument('--n_downsample_global', type=int, default=4, help='number of downsampling layers in netG') + self.parser.add_argument('--n_blocks_global', type=int, default=9, help='number of residual blocks in the global generator network') + self.parser.add_argument('--n_blocks_local', type=int, default=3, help='number of residual blocks in the local enhancer network') + self.parser.add_argument('--n_local_enhancers', type=int, default=1, help='number of local enhancers to use') + self.parser.add_argument('--niter_fix_global', type=int, default=0, help='number of epochs that we only train the outmost local enhancer') + + # for instance-wise features + self.parser.add_argument('--no_instance', action='store_true', help='if specified, do *not* add instance map as input') + self.parser.add_argument('--instance_feat', action='store_true', help='if specified, add encoded instance features as input') + self.parser.add_argument('--label_feat', action='store_true', help='if specified, add encoded label features as input') + self.parser.add_argument('--feat_num', type=int, default=3, help='vector length for encoded features') + self.parser.add_argument('--load_features', action='store_true', help='if specified, load precomputed feature maps') + self.parser.add_argument('--n_downsample_E', type=int, default=4, help='# of downsampling layers in encoder') + self.parser.add_argument('--nef', type=int, default=16, help='# of encoder filters in the first conv layer') + self.parser.add_argument('--n_clusters', type=int, default=10, help='number of clusters for features') + + self.initialized = True + + def parse(self, save=True): + if not self.initialized: + self.initialize() + self.opt = self.parser.parse_args() + self.opt.isTrain = self.isTrain # train or test + + str_ids = self.opt.gpu_ids.split(',') + self.opt.gpu_ids = [] + for str_id in str_ids: + id = int(str_id) + if id >= 0: + self.opt.gpu_ids.append(id) + + # set gpu ids + if len(self.opt.gpu_ids) > 0: + torch.cuda.set_device(self.opt.gpu_ids[0]) + + args = vars(self.opt) + + print('------------ Options -------------') + for k, v in sorted(args.items()): + print('%s: %s' % (str(k), str(v))) + print('-------------- End ----------------') + + # save to the disk + expr_dir = os.path.join(self.opt.checkpoints_dir, self.opt.name) + util.mkdirs(expr_dir) + if save and not self.opt.continue_train: + file_name = os.path.join(expr_dir, 'opt.txt') + with open(file_name, 'wt') as opt_file: + opt_file.write('------------ Options -------------\n') + for k, v in sorted(args.items()): + opt_file.write('%s: %s\n' % (str(k), str(v))) + opt_file.write('-------------- End ----------------\n') + return self.opt diff --git a/pix2pixHD_attack/options/test_options.py b/pix2pixHD_attack/options/test_options.py new file mode 100755 index 0000000..f27fc5e --- /dev/null +++ b/pix2pixHD_attack/options/test_options.py @@ -0,0 +1,17 @@ +from .base_options import BaseOptions + +class TestOptions(BaseOptions): + def initialize(self): + BaseOptions.initialize(self) + self.parser.add_argument('--ntest', type=int, default=float("inf"), help='# of test examples.') + self.parser.add_argument('--results_dir', type=str, default='./results/', help='saves results here.') + self.parser.add_argument('--aspect_ratio', type=float, default=1.0, help='aspect ratio of result images') + self.parser.add_argument('--phase', type=str, default='test', help='train, val, test, etc') + self.parser.add_argument('--which_epoch', type=str, default='latest', help='which epoch to load? set to latest to use latest cached model') + self.parser.add_argument('--how_many', type=int, default=50, help='how many test images to run') + self.parser.add_argument('--cluster_path', type=str, default='features_clustered_010.npy', help='the path for clustered results of encoded features') + self.parser.add_argument('--use_encoded_image', action='store_true', help='if specified, encode the real image to get the feature map') + self.parser.add_argument("--export_onnx", type=str, help="export ONNX model to a given file") + self.parser.add_argument("--engine", type=str, help="run serialized TRT engine") + self.parser.add_argument("--onnx", type=str, help="run ONNX model via TRT") + self.isTrain = False diff --git a/pix2pixHD_attack/options/train_options.py b/pix2pixHD_attack/options/train_options.py new file mode 100755 index 0000000..cacb8e7 --- /dev/null +++ b/pix2pixHD_attack/options/train_options.py @@ -0,0 +1,34 @@ +from .base_options import BaseOptions + +class TrainOptions(BaseOptions): + def initialize(self): + BaseOptions.initialize(self) + # for displays + self.parser.add_argument('--display_freq', type=int, default=100, help='frequency of showing training results on screen') + self.parser.add_argument('--print_freq', type=int, default=100, help='frequency of showing training results on console') + self.parser.add_argument('--save_latest_freq', type=int, default=1000, help='frequency of saving the latest results') + self.parser.add_argument('--save_epoch_freq', type=int, default=10, help='frequency of saving checkpoints at the end of epochs') + self.parser.add_argument('--no_html', action='store_true', help='do not save intermediate training results to [opt.checkpoints_dir]/[opt.name]/web/') + self.parser.add_argument('--debug', action='store_true', help='only do one epoch and displays at each iteration') + + # for training + self.parser.add_argument('--continue_train', action='store_true', help='continue training: load the latest model') + self.parser.add_argument('--load_pretrain', type=str, default='', help='load the pretrained model from the specified location') + self.parser.add_argument('--which_epoch', type=str, default='latest', help='which epoch to load? set to latest to use latest cached model') + self.parser.add_argument('--phase', type=str, default='train', help='train, val, test, etc') + self.parser.add_argument('--niter', type=int, default=100, help='# of iter at starting learning rate') + self.parser.add_argument('--niter_decay', type=int, default=100, help='# of iter to linearly decay learning rate to zero') + self.parser.add_argument('--beta1', type=float, default=0.5, help='momentum term of adam') + self.parser.add_argument('--lr', type=float, default=0.0002, help='initial learning rate for adam') + + # for discriminators + self.parser.add_argument('--num_D', type=int, default=2, help='number of discriminators to use') + self.parser.add_argument('--n_layers_D', type=int, default=3, help='only used if which_model_netD==n_layers') + self.parser.add_argument('--ndf', type=int, default=64, help='# of discrim filters in first conv layer') + self.parser.add_argument('--lambda_feat', type=float, default=10.0, help='weight for feature matching loss') + self.parser.add_argument('--no_ganFeat_loss', action='store_true', help='if specified, do *not* use discriminator feature matching loss') + self.parser.add_argument('--no_vgg_loss', action='store_true', help='if specified, do *not* use VGG feature matching loss') + self.parser.add_argument('--no_lsgan', action='store_true', help='do *not* use least square GAN, if false, use vanilla GAN') + self.parser.add_argument('--pool_size', type=int, default=0, help='the size of image buffer that stores previously generated images') + + self.isTrain = True diff --git a/pix2pixHD_attack/precompute_feature_maps.py b/pix2pixHD_attack/precompute_feature_maps.py new file mode 100755 index 0000000..8836ea2 --- /dev/null +++ b/pix2pixHD_attack/precompute_feature_maps.py @@ -0,0 +1,33 @@ +from options.train_options import TrainOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import os +import util.util as util +from torch.autograd import Variable +import torch.nn as nn + +opt = TrainOptions().parse() +opt.nThreads = 1 +opt.batchSize = 1 +opt.serial_batches = True +opt.no_flip = True +opt.instance_feat = True + +name = 'features' +save_path = os.path.join(opt.checkpoints_dir, opt.name) + +############ Initialize ######### +data_loader = CreateDataLoader(opt) +dataset = data_loader.load_data() +dataset_size = len(data_loader) +model = create_model(opt) +util.mkdirs(os.path.join(opt.dataroot, opt.phase + '_feat')) + +######## Save precomputed feature maps for 1024p training ####### +for i, data in enumerate(dataset): + print('%d / %d images' % (i+1, dataset_size)) + feat_map = model.module.netE.forward(Variable(data['image'].cuda(), volatile=True), data['inst'].cuda()) + feat_map = nn.Upsample(scale_factor=2, mode='nearest')(feat_map) + image_numpy = util.tensor2im(feat_map.data[0]) + save_path = data['path'][0].replace('/train_label/', '/train_feat/') + util.save_image(image_numpy, save_path) \ No newline at end of file diff --git a/pix2pixHD_attack/run_engine.py b/pix2pixHD_attack/run_engine.py new file mode 100644 index 0000000..700494d --- /dev/null +++ b/pix2pixHD_attack/run_engine.py @@ -0,0 +1,173 @@ +import os +import sys +from random import randint +import numpy as np +import tensorrt + +try: + from PIL import Image + import pycuda.driver as cuda + import pycuda.gpuarray as gpuarray + import pycuda.autoinit + import argparse +except ImportError as err: + sys.stderr.write("""ERROR: failed to import module ({}) +Please make sure you have pycuda and the example dependencies installed. +https://wiki.tiker.net/PyCuda/Installation/Linux +pip(3) install tensorrt[examples] +""".format(err)) + exit(1) + +try: + import tensorrt as trt + from tensorrt.parsers import caffeparser + from tensorrt.parsers import onnxparser +except ImportError as err: + sys.stderr.write("""ERROR: failed to import module ({}) +Please make sure you have the TensorRT Library installed +and accessible in your LD_LIBRARY_PATH +""".format(err)) + exit(1) + + +G_LOGGER = trt.infer.ConsoleLogger(trt.infer.LogSeverity.INFO) + +class Profiler(trt.infer.Profiler): + """ + Example Implimentation of a Profiler + Is identical to the Profiler class in trt.infer so it is possible + to just use that instead of implementing this if further + functionality is not needed + """ + def __init__(self, timing_iter): + trt.infer.Profiler.__init__(self) + self.timing_iterations = timing_iter + self.profile = [] + + def report_layer_time(self, layerName, ms): + record = next((r for r in self.profile if r[0] == layerName), (None, None)) + if record == (None, None): + self.profile.append((layerName, ms)) + else: + self.profile[self.profile.index(record)] = (record[0], record[1] + ms) + + def print_layer_times(self): + totalTime = 0 + for i in range(len(self.profile)): + print("{:40.40} {:4.3f}ms".format(self.profile[i][0], self.profile[i][1] / self.timing_iterations)) + totalTime += self.profile[i][1] + print("Time over all layers: {:4.2f} ms per iteration".format(totalTime / self.timing_iterations)) + + +def get_input_output_names(trt_engine): + nbindings = trt_engine.get_nb_bindings(); + maps = [] + + for b in range(0, nbindings): + dims = trt_engine.get_binding_dimensions(b).to_DimsCHW() + name = trt_engine.get_binding_name(b) + type = trt_engine.get_binding_data_type(b) + + if (trt_engine.binding_is_input(b)): + maps.append(name) + print("Found input: ", name) + else: + maps.append(name) + print("Found output: ", name) + + print("shape=" + str(dims.C()) + " , " + str(dims.H()) + " , " + str(dims.W())) + print("dtype=" + str(type)) + return maps + +def create_memory(engine, name, buf, mem, batchsize, inp, inp_idx): + binding_idx = engine.get_binding_index(name) + if binding_idx == -1: + raise AttributeError("Not a valid binding") + print("Binding: name={}, bindingIndex={}".format(name, str(binding_idx))) + dims = engine.get_binding_dimensions(binding_idx).to_DimsCHW() + eltCount = dims.C() * dims.H() * dims.W() * batchsize + + if engine.binding_is_input(binding_idx): + h_mem = inp[inp_idx] + inp_idx = inp_idx + 1 + else: + h_mem = np.random.uniform(0.0, 255.0, eltCount).astype(np.dtype('f4')) + + d_mem = cuda.mem_alloc(eltCount * 4) + cuda.memcpy_htod(d_mem, h_mem) + buf.insert(binding_idx, int(d_mem)) + mem.append(d_mem) + return inp_idx + + +#Run inference on device +def time_inference(engine, batch_size, inp): + bindings = [] + mem = [] + inp_idx = 0 + for io in get_input_output_names(engine): + inp_idx = create_memory(engine, io, bindings, mem, + batch_size, inp, inp_idx) + + context = engine.create_execution_context() + g_prof = Profiler(500) + context.set_profiler(g_prof) + for i in range(iter): + context.execute(batch_size, bindings) + g_prof.print_layer_times() + + context.destroy() + return + + +def convert_to_datatype(v): + if v==8: + return trt.infer.DataType.INT8 + elif v==16: + return trt.infer.DataType.HALF + elif v==32: + return trt.infer.DataType.FLOAT + else: + print("ERROR: Invalid model data type bit depth: " + str(v)) + return trt.infer.DataType.INT8 + +def run_trt_engine(engine_file, bs, it): + engine = trt.utils.load_engine(G_LOGGER, engine_file) + time_inference(engine, bs, it) + +def run_onnx(onnx_file, data_type, bs, inp): + # Create onnx_config + apex = onnxparser.create_onnxconfig() + apex.set_model_file_name(onnx_file) + apex.set_model_dtype(convert_to_datatype(data_type)) + + # create parser + trt_parser = onnxparser.create_onnxparser(apex) + assert(trt_parser) + data_type = apex.get_model_dtype() + onnx_filename = apex.get_model_file_name() + trt_parser.parse(onnx_filename, data_type) + trt_parser.report_parsing_info() + trt_parser.convert_to_trtnetwork() + trt_network = trt_parser.get_trtnetwork() + assert(trt_network) + + # create infer builder + trt_builder = trt.infer.create_infer_builder(G_LOGGER) + trt_builder.set_max_batch_size(max_batch_size) + trt_builder.set_max_workspace_size(max_workspace_size) + + if (apex.get_model_dtype() == trt.infer.DataType_kHALF): + print("------------------- Running FP16 -----------------------------") + trt_builder.set_half2_mode(True) + elif (apex.get_model_dtype() == trt.infer.DataType_kINT8): + print("------------------- Running INT8 -----------------------------") + trt_builder.set_int8_mode(True) + else: + print("------------------- Running FP32 -----------------------------") + + print("----- Builder is Done -----") + print("----- Creating Engine -----") + trt_engine = trt_builder.build_cuda_engine(trt_network) + print("----- Engine is built -----") + time_inference(engine, bs, inp) diff --git a/pix2pixHD_attack/scripts/test_1024p.sh b/pix2pixHD_attack/scripts/test_1024p.sh new file mode 100755 index 0000000..319803c --- /dev/null +++ b/pix2pixHD_attack/scripts/test_1024p.sh @@ -0,0 +1,4 @@ +#!/bin/bash +################################ Testing ################################ +# labels only +python test.py --name label2city_1024p --netG local --ngf 32 --resize_or_crop none $@ diff --git a/pix2pixHD_attack/scripts/test_1024p_feat.sh b/pix2pixHD_attack/scripts/test_1024p_feat.sh new file mode 100755 index 0000000..2f4ba17 --- /dev/null +++ b/pix2pixHD_attack/scripts/test_1024p_feat.sh @@ -0,0 +1,5 @@ +################################ Testing ################################ +# first precompute and cluster all features +python encode_features.py --name label2city_1024p_feat --netG local --ngf 32 --resize_or_crop none; +# use instance-wise features +python test.py --name label2city_1024p_feat ---netG local --ngf 32 --resize_or_crop none --instance_feat \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/test_512p.sh b/pix2pixHD_attack/scripts/test_512p.sh new file mode 100755 index 0000000..3131043 --- /dev/null +++ b/pix2pixHD_attack/scripts/test_512p.sh @@ -0,0 +1,3 @@ +################################ Testing ################################ +# labels only +python test.py --name label2city_512p \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/test_512p_feat.sh b/pix2pixHD_attack/scripts/test_512p_feat.sh new file mode 100755 index 0000000..8f25e9c --- /dev/null +++ b/pix2pixHD_attack/scripts/test_512p_feat.sh @@ -0,0 +1,5 @@ +################################ Testing ################################ +# first precompute and cluster all features +python encode_features.py --name label2city_512p_feat; +# use instance-wise features +python test.py --name label2city_512p_feat --instance_feat \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_1024p_12G.sh b/pix2pixHD_attack/scripts/train_1024p_12G.sh new file mode 100755 index 0000000..d5ea7d7 --- /dev/null +++ b/pix2pixHD_attack/scripts/train_1024p_12G.sh @@ -0,0 +1,4 @@ +############## To train images at 2048 x 1024 resolution after training 1024 x 512 resolution models ############# +##### Using GPUs with 12G memory (not tested) +# Using labels only +python train.py --name label2city_1024p --netG local --ngf 32 --num_D 3 --load_pretrain checkpoints/label2city_512p/ --niter_fix_global 20 --resize_or_crop crop --fineSize 1024 \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_1024p_24G.sh b/pix2pixHD_attack/scripts/train_1024p_24G.sh new file mode 100755 index 0000000..88e58f7 --- /dev/null +++ b/pix2pixHD_attack/scripts/train_1024p_24G.sh @@ -0,0 +1,4 @@ +############## To train images at 2048 x 1024 resolution after training 1024 x 512 resolution models ############# +######## Using GPUs with 24G memory +# Using labels only +python train.py --name label2city_1024p --netG local --ngf 32 --num_D 3 --load_pretrain checkpoints/label2city_512p/ --niter 50 --niter_decay 50 --niter_fix_global 10 --resize_or_crop none \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_1024p_feat_12G.sh b/pix2pixHD_attack/scripts/train_1024p_feat_12G.sh new file mode 100755 index 0000000..f8e3d61 --- /dev/null +++ b/pix2pixHD_attack/scripts/train_1024p_feat_12G.sh @@ -0,0 +1,6 @@ +############## To train images at 2048 x 1024 resolution after training 1024 x 512 resolution models ############# +##### Using GPUs with 12G memory (not tested) +# First precompute feature maps and save them +python precompute_feature_maps.py --name label2city_512p_feat; +# Adding instances and encoded features +python train.py --name label2city_1024p_feat --netG local --ngf 32 --num_D 3 --load_pretrain checkpoints/label2city_512p_feat/ --niter_fix_global 20 --resize_or_crop crop --fineSize 896 --instance_feat --load_features \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_1024p_feat_24G.sh b/pix2pixHD_attack/scripts/train_1024p_feat_24G.sh new file mode 100755 index 0000000..399d720 --- /dev/null +++ b/pix2pixHD_attack/scripts/train_1024p_feat_24G.sh @@ -0,0 +1,6 @@ +############## To train images at 2048 x 1024 resolution after training 1024 x 512 resolution models ############# +######## Using GPUs with 24G memory +# First precompute feature maps and save them +python precompute_feature_maps.py --name label2city_512p_feat; +# Adding instances and encoded features +python train.py --name label2city_1024p_feat --netG local --ngf 32 --num_D 3 --load_pretrain checkpoints/label2city_512p_feat/ --niter 50 --niter_decay 50 --niter_fix_global 10 --resize_or_crop none --instance_feat --load_features \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_512p.sh b/pix2pixHD_attack/scripts/train_512p.sh new file mode 100755 index 0000000..222c348 --- /dev/null +++ b/pix2pixHD_attack/scripts/train_512p.sh @@ -0,0 +1,2 @@ +### Using labels only +python train.py --name label2city_512p \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_512p_feat.sh b/pix2pixHD_attack/scripts/train_512p_feat.sh new file mode 100755 index 0000000..9d4859c --- /dev/null +++ b/pix2pixHD_attack/scripts/train_512p_feat.sh @@ -0,0 +1,2 @@ +### Adding instances and encoded features +python train.py --name label2city_512p_feat --instance_feat \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_512p_fp16.sh b/pix2pixHD_attack/scripts/train_512p_fp16.sh new file mode 100755 index 0000000..2bd5e07 --- /dev/null +++ b/pix2pixHD_attack/scripts/train_512p_fp16.sh @@ -0,0 +1,2 @@ +### Using labels only + python -m torch.distributed.launch train.py --name label2city_512p --fp16 \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_512p_fp16_multigpu.sh b/pix2pixHD_attack/scripts/train_512p_fp16_multigpu.sh new file mode 100755 index 0000000..0d9686c --- /dev/null +++ b/pix2pixHD_attack/scripts/train_512p_fp16_multigpu.sh @@ -0,0 +1,2 @@ +######## Multi-GPU training example ####### +python -m torch.distributed.launch train.py --name label2city_512p --batchSize 8 --gpu_ids 0,1,2,3,4,5,6,7 --fp16 \ No newline at end of file diff --git a/pix2pixHD_attack/scripts/train_512p_multigpu.sh b/pix2pixHD_attack/scripts/train_512p_multigpu.sh new file mode 100755 index 0000000..16f0a1a --- /dev/null +++ b/pix2pixHD_attack/scripts/train_512p_multigpu.sh @@ -0,0 +1,2 @@ +######## Multi-GPU training example ####### +python train.py --name label2city_512p --batchSize 8 --gpu_ids 0,1,2,3,4,5,6,7 \ No newline at end of file diff --git a/pix2pixHD_attack/test.py b/pix2pixHD_attack/test.py new file mode 100755 index 0000000..6c5296c --- /dev/null +++ b/pix2pixHD_attack/test.py @@ -0,0 +1,71 @@ +import os +from collections import OrderedDict +from torch.autograd import Variable +from options.test_options import TestOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import util.util as util +from util.visualizer import Visualizer +from util import html +import torch + +opt = TestOptions().parse(save=False) +opt.nThreads = 1 # test code only supports nThreads = 1 +opt.batchSize = 1 # test code only supports batchSize = 1 +opt.serial_batches = True # no shuffle +opt.no_flip = True # no flip + +data_loader = CreateDataLoader(opt) +dataset = data_loader.load_data() +visualizer = Visualizer(opt) +# create website +web_dir = os.path.join(opt.results_dir, opt.name, '%s_%s' % (opt.phase, opt.which_epoch)) +webpage = html.HTML(web_dir, 'Experiment = %s, Phase = %s, Epoch = %s' % (opt.name, opt.phase, opt.which_epoch)) + +# test +if not opt.engine and not opt.onnx: + model = create_model(opt) + if opt.data_type == 16: + model.half() + elif opt.data_type == 8: + model.type(torch.uint8) + + if opt.verbose: + print(model) +else: + from run_engine import run_trt_engine, run_onnx + +for i, data in enumerate(dataset): + if i >= opt.how_many: + break + if opt.data_type == 16: + data['label'] = data['label'].half() + data['inst'] = data['inst'].half() + elif opt.data_type == 8: + data['label'] = data['label'].uint8() + data['inst'] = data['inst'].uint8() + if opt.export_onnx: + print ("Exporting to ONNX: ", opt.export_onnx) + assert opt.export_onnx.endswith("onnx"), "Export model file should end with .onnx" + torch.onnx.export(model, [data['label'], data['inst']], + opt.export_onnx, verbose=True) + exit(0) + minibatch = 1 + + if i == 0: + adv_image, perturb = model.attack(data['label'], data['inst'], data['image']) + if opt.engine: + generated = run_trt_engine(opt.engine, minibatch, [data['label'], data['inst']]) + elif opt.onnx: + generated = run_onnx(opt.onnx, opt.data_type, minibatch, [data['label'], data['inst']]) + else: + # generated = model.inference(data['label'], data['inst'], data['image']) + generated, adv_img = model.inference_attack(data['label'], data['inst'], data['image'], perturb) + + visuals = OrderedDict([('input_label', util.tensor2label(adv_img.data[0], opt.label_nc)), + ('synthesized_image', util.tensor2im(generated.data[0]))]) + img_path = data['path'] + print('process image... %s' % img_path) + visualizer.save_images(webpage, visuals, img_path) + +webpage.save() diff --git a/pix2pixHD_attack/train.py b/pix2pixHD_attack/train.py new file mode 100755 index 0000000..acedac2 --- /dev/null +++ b/pix2pixHD_attack/train.py @@ -0,0 +1,141 @@ +import time +import os +import numpy as np +import torch +from torch.autograd import Variable +from collections import OrderedDict +from subprocess import call +import fractions +def lcm(a,b): return abs(a * b)/fractions.gcd(a,b) if a and b else 0 + +from options.train_options import TrainOptions +from data.data_loader import CreateDataLoader +from models.models import create_model +import util.util as util +from util.visualizer import Visualizer + +opt = TrainOptions().parse() +iter_path = os.path.join(opt.checkpoints_dir, opt.name, 'iter.txt') +if opt.continue_train: + try: + start_epoch, epoch_iter = np.loadtxt(iter_path , delimiter=',', dtype=int) + except: + start_epoch, epoch_iter = 1, 0 + print('Resuming from epoch %d at iteration %d' % (start_epoch, epoch_iter)) +else: + start_epoch, epoch_iter = 1, 0 + +opt.print_freq = lcm(opt.print_freq, opt.batchSize) +if opt.debug: + opt.display_freq = 1 + opt.print_freq = 1 + opt.niter = 1 + opt.niter_decay = 0 + opt.max_dataset_size = 10 + +data_loader = CreateDataLoader(opt) +dataset = data_loader.load_data() +dataset_size = len(data_loader) +print('#training images = %d' % dataset_size) + +model = create_model(opt) +visualizer = Visualizer(opt) +if opt.fp16: + from apex import amp + model, [optimizer_G, optimizer_D] = amp.initialize(model, [model.optimizer_G, model.optimizer_D], opt_level='O1') + model = torch.nn.DataParallel(model, device_ids=opt.gpu_ids) +else: + optimizer_G, optimizer_D = model.module.optimizer_G, model.module.optimizer_D + +total_steps = (start_epoch-1) * dataset_size + epoch_iter + +display_delta = total_steps % opt.display_freq +print_delta = total_steps % opt.print_freq +save_delta = total_steps % opt.save_latest_freq + +for epoch in range(start_epoch, opt.niter + opt.niter_decay + 1): + epoch_start_time = time.time() + if epoch != start_epoch: + epoch_iter = epoch_iter % dataset_size + for i, data in enumerate(dataset, start=epoch_iter): + if total_steps % opt.print_freq == print_delta: + iter_start_time = time.time() + total_steps += opt.batchSize + epoch_iter += opt.batchSize + + # whether to collect output images + save_fake = total_steps % opt.display_freq == display_delta + + ############## Forward Pass ###################### + losses, generated = model(Variable(data['label']), Variable(data['inst']), + Variable(data['image']), Variable(data['feat']), infer=save_fake) + + # sum per device losses + losses = [ torch.mean(x) if not isinstance(x, int) else x for x in losses ] + loss_dict = dict(zip(model.module.loss_names, losses)) + + # calculate final loss scalar + loss_D = (loss_dict['D_fake'] + loss_dict['D_real']) * 0.5 + loss_G = loss_dict['G_GAN'] + loss_dict.get('G_GAN_Feat',0) + loss_dict.get('G_VGG',0) + + ############### Backward Pass #################### + # update generator weights + optimizer_G.zero_grad() + if opt.fp16: + with amp.scale_loss(loss_G, optimizer_G) as scaled_loss: scaled_loss.backward() + else: + loss_G.backward() + optimizer_G.step() + + # update discriminator weights + optimizer_D.zero_grad() + if opt.fp16: + with amp.scale_loss(loss_D, optimizer_D) as scaled_loss: scaled_loss.backward() + else: + loss_D.backward() + optimizer_D.step() + + ############## Display results and errors ########## + ### print out errors + if total_steps % opt.print_freq == print_delta: + errors = {k: v.data.item() if not isinstance(v, int) else v for k, v in loss_dict.items()} + t = (time.time() - iter_start_time) / opt.print_freq + visualizer.print_current_errors(epoch, epoch_iter, errors, t) + visualizer.plot_current_errors(errors, total_steps) + #call(["nvidia-smi", "--format=csv", "--query-gpu=memory.used,memory.free"]) + + ### display output images + if save_fake: + visuals = OrderedDict([('input_label', util.tensor2label(data['label'][0], opt.label_nc)), + ('synthesized_image', util.tensor2im(generated.data[0])), + ('real_image', util.tensor2im(data['image'][0]))]) + visualizer.display_current_results(visuals, epoch, total_steps) + + ### save latest model + if total_steps % opt.save_latest_freq == save_delta: + print('saving the latest model (epoch %d, total_steps %d)' % (epoch, total_steps)) + model.module.save('latest') + np.savetxt(iter_path, (epoch, epoch_iter), delimiter=',', fmt='%d') + + if epoch_iter >= dataset_size: + break + + # end of epoch + iter_end_time = time.time() + print('End of epoch %d / %d \t Time Taken: %d sec' % + (epoch, opt.niter + opt.niter_decay, time.time() - epoch_start_time)) + + ### save model for this epoch + if epoch % opt.save_epoch_freq == 0: + print('saving the model at the end of epoch %d, iters %d' % (epoch, total_steps)) + model.module.save('latest') + model.module.save(epoch) + np.savetxt(iter_path, (epoch+1, 0), delimiter=',', fmt='%d') + + ### instead of only training the local enhancer, train the entire network after certain iterations + if (opt.niter_fix_global != 0) and (epoch == opt.niter_fix_global): + model.module.update_fixed_params() + + ### linearly decay learning rate after certain iterations + if epoch > opt.niter: + model.module.update_learning_rate() diff --git a/pix2pixHD_attack/util/__init__.py b/pix2pixHD_attack/util/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/pix2pixHD_attack/util/attacks.py b/pix2pixHD_attack/util/attacks.py new file mode 100644 index 0000000..54db657 --- /dev/null +++ b/pix2pixHD_attack/util/attacks.py @@ -0,0 +1,50 @@ +import copy +import numpy as np +from collections import Iterable +from scipy.stats import truncnorm + +import torch +import torch.nn as nn + +class LinfPGDAttack(object): + def __init__(self, model=None, epsilon=0.2, k=1, a=0.01): + self.model = model + self.epsilon = epsilon + self.k = k + self.a = a + self.loss_fn = nn.MSELoss() + + def perturb(self, X_nat, y): + """ + Given examples (X_nat, y), returns adversarial + examples within epsilon of X_nat in l_infinity norm. + """ + X = X_nat.clone().detach_() + + for i in range(self.k): + print('test', i) + X.requires_grad = True + output = self.model(X) + + self.model.zero_grad() + loss = -self.loss_fn(output, y) + loss.backward() + grad = X.grad + + X_adv = X + self.a * grad.sign() + + eta = torch.clamp(X_adv - X_nat, min=-self.epsilon, max=self.epsilon) + X = torch.clamp(X_nat + eta, min=-1, max=1).detach_() + eta = None + X_adv = None + + return X, X - X_nat + +def clip_tensor(X, Y, Z): + # Clip X with Y min and Z max + X_np = X.data.cpu().numpy() + Y_np = Y.data.cpu().numpy() + Z_np = Z.data.cpu().numpy() + X_clipped = np.clip(X_np, Y_np, Z_np) + X_res = torch.FloatTensor(X_clipped) + return X_res \ No newline at end of file diff --git a/pix2pixHD_attack/util/html.py b/pix2pixHD_attack/util/html.py new file mode 100755 index 0000000..71c48ad --- /dev/null +++ b/pix2pixHD_attack/util/html.py @@ -0,0 +1,63 @@ +import dominate +from dominate.tags import * +import os + + +class HTML: + def __init__(self, web_dir, title, refresh=0): + self.title = title + self.web_dir = web_dir + self.img_dir = os.path.join(self.web_dir, 'images') + if not os.path.exists(self.web_dir): + os.makedirs(self.web_dir) + if not os.path.exists(self.img_dir): + os.makedirs(self.img_dir) + + self.doc = dominate.document(title=title) + if refresh > 0: + with self.doc.head: + meta(http_equiv="refresh", content=str(refresh)) + + def get_image_dir(self): + return self.img_dir + + def add_header(self, str): + with self.doc: + h3(str) + + def add_table(self, border=1): + self.t = table(border=border, style="table-layout: fixed;") + self.doc.add(self.t) + + def add_images(self, ims, txts, links, width=512): + self.add_table() + with self.t: + with tr(): + for im, txt, link in zip(ims, txts, links): + with td(style="word-wrap: break-word;", halign="center", valign="top"): + with p(): + with a(href=os.path.join('images', link)): + img(style="width:%dpx" % (width), src=os.path.join('images', im)) + br() + p(txt) + + def save(self): + html_file = '%s/index.html' % self.web_dir + f = open(html_file, 'wt') + f.write(self.doc.render()) + f.close() + + +if __name__ == '__main__': + html = HTML('web/', 'test_html') + html.add_header('hello world') + + ims = [] + txts = [] + links = [] + for n in range(4): + ims.append('image_%d.jpg' % n) + txts.append('text_%d' % n) + links.append('image_%d.jpg' % n) + html.add_images(ims, txts, links) + html.save() diff --git a/pix2pixHD_attack/util/image_pool.py b/pix2pixHD_attack/util/image_pool.py new file mode 100755 index 0000000..63e1877 --- /dev/null +++ b/pix2pixHD_attack/util/image_pool.py @@ -0,0 +1,31 @@ +import random +import torch +from torch.autograd import Variable +class ImagePool(): + def __init__(self, pool_size): + self.pool_size = pool_size + if self.pool_size > 0: + self.num_imgs = 0 + self.images = [] + + def query(self, images): + if self.pool_size == 0: + return images + return_images = [] + for image in images.data: + image = torch.unsqueeze(image, 0) + if self.num_imgs < self.pool_size: + self.num_imgs = self.num_imgs + 1 + self.images.append(image) + return_images.append(image) + else: + p = random.uniform(0, 1) + if p > 0.5: + random_id = random.randint(0, self.pool_size-1) + tmp = self.images[random_id].clone() + self.images[random_id] = image + return_images.append(tmp) + else: + return_images.append(image) + return_images = Variable(torch.cat(return_images, 0)) + return return_images diff --git a/pix2pixHD_attack/util/util.py b/pix2pixHD_attack/util/util.py new file mode 100755 index 0000000..f4f79ec --- /dev/null +++ b/pix2pixHD_attack/util/util.py @@ -0,0 +1,100 @@ +from __future__ import print_function +import torch +import numpy as np +from PIL import Image +import numpy as np +import os + +# Converts a Tensor into a Numpy array +# |imtype|: the desired type of the converted numpy array +def tensor2im(image_tensor, imtype=np.uint8, normalize=True): + if isinstance(image_tensor, list): + image_numpy = [] + for i in range(len(image_tensor)): + image_numpy.append(tensor2im(image_tensor[i], imtype, normalize)) + return image_numpy + image_numpy = image_tensor.cpu().float().numpy() + if normalize: + image_numpy = (np.transpose(image_numpy, (1, 2, 0)) + 1) / 2.0 * 255.0 + else: + image_numpy = np.transpose(image_numpy, (1, 2, 0)) * 255.0 + image_numpy = np.clip(image_numpy, 0, 255) + if image_numpy.shape[2] == 1 or image_numpy.shape[2] > 3: + image_numpy = image_numpy[:,:,0] + return image_numpy.astype(imtype) + +# Converts a one-hot tensor into a colorful label map +def tensor2label(label_tensor, n_label, imtype=np.uint8): + if n_label == 0: + return tensor2im(label_tensor, imtype) + label_tensor = label_tensor.cpu().float() + if label_tensor.size()[0] > 1: + label_tensor = label_tensor.max(0, keepdim=True)[1] + label_tensor = Colorize(n_label)(label_tensor) + label_numpy = np.transpose(label_tensor.numpy(), (1, 2, 0)) + return label_numpy.astype(imtype) + +def save_image(image_numpy, image_path): + image_pil = Image.fromarray(image_numpy) + image_pil.save(image_path) + +def mkdirs(paths): + if isinstance(paths, list) and not isinstance(paths, str): + for path in paths: + mkdir(path) + else: + mkdir(paths) + +def mkdir(path): + if not os.path.exists(path): + os.makedirs(path) + +############################################################################### +# Code from +# https://github.com/ycszen/pytorch-seg/blob/master/transform.py +# Modified so it complies with the Citscape label map colors +############################################################################### +def uint82bin(n, count=8): + """returns the binary of integer n, count refers to amount of bits""" + return ''.join([str((n >> y) & 1) for y in range(count-1, -1, -1)]) + +def labelcolormap(N): + if N == 35: # cityscape + cmap = np.array([( 0, 0, 0), ( 0, 0, 0), ( 0, 0, 0), ( 0, 0, 0), ( 0, 0, 0), (111, 74, 0), ( 81, 0, 81), + (128, 64,128), (244, 35,232), (250,170,160), (230,150,140), ( 70, 70, 70), (102,102,156), (190,153,153), + (180,165,180), (150,100,100), (150,120, 90), (153,153,153), (153,153,153), (250,170, 30), (220,220, 0), + (107,142, 35), (152,251,152), ( 70,130,180), (220, 20, 60), (255, 0, 0), ( 0, 0,142), ( 0, 0, 70), + ( 0, 60,100), ( 0, 0, 90), ( 0, 0,110), ( 0, 80,100), ( 0, 0,230), (119, 11, 32), ( 0, 0,142)], + dtype=np.uint8) + else: + cmap = np.zeros((N, 3), dtype=np.uint8) + for i in range(N): + r, g, b = 0, 0, 0 + id = i + for j in range(7): + str_id = uint82bin(id) + r = r ^ (np.uint8(str_id[-1]) << (7-j)) + g = g ^ (np.uint8(str_id[-2]) << (7-j)) + b = b ^ (np.uint8(str_id[-3]) << (7-j)) + id = id >> 3 + cmap[i, 0] = r + cmap[i, 1] = g + cmap[i, 2] = b + return cmap + +class Colorize(object): + def __init__(self, n=35): + self.cmap = labelcolormap(n) + self.cmap = torch.from_numpy(self.cmap[:n]) + + def __call__(self, gray_image): + size = gray_image.size() + color_image = torch.ByteTensor(3, size[1], size[2]).fill_(0) + + for label in range(0, len(self.cmap)): + mask = (label == gray_image[0]).cpu() + color_image[0][mask] = self.cmap[label][0] + color_image[1][mask] = self.cmap[label][1] + color_image[2][mask] = self.cmap[label][2] + + return color_image diff --git a/pix2pixHD_attack/util/visualizer.py b/pix2pixHD_attack/util/visualizer.py new file mode 100755 index 0000000..584ac45 --- /dev/null +++ b/pix2pixHD_attack/util/visualizer.py @@ -0,0 +1,131 @@ +import numpy as np +import os +import ntpath +import time +from . import util +from . import html +import scipy.misc +try: + from StringIO import StringIO # Python 2.7 +except ImportError: + from io import BytesIO # Python 3.x + +class Visualizer(): + def __init__(self, opt): + # self.opt = opt + self.tf_log = opt.tf_log + self.use_html = opt.isTrain and not opt.no_html + self.win_size = opt.display_winsize + self.name = opt.name + if self.tf_log: + import tensorflow as tf + self.tf = tf + self.log_dir = os.path.join(opt.checkpoints_dir, opt.name, 'logs') + self.writer = tf.summary.FileWriter(self.log_dir) + + if self.use_html: + self.web_dir = os.path.join(opt.checkpoints_dir, opt.name, 'web') + self.img_dir = os.path.join(self.web_dir, 'images') + print('create web directory %s...' % self.web_dir) + util.mkdirs([self.web_dir, self.img_dir]) + self.log_name = os.path.join(opt.checkpoints_dir, opt.name, 'loss_log.txt') + with open(self.log_name, "a") as log_file: + now = time.strftime("%c") + log_file.write('================ Training Loss (%s) ================\n' % now) + + # |visuals|: dictionary of images to display or save + def display_current_results(self, visuals, epoch, step): + if self.tf_log: # show images in tensorboard output + img_summaries = [] + for label, image_numpy in visuals.items(): + # Write the image to a string + try: + s = StringIO() + except: + s = BytesIO() + scipy.misc.toimage(image_numpy).save(s, format="jpeg") + # Create an Image object + img_sum = self.tf.Summary.Image(encoded_image_string=s.getvalue(), height=image_numpy.shape[0], width=image_numpy.shape[1]) + # Create a Summary value + img_summaries.append(self.tf.Summary.Value(tag=label, image=img_sum)) + + # Create and write Summary + summary = self.tf.Summary(value=img_summaries) + self.writer.add_summary(summary, step) + + if self.use_html: # save images to a html file + for label, image_numpy in visuals.items(): + if isinstance(image_numpy, list): + for i in range(len(image_numpy)): + img_path = os.path.join(self.img_dir, 'epoch%.3d_%s_%d.jpg' % (epoch, label, i)) + util.save_image(image_numpy[i], img_path) + else: + img_path = os.path.join(self.img_dir, 'epoch%.3d_%s.jpg' % (epoch, label)) + util.save_image(image_numpy, img_path) + + # update website + webpage = html.HTML(self.web_dir, 'Experiment name = %s' % self.name, refresh=30) + for n in range(epoch, 0, -1): + webpage.add_header('epoch [%d]' % n) + ims = [] + txts = [] + links = [] + + for label, image_numpy in visuals.items(): + if isinstance(image_numpy, list): + for i in range(len(image_numpy)): + img_path = 'epoch%.3d_%s_%d.jpg' % (n, label, i) + ims.append(img_path) + txts.append(label+str(i)) + links.append(img_path) + else: + img_path = 'epoch%.3d_%s.jpg' % (n, label) + ims.append(img_path) + txts.append(label) + links.append(img_path) + if len(ims) < 10: + webpage.add_images(ims, txts, links, width=self.win_size) + else: + num = int(round(len(ims)/2.0)) + webpage.add_images(ims[:num], txts[:num], links[:num], width=self.win_size) + webpage.add_images(ims[num:], txts[num:], links[num:], width=self.win_size) + webpage.save() + + # errors: dictionary of error labels and values + def plot_current_errors(self, errors, step): + if self.tf_log: + for tag, value in errors.items(): + summary = self.tf.Summary(value=[self.tf.Summary.Value(tag=tag, simple_value=value)]) + self.writer.add_summary(summary, step) + + # errors: same format as |errors| of plotCurrentErrors + def print_current_errors(self, epoch, i, errors, t): + message = '(epoch: %d, iters: %d, time: %.3f) ' % (epoch, i, t) + for k, v in errors.items(): + if v != 0: + message += '%s: %.3f ' % (k, v) + + print(message) + with open(self.log_name, "a") as log_file: + log_file.write('%s\n' % message) + + # save image to the disk + def save_images(self, webpage, visuals, image_path): + image_dir = webpage.get_image_dir() + short_path = ntpath.basename(image_path[0]) + name = os.path.splitext(short_path)[0] + + webpage.add_header(name) + ims = [] + txts = [] + links = [] + + for label, image_numpy in visuals.items(): + image_name = '%s_%s.jpg' % (name, label) + save_path = os.path.join(image_dir, image_name) + util.save_image(image_numpy, save_path) + + ims.append(image_name) + txts.append(label) + links.append(image_name) + webpage.add_images(ims, txts, links, width=self.win_size) diff --git a/stargan/.DS_Store b/stargan/.DS_Store new file mode 100644 index 0000000..fca497f Binary files /dev/null and b/stargan/.DS_Store differ diff --git a/stargan/._.DS_Store b/stargan/._.DS_Store new file mode 100644 index 0000000..b3f132f Binary files /dev/null and b/stargan/._.DS_Store differ diff --git a/stargan/._1-images.jpg b/stargan/._1-images.jpg new file mode 100644 index 0000000..90a85e0 Binary files /dev/null and b/stargan/._1-images.jpg differ diff --git a/stargan/._2-images.jpg b/stargan/._2-images.jpg new file mode 100644 index 0000000..978a7f2 Binary files /dev/null and b/stargan/._2-images.jpg differ diff --git a/stargan/._README.md b/stargan/._README.md new file mode 100644 index 0000000..700298f Binary files /dev/null and b/stargan/._README.md differ diff --git a/stargan/._attacks.py b/stargan/._attacks.py new file mode 100644 index 0000000..03c6c8d Binary files /dev/null and b/stargan/._attacks.py differ diff --git a/stargan/._data_loader.py b/stargan/._data_loader.py new file mode 100644 index 0000000..27fdbd4 Binary files /dev/null and b/stargan/._data_loader.py differ diff --git a/stargan/._download.sh b/stargan/._download.sh new file mode 100644 index 0000000..a20182c Binary files /dev/null and b/stargan/._download.sh differ diff --git a/stargan/._logger.py b/stargan/._logger.py new file mode 100644 index 0000000..b0f76fe Binary files /dev/null and b/stargan/._logger.py differ diff --git a/stargan/._main.py b/stargan/._main.py new file mode 100644 index 0000000..8837ee6 Binary files /dev/null and b/stargan/._main.py differ diff --git a/stargan/._model.py b/stargan/._model.py new file mode 100644 index 0000000..1fe6baf Binary files /dev/null and b/stargan/._model.py differ diff --git a/stargan/._noise.py b/stargan/._noise.py new file mode 100644 index 0000000..44fb386 Binary files /dev/null and b/stargan/._noise.py differ diff --git a/stargan/._solver.py b/stargan/._solver.py new file mode 100644 index 0000000..42b7dcc Binary files /dev/null and b/stargan/._solver.py differ diff --git a/stargan/1-images.jpg b/stargan/1-images.jpg new file mode 100644 index 0000000..a61d696 Binary files /dev/null and b/stargan/1-images.jpg differ diff --git a/stargan/2-images.jpg b/stargan/2-images.jpg new file mode 100644 index 0000000..d798f2d Binary files /dev/null and b/stargan/2-images.jpg differ diff --git a/stargan/LICENSE b/stargan/LICENSE new file mode 100644 index 0000000..8864d4a --- /dev/null +++ b/stargan/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/stargan/README.md b/stargan/README.md new file mode 100644 index 0000000..c05db5d --- /dev/null +++ b/stargan/README.md @@ -0,0 +1,161 @@ +

+ +-------------------------------------------------------------------------------- +This repository provides a PyTorch implementation of [StarGAN](https://arxiv.org/abs/1711.09020). StarGAN can flexibly translate an input image to any desired target domain using only a single generator and a discriminator. The demo video for StarGAN can be found [here](https://www.youtube.com/watch?v=EYjdLppmERE). + +

+ +
+ +## Paper +[StarGAN: Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation](https://arxiv.org/abs/1711.09020)
+[Yunjey Choi](https://github.com/yunjey) 1,2, [Minje Choi](https://github.com/mjc92) 1,2, [Munyoung Kim](https://www.facebook.com/munyoung.kim.1291) 2,3, [Jung-Woo Ha](https://www.facebook.com/jungwoo.ha.921) 2, [Sung Kim](https://www.cse.ust.hk/~hunkim/) 2,4, and [Jaegul Choo](https://sites.google.com/site/jaegulchoo/) 1,2    
+1 Korea University, 2 Clova AI Research (NAVER Corp.), 3 The College of New Jersey, 4 HKUST
+IEEE Conference on Computer Vision and Pattern Recognition ([CVPR](http://cvpr2018.thecvf.com/)), 2018 (Oral) + +
+ +## Dependencies +* [Python 3.5+](https://www.continuum.io/downloads) +* [PyTorch 0.4.0+](http://pytorch.org/) +* [TensorFlow 1.3+](https://www.tensorflow.org/) (optional for tensorboard) + + +
+ +## Usage + +### 1. Cloning the repository +```bash +$ git clone https://github.com/yunjey/StarGAN.git +$ cd StarGAN/ +``` + +### 2. Downloading the dataset +To download the CelebA dataset: +```bash +$ bash download.sh celeba +``` + +To download the RaFD dataset, you must request access to the dataset from [the Radboud Faces Database website](http://www.socsci.ru.nl:8180/RaFD2/RaFD?p=main). Then, you need to create a folder structure as described [here](https://github.com/yunjey/StarGAN/blob/master/jpg/RaFD.md). + +### 3. Training +To train StarGAN on CelebA, run the training script below. See [here](https://github.com/yunjey/StarGAN/blob/master/jpg/CelebA.md) for a list of selectable attributes in the CelebA dataset. If you change the `selected_attrs` argument, you should also change the `c_dim` argument accordingly. + +```bash +$ python main.py --mode train --dataset CelebA --image_size 128 --c_dim 5 \ + --sample_dir stargan_celeba/samples --log_dir stargan_celeba/logs \ + --model_save_dir stargan_celeba/models --result_dir stargan_celeba/results \ + --selected_attrs Black_Hair Blond_Hair Brown_Hair Male Young +``` + +To train StarGAN on RaFD: + +```bash +$ python main.py --mode train --dataset RaFD --image_size 128 --c_dim 8 \ + --sample_dir stargan_rafd/samples --log_dir stargan_rafd/logs \ + --model_save_dir stargan_rafd/models --result_dir stargan_rafd/results +``` + +To train StarGAN on both CelebA and RafD: + +```bash +$ python main.py --mode=train --dataset Both --image_size 256 --c_dim 5 --c2_dim 8 \ + --sample_dir stargan_both/samples --log_dir stargan_both/logs \ + --model_save_dir stargan_both/models --result_dir stargan_both/results +``` + +To train StarGAN on your own dataset, create a folder structure in the same format as [RaFD](https://github.com/yunjey/StarGAN/blob/master/jpg/RaFD.md) and run the command: + +```bash +$ python main.py --mode train --dataset RaFD --rafd_crop_size CROP_SIZE --image_size IMG_SIZE \ + --c_dim LABEL_DIM --rafd_image_dir TRAIN_IMG_DIR \ + --sample_dir stargan_custom/samples --log_dir stargan_custom/logs \ + --model_save_dir stargan_custom/models --result_dir stargan_custom/results +``` + + +### 4. Testing + +To test StarGAN on CelebA: + +```bash +$ python main.py --mode test --dataset CelebA --image_size 128 --c_dim 5 \ +                 --sample_dir stargan_celeba/samples --log_dir stargan_celeba/logs \ + --model_save_dir stargan_celeba/models --result_dir stargan_celeba/results \ + --selected_attrs Black_Hair Blond_Hair Brown_Hair Male Young +``` + +To test StarGAN on RaFD: + +```bash +$ python main.py --mode test --dataset RaFD --image_size 128 \ + --c_dim 8 --rafd_image_dir data/RaFD/test \ +                 --sample_dir stargan_rafd/samples --log_dir stargan_rafd/logs \ + --model_save_dir stargan_rafd/models --result_dir stargan_rafd/results +``` + +To test StarGAN on both CelebA and RaFD: + +```bash +$ python main.py --mode test --dataset Both --image_size 256 --c_dim 5 --c2_dim 8 \ +                 --sample_dir stargan_both/samples --log_dir stargan_both/logs \ + --model_save_dir stargan_both/models --result_dir stargan_both/results +``` + +To test StarGAN on your own dataset: + +```bash +$ python main.py --mode test --dataset RaFD --rafd_crop_size CROP_SIZE --image_size IMG_SIZE \ + --c_dim LABEL_DIM --rafd_image_dir TEST_IMG_DIR \ + --sample_dir stargan_custom/samples --log_dir stargan_custom/logs \ + --model_save_dir stargan_custom/models --result_dir stargan_custom/results +``` +### 5. Pretrained model +To download a pretrained model checkpoint, run the script below. The pretrained model checkpoint will be downloaded and saved into `./stargan_celeba_256/models` directory. + +```bash +$ bash download.sh pretrained-celeba-256x256 +``` + +To translate images using the pretrained model, run the evaluation script below. The translated images will be saved into `./stargan_celeba_256/results` directory. + +```bash +$ python main.py --mode test --dataset CelebA --image_size 256 --c_dim 5 \ + --selected_attrs Black_Hair Blond_Hair Brown_Hair Male Young \ + --model_save_dir='stargan_celeba_256/models' \ + --result_dir='stargan_celeba_256/results' +``` + +
+ +## Results + +### 1. Facial Attribute Transfer on CelebA +

+ +### 2. Facial Expression Synthesis on RaFD +

+ +### 3. Facial Expression Synthesis on CelebA +

+ + +
+ +## Citation +If this work is useful for your research, please cite our [paper](https://arxiv.org/abs/1711.09020): +``` +@InProceedings{StarGAN2018, +author = {Choi, Yunjey and Choi, Minje and Kim, Munyoung and Ha, Jung-Woo and Kim, Sunghun and Choo, Jaegul}, +title = {StarGAN: Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation}, +booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, +month = {June}, +year = {2018} +} +``` + +
+ +## Acknowledgement +This work was mainly done while the first author did a research internship at [Clova AI Research, NAVER](https://clova.ai/en/research/research-area-detail.html?id=0). We thank all the researchers at NAVER, especially Donghyun Kwak, for insightful discussions. diff --git a/stargan/__pycache__/attacks.cpython-37.pyc b/stargan/__pycache__/attacks.cpython-37.pyc new file mode 100644 index 0000000..65ddb78 Binary files /dev/null and b/stargan/__pycache__/attacks.cpython-37.pyc differ diff --git a/stargan/__pycache__/data_loader.cpython-37.pyc b/stargan/__pycache__/data_loader.cpython-37.pyc new file mode 100644 index 0000000..e7b1766 Binary files /dev/null and b/stargan/__pycache__/data_loader.cpython-37.pyc differ diff --git a/stargan/__pycache__/logger.cpython-37.pyc b/stargan/__pycache__/logger.cpython-37.pyc new file mode 100644 index 0000000..9fb5d73 Binary files /dev/null and b/stargan/__pycache__/logger.cpython-37.pyc differ diff --git a/stargan/__pycache__/model.cpython-37.pyc b/stargan/__pycache__/model.cpython-37.pyc new file mode 100644 index 0000000..d0fddac Binary files /dev/null and b/stargan/__pycache__/model.cpython-37.pyc differ diff --git a/stargan/__pycache__/noise.cpython-37.pyc b/stargan/__pycache__/noise.cpython-37.pyc new file mode 100644 index 0000000..7a7d920 Binary files /dev/null and b/stargan/__pycache__/noise.cpython-37.pyc differ diff --git a/stargan/__pycache__/solver.cpython-37.pyc b/stargan/__pycache__/solver.cpython-37.pyc new file mode 100644 index 0000000..5047032 Binary files /dev/null and b/stargan/__pycache__/solver.cpython-37.pyc differ diff --git a/stargan/advertorch b/stargan/advertorch new file mode 160000 index 0000000..6fd4bf6 --- /dev/null +++ b/stargan/advertorch @@ -0,0 +1 @@ +Subproject commit 6fd4bf6d7cabd08b670e77d7bb9991165bbe0f68 diff --git a/stargan/attacks.py b/stargan/attacks.py new file mode 100644 index 0000000..c895c4e --- /dev/null +++ b/stargan/attacks.py @@ -0,0 +1,51 @@ +import copy +import numpy as np +from collections import Iterable +from scipy.stats import truncnorm + +import torch +import torch.nn as nn + +class LinfPGDAttack(object): + def __init__(self, model=None, device=None, epsilon=0.05, k=1, a=0.05): + self.model = model + self.epsilon = epsilon + self.k = k + self.a = a + self.loss_fn = nn.MSELoss().to(device) + self.device = device + + def perturb(self, X_nat, y, c_trg): + """ + Given examples (X_nat, y), returns adversarial + examples within epsilon of X_nat in l_infinity norm. + """ + X = X_nat.clone().detach_() + + for i in range(self.k): + # print(i) + X.requires_grad = True + output, _ = self.model(X, c_trg) + + self.model.zero_grad() + loss = self.loss_fn(output, y) + loss.backward() + grad = X.grad + + X_adv = X + self.a * grad.sign() + + eta = torch.clamp(X_adv - X_nat, min=-self.epsilon, max=self.epsilon) + X = torch.clamp(X_nat + eta, min=-1, max=1).detach_() + + self.model.zero_grad() + + return X, (X_nat) - X # the eta here might be wrong! + +def clip_tensor(X, Y, Z): + # Clip X with Y min and Z max + X_np = X.data.cpu().numpy() + Y_np = Y.data.cpu().numpy() + Z_np = Z.data.cpu().numpy() + X_clipped = np.clip(X_np, Y_np, Z_np) + X_res = torch.FloatTensor(X_clipped) + return X_res \ No newline at end of file diff --git a/stargan/data b/stargan/data new file mode 120000 index 0000000..7d173b0 --- /dev/null +++ b/stargan/data @@ -0,0 +1 @@ +/scratch2/fsynth/stargan/data \ No newline at end of file diff --git a/stargan/data_loader.py b/stargan/data_loader.py new file mode 100644 index 0000000..284546f --- /dev/null +++ b/stargan/data_loader.py @@ -0,0 +1,102 @@ +from torch.utils import data +from torchvision import transforms as T +from torchvision.datasets import ImageFolder +from PIL import Image +import torch +import os +import random +import noise +import cv2 + +class CelebA(data.Dataset): + """Dataset class for the CelebA dataset.""" + + def __init__(self, image_dir, attr_path, selected_attrs, transform, mode): + """Initialize and preprocess the CelebA dataset.""" + self.image_dir = image_dir + self.attr_path = attr_path + self.selected_attrs = selected_attrs + self.transform = transform + self.mode = mode + self.train_dataset = [] + self.test_dataset = [] + self.attr2idx = {} + self.idx2attr = {} + self.preprocess() + + if mode == 'train': + self.num_images = len(self.train_dataset) + else: + self.num_images = len(self.test_dataset) + + def preprocess(self): + """Preprocess the CelebA attribute file.""" + lines = [line.rstrip() for line in open(self.attr_path, 'r')] + all_attr_names = lines[1].split() + for i, attr_name in enumerate(all_attr_names): + self.attr2idx[attr_name] = i + self.idx2attr[i] = attr_name + + lines = lines[2:] + random.seed(1234) + random.shuffle(lines) + for i, line in enumerate(lines): + split = line.split() + filename = split[0] + values = split[1:] + + label = [] + for attr_name in self.selected_attrs: + idx = self.attr2idx[attr_name] + label.append(values[idx] == '1') + + if (i+1) < 2000: + self.test_dataset.append([filename, label]) + else: + self.train_dataset.append([filename, label]) + + print('Finished preprocessing the CelebA dataset...') + + def __getitem__(self, index): + """Return one image and its corresponding attribute label.""" + dataset = self.train_dataset if self.mode == 'train' else self.test_dataset + filename, label = dataset[index] + image = Image.open(os.path.join(self.image_dir, filename)) + # image = noise.noisy('s&p', image) + return self.transform(image), torch.FloatTensor(label) + + # def __getitem__(self, index): + # """Return one image and its corresponding attribute label.""" + # dataset = self.train_dataset if self.mode == 'train' else self.test_dataset + # filename, label = dataset[index] + # image = Image.open(os.path.join(self.image_dir, filename)) + # return self.transform(image), torch.FloatTensor(label) + + def __len__(self): + """Return the number of images.""" + return self.num_images + + + +def get_loader(image_dir, attr_path, selected_attrs, crop_size=178, image_size=128, + batch_size=16, dataset='CelebA', mode='train', num_workers=1): + """Build and return a data loader.""" + transform = [] + if mode == 'train': + transform.append(T.RandomHorizontalFlip()) + transform.append(T.CenterCrop(crop_size)) + transform.append(T.Resize(image_size)) + transform.append(T.ToTensor()) + transform.append(T.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5))) + transform = T.Compose(transform) + + if dataset == 'CelebA': + dataset = CelebA(image_dir, attr_path, selected_attrs, transform, mode) + elif dataset == 'RaFD': + dataset = ImageFolder(image_dir, transform) + + data_loader = data.DataLoader(dataset=dataset, + batch_size=batch_size, + shuffle=(mode=='train'), + num_workers=num_workers) + return data_loader \ No newline at end of file diff --git a/stargan/defenses/__init__.py b/stargan/defenses/__init__.py new file mode 100644 index 0000000..86396af --- /dev/null +++ b/stargan/defenses/__init__.py @@ -0,0 +1,15 @@ +# Copyright (c) 2018-present, Royal Bank of Canada. +# All rights reserved. +# +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. +# + +# flake8: noqa + +from .base import Processor + +from .smoothing import ConvSmoothing2D +from .smoothing import AverageSmoothing2D +from .smoothing import GaussianSmoothing2D +from .smoothing import MedianSmoothing2D \ No newline at end of file diff --git a/stargan/defenses/__pycache__/__init__.cpython-37.pyc b/stargan/defenses/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..c41c5aa Binary files /dev/null and b/stargan/defenses/__pycache__/__init__.cpython-37.pyc differ diff --git a/stargan/defenses/__pycache__/base.cpython-37.pyc b/stargan/defenses/__pycache__/base.cpython-37.pyc new file mode 100644 index 0000000..317726f Binary files /dev/null and b/stargan/defenses/__pycache__/base.cpython-37.pyc differ diff --git a/stargan/defenses/__pycache__/jpeg.cpython-37.pyc b/stargan/defenses/__pycache__/jpeg.cpython-37.pyc new file mode 100644 index 0000000..8405047 Binary files /dev/null and b/stargan/defenses/__pycache__/jpeg.cpython-37.pyc differ diff --git a/stargan/defenses/__pycache__/smoothing.cpython-37.pyc b/stargan/defenses/__pycache__/smoothing.cpython-37.pyc new file mode 100644 index 0000000..f0769db Binary files /dev/null and b/stargan/defenses/__pycache__/smoothing.cpython-37.pyc differ diff --git a/stargan/defenses/base.py b/stargan/defenses/base.py new file mode 100644 index 0000000..064e5a4 --- /dev/null +++ b/stargan/defenses/base.py @@ -0,0 +1,21 @@ +# Copyright (c) 2018-present, Royal Bank of Canada. +# All rights reserved. +# +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. +# +import torch.nn as nn + + +class Processor(nn.Module): + """ + Processor + """ + def __init__(self): + super(Processor, self).__init__() + + def forward(self, x): + return x + + def extra_repr(self): + return 'EmptyDefense (Identity)' diff --git a/stargan/defenses/smoothing.py b/stargan/defenses/smoothing.py new file mode 100644 index 0000000..7e5b29b --- /dev/null +++ b/stargan/defenses/smoothing.py @@ -0,0 +1,142 @@ +# Copyright (c) 2018-present, Royal Bank of Canada. +# All rights reserved. +# +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. +# + +import math + +import torch +import torch.nn as nn +import torch.nn.functional as F +from torch.nn.modules.utils import _quadruple + +from .base import Processor + + +class MedianSmoothing2D(Processor): + """ + Median Smoothing 2D. + + :param kernel_size: aperture linear size; must be odd and greater than 1. + :param stride: stride of the convolution. + """ + + def __init__(self, kernel_size=3, stride=1): + super(MedianSmoothing2D, self).__init__() + self.kernel_size = kernel_size + self.stride = stride + padding = int(kernel_size) // 2 + if _is_even(kernel_size): + # both ways of padding should be fine here + # self.padding = (padding, 0, padding, 0) + self.padding = (0, padding, 0, padding) + else: + self.padding = _quadruple(padding) + + + def forward(self, x): + x = F.pad(x, pad=self.padding, mode="reflect") + x = x.unfold(2, self.kernel_size, self.stride) + x = x.unfold(3, self.kernel_size, self.stride) + x = x.contiguous().view(x.shape[:4] + (-1, )).median(dim=-1)[0] + return x + + +class ConvSmoothing2D(Processor): + """ + Conv Smoothing 2D. + + :param kernel_size: size of the convolving kernel. + """ + + def __init__(self, kernel): + super(ConvSmoothing2D, self).__init__() + self.filter = _generate_conv2d_from_smoothing_kernel(kernel) + + def forward(self, x): + return self.filter(x) + + +class GaussianSmoothing2D(ConvSmoothing2D): + """ + Gaussian Smoothing 2D. + + :param sigma: sigma of the Gaussian. + :param channels: number of channels in the output. + :param kernel_size: aperture size. + """ + + def __init__(self, sigma, channels, kernel_size=None): + kernel = _generate_gaussian_kernel(sigma, channels, kernel_size) + super(GaussianSmoothing2D, self).__init__(kernel) + + +class AverageSmoothing2D(ConvSmoothing2D): + """ + Average Smoothing 2D. + + :param channels: number of channels in the output. + :param kernel_size: aperture size. + """ + + def __init__(self, channels, kernel_size): + kernel = torch.ones((channels, 1, kernel_size, kernel_size)) / ( + kernel_size * kernel_size) + super(AverageSmoothing2D, self).__init__(kernel) + + +def _generate_conv2d_from_smoothing_kernel(kernel): + channels = kernel.shape[0] + kernel_size = kernel.shape[-1] + + if _is_even(kernel_size): + raise NotImplementedError( + "Even number kernel size not supported yet, kernel_size={}".format( + kernel_size)) + + filter_ = nn.Conv2d( + in_channels=channels, out_channels=channels, kernel_size=kernel_size, + groups=channels, padding=kernel_size // 2, bias=False) + + filter_.weight.data = kernel + filter_.weight.requires_grad = False + return filter_ + + +def _generate_gaussian_kernel(sigma, channels, kernel_size=None): + + if kernel_size is None: + kernel_size = _round_to_odd(2 * 2 * sigma) + + vecx = torch.arange(kernel_size).float() + vecy = torch.arange(kernel_size).float() + gridxy = _meshgrid(vecx, vecy) + mean = (kernel_size - 1) / 2. + var = sigma ** 2 + + gaussian_kernel = ( + 1. / (2. * math.pi * var) * + torch.exp(-(gridxy - mean).pow(2).sum(dim=0) / (2 * var)) + ) + + gaussian_kernel /= torch.sum(gaussian_kernel) + + gaussian_kernel = gaussian_kernel.repeat(channels, 1, 1, 1) + + return gaussian_kernel + + +def _round_to_odd(f): + return math.ceil(f) // 2 * 2 + 1 + + +def _meshgrid(vecx, vecy): + gridx = vecx.repeat(len(vecy), 1) + gridy = vecy.repeat(len(vecx), 1).t() + return torch.stack([gridx, gridy]) + + +def _is_even(x): + return int(x) % 2 == 0 diff --git a/stargan/download.sh b/stargan/download.sh new file mode 100644 index 0000000..7c45534 --- /dev/null +++ b/stargan/download.sh @@ -0,0 +1,37 @@ +FILE=$1 + +if [ $FILE == "celeba" ]; then + + # CelebA images and attribute labels + URL=https://www.dropbox.com/s/d1kjpkqklf0uw77/celeba.zip?dl=0 + ZIP_FILE=./data/celeba.zip + mkdir -p ./data/ + wget -N $URL -O $ZIP_FILE + unzip $ZIP_FILE -d ./data/ + rm $ZIP_FILE + + +elif [ $FILE == 'pretrained-celeba-128x128' ]; then + + # StarGAN trained on CelebA (Black_Hair, Blond_Hair, Brown_Hair, Male, Young), 128x128 resolution + URL=https://www.dropbox.com/s/7e966qq0nlxwte4/celeba-128x128-5attrs.zip?dl=0 + ZIP_FILE=./stargan_celeba_128/models/celeba-128x128-5attrs.zip + mkdir -p ./stargan_celeba_128/models/ + wget -N $URL -O $ZIP_FILE + unzip $ZIP_FILE -d ./stargan_celeba_128/models/ + rm $ZIP_FILE + +elif [ $FILE == 'pretrained-celeba-256x256' ]; then + + # StarGAN trained on CelebA (Black_Hair, Blond_Hair, Brown_Hair, Male, Young), 256x256 resolution + URL=https://www.dropbox.com/s/zdq6roqf63m0v5f/celeba-256x256-5attrs.zip?dl=0 + ZIP_FILE=./stargan_celeba_256/models/celeba-256x256-5attrs.zip + mkdir -p ./stargan_celeba_256/models/ + wget -N $URL -O $ZIP_FILE + unzip $ZIP_FILE -d ./stargan_celeba_256/models/ + rm $ZIP_FILE + +else + echo "Available arguments are celeba, pretrained-celeba-128x128, pretrained-celeba-256x256." + exit 1 +fi \ No newline at end of file diff --git a/stargan/jpg/CelebA.md b/stargan/jpg/CelebA.md new file mode 100644 index 0000000..50a777d --- /dev/null +++ b/stargan/jpg/CelebA.md @@ -0,0 +1,10 @@ +## CelebA Attribute list + +```bash +'5_o_Clock_Shadow', 'Arched_Eyebrows', 'Attractive', 'Bags_Under_Eyes', 'Bald', 'Bangs', 'Big_Lips', +'Big_Nose', 'Black_Hair', 'Blond_Hair', 'Blurry', 'Brown_Hair', 'Bushy_Eyebrows', 'Chubby', +'Double_Chin', 'Eyeglasses', 'Goatee', 'Gray_Hair', 'Heavy_Makeup', 'High_Cheekbones', 'Male', +'Mouth_Slightly_Open', 'Mustache', 'Narrow_Eyes', 'No_Beard', 'Oval_Face', 'Pale_Skin', 'Pointy_Nose', +'Receding_Hairline', 'Rosy_Cheeks', 'Sideburns', 'Smiling', 'Straight_Hair', 'Wavy_Hair', +'Wearing_Earrings', 'Wearing_Hat', 'Wearing_Lipstick', 'Wearing_Necklace', 'Wearing_Necktie', 'Young' +``` diff --git a/stargan/jpg/RaFD.md b/stargan/jpg/RaFD.md new file mode 100644 index 0000000..0d5e1bc --- /dev/null +++ b/stargan/jpg/RaFD.md @@ -0,0 +1,32 @@ +## RaFD Dataset Guideline + +#### 1. Split images into training and test sets (e.g., 90\%/10\% for training and test, respectively). +#### 2. Crop all images to 256 x 256, where the faces are centered. +#### 3. Save images in the format shown below: + + + data + └── RaFD + ├── train + | ├── angry + | | ├── aaa.jpg (name doesn't matter) + | | ├── bbb.jpg + | | └── ... + | ├── happy + | | ├── ccc.jpg + | | ├── ddd.jpg + | | └── ... + | ... + | + └── test + ├── angry + | ├── eee.jpg + | ├── fff.jpg + | └── ... + ├── happy + | ├── ggg.jpg + | ├── iii.jpg + | └── ... + ... + + diff --git a/stargan/jpg/logo.jpg b/stargan/jpg/logo.jpg new file mode 100644 index 0000000..aea0db6 Binary files /dev/null and b/stargan/jpg/logo.jpg differ diff --git a/stargan/jpg/main.jpg b/stargan/jpg/main.jpg new file mode 100644 index 0000000..856e0d5 Binary files /dev/null and b/stargan/jpg/main.jpg differ diff --git a/stargan/jpg/model.jpg b/stargan/jpg/model.jpg new file mode 100644 index 0000000..4ad47d9 Binary files /dev/null and b/stargan/jpg/model.jpg differ diff --git a/stargan/jpg/model2.jpg b/stargan/jpg/model2.jpg new file mode 100644 index 0000000..0cdedb6 Binary files /dev/null and b/stargan/jpg/model2.jpg differ diff --git a/stargan/jpg/result_celeba1.jpg b/stargan/jpg/result_celeba1.jpg new file mode 100644 index 0000000..77d50bc Binary files /dev/null and b/stargan/jpg/result_celeba1.jpg differ diff --git a/stargan/jpg/result_celeba2.jpg b/stargan/jpg/result_celeba2.jpg new file mode 100644 index 0000000..55ea395 Binary files /dev/null and b/stargan/jpg/result_celeba2.jpg differ diff --git a/stargan/jpg/result_rafd.jpg b/stargan/jpg/result_rafd.jpg new file mode 100644 index 0000000..af61deb Binary files /dev/null and b/stargan/jpg/result_rafd.jpg differ diff --git a/stargan/logger.py b/stargan/logger.py new file mode 100644 index 0000000..f30431e --- /dev/null +++ b/stargan/logger.py @@ -0,0 +1,14 @@ +import tensorflow as tf + + +class Logger(object): + """Tensorboard logger.""" + + def __init__(self, log_dir): + """Initialize summary writer.""" + self.writer = tf.summary.FileWriter(log_dir) + + def scalar_summary(self, tag, value, step): + """Add scalar summary.""" + summary = tf.Summary(value=[tf.Summary.Value(tag=tag, simple_value=value)]) + self.writer.add_summary(summary, step) \ No newline at end of file diff --git a/stargan/main.py b/stargan/main.py new file mode 100644 index 0000000..597215c --- /dev/null +++ b/stargan/main.py @@ -0,0 +1,111 @@ +import os +import argparse +from solver import Solver +from data_loader import get_loader +from torch.backends import cudnn + + +def str2bool(v): + return v.lower() in ('true') + +def main(config): + # For fast training. + cudnn.benchmark = True + + # Create directories if not exist. + if not os.path.exists(config.log_dir): + os.makedirs(config.log_dir) + if not os.path.exists(config.model_save_dir): + os.makedirs(config.model_save_dir) + if not os.path.exists(config.sample_dir): + os.makedirs(config.sample_dir) + if not os.path.exists(config.result_dir): + os.makedirs(config.result_dir) + + # Data loader. + celeba_loader = None + rafd_loader = None + + if config.dataset in ['CelebA', 'Both']: + celeba_loader = get_loader(config.celeba_image_dir, config.attr_path, config.selected_attrs, + config.celeba_crop_size, config.image_size, config.batch_size, + 'CelebA', config.mode, config.num_workers) + if config.dataset in ['RaFD', 'Both']: + rafd_loader = get_loader(config.rafd_image_dir, None, None, + config.rafd_crop_size, config.image_size, config.batch_size, + 'RaFD', config.mode, config.num_workers) + + + # Solver for training and testing StarGAN. + solver = Solver(celeba_loader, rafd_loader, config) + + if config.mode == 'train': + if config.dataset in ['CelebA', 'RaFD']: + solver.train() + elif config.dataset in ['Both']: + solver.train_multi() + elif config.mode == 'test': + if config.dataset in ['CelebA', 'RaFD']: + # solver.test() + solver.test_attack() + elif config.dataset in ['Both']: + solver.test_multi() + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + + # Model configuration. + parser.add_argument('--c_dim', type=int, default=5, help='dimension of domain labels (1st dataset)') + parser.add_argument('--c2_dim', type=int, default=8, help='dimension of domain labels (2nd dataset)') + parser.add_argument('--celeba_crop_size', type=int, default=178, help='crop size for the CelebA dataset') + parser.add_argument('--rafd_crop_size', type=int, default=256, help='crop size for the RaFD dataset') + parser.add_argument('--image_size', type=int, default=128, help='image resolution') + parser.add_argument('--g_conv_dim', type=int, default=64, help='number of conv filters in the first layer of G') + parser.add_argument('--d_conv_dim', type=int, default=64, help='number of conv filters in the first layer of D') + parser.add_argument('--g_repeat_num', type=int, default=6, help='number of residual blocks in G') + parser.add_argument('--d_repeat_num', type=int, default=6, help='number of strided conv layers in D') + parser.add_argument('--lambda_cls', type=float, default=1, help='weight for domain classification loss') + parser.add_argument('--lambda_rec', type=float, default=10, help='weight for reconstruction loss') + parser.add_argument('--lambda_gp', type=float, default=10, help='weight for gradient penalty') + + # Training configuration. + parser.add_argument('--dataset', type=str, default='CelebA', choices=['CelebA', 'RaFD', 'Both']) + parser.add_argument('--batch_size', type=int, default=1, help='mini-batch size') + parser.add_argument('--num_iters', type=int, default=200000, help='number of total iterations for training D') + parser.add_argument('--num_iters_decay', type=int, default=100000, help='number of iterations for decaying lr') + parser.add_argument('--g_lr', type=float, default=0.0001, help='learning rate for G') + parser.add_argument('--d_lr', type=float, default=0.0001, help='learning rate for D') + parser.add_argument('--n_critic', type=int, default=5, help='number of D updates per each G update') + parser.add_argument('--beta1', type=float, default=0.5, help='beta1 for Adam optimizer') + parser.add_argument('--beta2', type=float, default=0.999, help='beta2 for Adam optimizer') + parser.add_argument('--resume_iters', type=int, default=None, help='resume training from this step') + parser.add_argument('--selected_attrs', '--list', nargs='+', help='selected attributes for the CelebA dataset', + default=['Black_Hair', 'Blond_Hair', 'Brown_Hair', 'Male', 'Young']) + + # Test configuration. + parser.add_argument('--test_iters', type=int, default=200000, help='test model from this step') + + # Miscellaneous. + parser.add_argument('--num_workers', type=int, default=1) + parser.add_argument('--mode', type=str, default='train', choices=['train', 'test']) + parser.add_argument('--use_tensorboard', type=str2bool, default=False) + + # Directories. + parser.add_argument('--celeba_image_dir', type=str, default='data/celeba/images') + parser.add_argument('--attr_path', type=str, default='data/celeba/list_attr_celeba.txt') + parser.add_argument('--rafd_image_dir', type=str, default='data/RaFD/train') + parser.add_argument('--log_dir', type=str, default='stargan/logs') + parser.add_argument('--model_save_dir', type=str, default='stargan/models') + parser.add_argument('--sample_dir', type=str, default='stargan/samples') + parser.add_argument('--result_dir', type=str, default='stargan/results') + + # Step size. + parser.add_argument('--log_step', type=int, default=10) + parser.add_argument('--sample_step', type=int, default=1000) + parser.add_argument('--model_save_step', type=int, default=10000) + parser.add_argument('--lr_update_step', type=int, default=1000) + + config = parser.parse_args() + print(config) + main(config) \ No newline at end of file diff --git a/stargan/model.py b/stargan/model.py new file mode 100644 index 0000000..f1f90d1 --- /dev/null +++ b/stargan/model.py @@ -0,0 +1,146 @@ +import torch +import torch.nn as nn +import torch.nn.functional as F +import numpy as np +import sys + +import defenses.smoothing as smoothing + +class ResidualBlock(nn.Module): + """Residual Block with instance normalization.""" + def __init__(self, dim_in, dim_out): + super(ResidualBlock, self).__init__() + self.main = nn.Sequential( + nn.Conv2d(dim_in, dim_out, kernel_size=3, stride=1, padding=1, bias=False), + nn.InstanceNorm2d(dim_out, affine=True, track_running_stats=True), + nn.ReLU(inplace=True), + nn.Conv2d(dim_out, dim_out, kernel_size=3, stride=1, padding=1, bias=False), + nn.InstanceNorm2d(dim_out, affine=True, track_running_stats=True)) + + def forward(self, x): + return x + self.main(x) + + +class Generator(nn.Module): + """Generator network.""" + def __init__(self, conv_dim=64, c_dim=5, repeat_num=6): + super(Generator, self).__init__() + + layers = [] + layers.append(nn.Conv2d(3+c_dim, conv_dim, kernel_size=7, stride=1, padding=3, bias=False)) + layers.append(nn.InstanceNorm2d(conv_dim, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + + # Down-sampling layers. + curr_dim = conv_dim + for i in range(2): + layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1, bias=False)) + layers.append(nn.InstanceNorm2d(curr_dim*2, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + curr_dim = curr_dim * 2 + + # Bottleneck layers. + for i in range(repeat_num): + layers.append(ResidualBlock(dim_in=curr_dim, dim_out=curr_dim)) + + # Up-sampling layers. + for i in range(2): + layers.append(nn.ConvTranspose2d(curr_dim, curr_dim//2, kernel_size=4, stride=2, padding=1, bias=False)) + layers.append(nn.InstanceNorm2d(curr_dim//2, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + curr_dim = curr_dim // 2 + + layers.append(nn.Conv2d(curr_dim, 3, kernel_size=7, stride=1, padding=3, bias=False)) + layers.append(nn.Tanh()) + self.main = nn.Sequential(*layers) + + def forward(self, x, c): + # Replicate spatially and concatenate domain information. + # Note that this type of label conditioning does not work at all if we use reflection padding in Conv2d. + # This is because instance normalization ignores the shifting (or bias) effect. + c = c.view(c.size(0), c.size(1), 1, 1) + c = c.repeat(1, 1, x.size(2), x.size(3)) + x = torch.cat([x, c], dim=1) + return self.main(x) + + +class Discriminator(nn.Module): + """Discriminator network with PatchGAN.""" + def __init__(self, image_size=128, conv_dim=64, c_dim=5, repeat_num=6): + super(Discriminator, self).__init__() + layers = [] + layers.append(nn.Conv2d(3, conv_dim, kernel_size=4, stride=2, padding=1)) + layers.append(nn.LeakyReLU(0.01)) + + curr_dim = conv_dim + for i in range(1, repeat_num): + layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1)) + layers.append(nn.LeakyReLU(0.01)) + curr_dim = curr_dim * 2 + + kernel_size = int(image_size / np.power(2, repeat_num)) + self.main = nn.Sequential(*layers) + self.conv1 = nn.Conv2d(curr_dim, 1, kernel_size=3, stride=1, padding=1, bias=False) + self.conv2 = nn.Conv2d(curr_dim, c_dim, kernel_size=kernel_size, bias=False) + + def forward(self, x): + h = self.main(x) + out_src = self.conv1(h) + out_cls = self.conv2(h) + return out_src, out_cls.view(out_cls.size(0), out_cls.size(1)) + +class AvgBlurGenerator(nn.Module): + """Generator network.""" + def __init__(self, conv_dim=64, c_dim=5, repeat_num=6): + super(AvgBlurGenerator, self).__init__() + + layers = [] + layers.append(nn.Conv2d(3+c_dim, conv_dim, kernel_size=7, stride=1, padding=3, bias=False)) + layers.append(nn.InstanceNorm2d(conv_dim, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + + # Down-sampling layers. + curr_dim = conv_dim + for i in range(2): + layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1, bias=False)) + layers.append(nn.InstanceNorm2d(curr_dim*2, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + curr_dim = curr_dim * 2 + + # Bottleneck layers. + for i in range(repeat_num): + layers.append(ResidualBlock(dim_in=curr_dim, dim_out=curr_dim)) + + # Up-sampling layers. + for i in range(2): + layers.append(nn.ConvTranspose2d(curr_dim, curr_dim//2, kernel_size=4, stride=2, padding=1, bias=False)) + layers.append(nn.InstanceNorm2d(curr_dim//2, affine=True, track_running_stats=True)) + layers.append(nn.ReLU(inplace=True)) + curr_dim = curr_dim // 2 + + layers.append(nn.Conv2d(curr_dim, 3, kernel_size=7, stride=1, padding=3, bias=False)) + layers.append(nn.Tanh()) + self.main = nn.Sequential(*layers) + + layers_preproc = [] + # layers_preproc.append(nn.ReflectionPad2d(2)) + layers_preproc.append(smoothing.AverageSmoothing2D(channels=3+c_dim, kernel_size=5)) + self.preprocessing = nn.Sequential(*layers_preproc) + + def forward(self, x, c): + # Replicate spatially and concatenate domain information. + # Note that this type of label conditioning does not work at all if we use reflection padding in Conv2d. + # This is because instance normalization ignores the shifting (or bias) effect. + c = c.view(c.size(0), c.size(1), 1, 1) + c = c.repeat(1, 1, x.size(2), x.size(3)) + x = torch.cat([x, c], dim=1) + + # print(x.shape) + x = self.preprocessing(x) + # print(x.shape) + return self.main(x), x[:,:3] + + +def avg_smoothing_filter(channels, kernel_size): + kernel = torch.ones((channels, 1, kernel_size, kernel_size)) / (kernel_size * kernel_size) + return kernel \ No newline at end of file diff --git a/stargan/noise.py b/stargan/noise.py new file mode 100644 index 0000000..629a649 --- /dev/null +++ b/stargan/noise.py @@ -0,0 +1,54 @@ +import numpy as np +import os +import cv2 +from PIL import Image + +def PIL_to_cv2(image): + image = np.array(image) + image = image[:,:,::-1].copy() + return image + +def cv2_to_PIL(image): + image = image[:,:,::-1].copy().astype(np.uint8) + image = Image.fromarray(image) + return image + +def noisy(noise_typ, image): + image = PIL_to_cv2(image) + if noise_typ == "gauss": + row,col,ch= image.shape + mean = 0 + var = 0.2 + sigma = var**0.5 + gauss = np.random.normal(mean,sigma,(row,col,ch)) + gauss = gauss.reshape(row,col,ch) + noisy = image + gauss + return cv2_to_PIL(noisy) + elif noise_typ == "s&p": + row,col,ch = image.shape + s_vs_p = 0.5 + amount = 0.004 + out = np.copy(image) + # Salt mode + num_salt = np.ceil(amount * image.size * s_vs_p) + coords = [np.random.randint(0, i - 1, int(num_salt)) + for i in image.shape] + out[coords] = 1 + + # Pepper mode + num_pepper = np.ceil(amount* image.size * (1. - s_vs_p)) + coords = [np.random.randint(0, i - 1, int(num_pepper)) + for i in image.shape] + out[coords] = 0 + return cv2_to_PIL(out) + elif noise_typ == "poisson": + vals = len(np.unique(image)) + vals = 2 ** np.ceil(np.log2(vals)) + noisy = np.random.poisson(image * vals) / float(vals) + return cv2_to_PIL(noisy) + elif noise_typ =="speckle": + row,col,ch = image.shape + gauss = np.random.randn(row,col,ch) + gauss = gauss.reshape(row,col,ch) + noisy = image + image * gauss + return cv2_to_PIL(noisy) \ No newline at end of file diff --git a/stargan/solver.py b/stargan/solver.py new file mode 100644 index 0000000..f8efb29 --- /dev/null +++ b/stargan/solver.py @@ -0,0 +1,680 @@ +from model import Generator, AvgBlurGenerator +from model import Discriminator +from torch.autograd import Variable +from torchvision.utils import save_image +import torch +import torch.nn.functional as F +import numpy as np +import os +import time +import datetime +import attacks + +from PIL import ImageFilter +from PIL import Image +from torchvision import transforms + + +class Solver(object): + """Solver for training and testing StarGAN.""" + + def __init__(self, celeba_loader, rafd_loader, config): + """Initialize configurations.""" + + # Data loader. + self.celeba_loader = celeba_loader + self.rafd_loader = rafd_loader + + # Model configurations. + self.c_dim = config.c_dim + self.c2_dim = config.c2_dim + self.image_size = config.image_size + self.g_conv_dim = config.g_conv_dim + self.d_conv_dim = config.d_conv_dim + self.g_repeat_num = config.g_repeat_num + self.d_repeat_num = config.d_repeat_num + self.lambda_cls = config.lambda_cls + self.lambda_rec = config.lambda_rec + self.lambda_gp = config.lambda_gp + + # Training configurations. + self.dataset = config.dataset + self.batch_size = config.batch_size + self.num_iters = config.num_iters + self.num_iters_decay = config.num_iters_decay + self.g_lr = config.g_lr + self.d_lr = config.d_lr + self.n_critic = config.n_critic + self.beta1 = config.beta1 + self.beta2 = config.beta2 + self.resume_iters = config.resume_iters + self.selected_attrs = config.selected_attrs + + # Test configurations. + self.test_iters = config.test_iters + + # Miscellaneous. + self.use_tensorboard = config.use_tensorboard + self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') + + # Directories. + self.log_dir = config.log_dir + self.sample_dir = config.sample_dir + self.model_save_dir = config.model_save_dir + self.result_dir = config.result_dir + + # Step size. + self.log_step = config.log_step + self.sample_step = config.sample_step + self.model_save_step = config.model_save_step + self.lr_update_step = config.lr_update_step + + # Build the model and tensorboard. + self.build_model() + if self.use_tensorboard: + self.build_tensorboard() + + def build_model(self): + """Create a generator and a discriminator.""" + if self.dataset in ['CelebA', 'RaFD']: + # self.G = Generator(self.g_conv_dim, self.c_dim, self.g_repeat_num) + self.G = AvgBlurGenerator(self.g_conv_dim, self.c_dim, self.g_repeat_num) + self.D = Discriminator(self.image_size, self.d_conv_dim, self.c_dim, self.d_repeat_num) + elif self.dataset in ['Both']: + self.G = Generator(self.g_conv_dim, self.c_dim+self.c2_dim+2, self.g_repeat_num) # 2 for mask vector. + self.D = Discriminator(self.image_size, self.d_conv_dim, self.c_dim+self.c2_dim, self.d_repeat_num) + + self.g_optimizer = torch.optim.Adam(self.G.parameters(), self.g_lr, [self.beta1, self.beta2]) + self.d_optimizer = torch.optim.Adam(self.D.parameters(), self.d_lr, [self.beta1, self.beta2]) + self.print_network(self.G, 'G') + self.print_network(self.D, 'D') + + self.G.to(self.device) + self.D.to(self.device) + + def print_network(self, model, name): + """Print out the network information.""" + num_params = 0 + for p in model.parameters(): + num_params += p.numel() + print(model) + print(name) + print("The number of parameters: {}".format(num_params)) + + def restore_model(self, resume_iters): + """Restore the trained generator and discriminator.""" + print('Loading the trained models from step {}...'.format(resume_iters)) + G_path = os.path.join(self.model_save_dir, '{}-G.ckpt'.format(resume_iters)) + D_path = os.path.join(self.model_save_dir, '{}-D.ckpt'.format(resume_iters)) + + # self.G.load_state_dict(torch.load(G_path, map_location=lambda storage, loc: storage)) + self.load_model_weights(self.G, G_path) + self.D.load_state_dict(torch.load(D_path, map_location=lambda storage, loc: storage)) + + def load_model_weights(self, model, path): + pretrained_dict = torch.load(path, map_location=lambda storage, loc: storage) + model_dict = model.state_dict() + + # 1. filter out unnecessary keys + pretrained_dict = {k: v for k, v in pretrained_dict.items() if 'preprocessing' not in k} + # 2. overwrite entries in the existing state dict + model_dict.update(pretrained_dict) + # 3. load the new state dict + model.load_state_dict(pretrained_dict, strict=False) + + def build_tensorboard(self): + """Build a tensorboard logger.""" + from logger import Logger + self.logger = Logger(self.log_dir) + + def update_lr(self, g_lr, d_lr): + """Decay learning rates of the generator and discriminator.""" + for param_group in self.g_optimizer.param_groups: + param_group['lr'] = g_lr + for param_group in self.d_optimizer.param_groups: + param_group['lr'] = d_lr + + def reset_grad(self): + """Reset the gradient buffers.""" + self.g_optimizer.zero_grad() + self.d_optimizer.zero_grad() + + def denorm(self, x): + """Convert the range from [-1, 1] to [0, 1].""" + out = (x + 1) / 2 + return out.clamp_(0, 1) + + def gradient_penalty(self, y, x): + """Compute gradient penalty: (L2_norm(dy/dx) - 1)**2.""" + weight = torch.ones(y.size()).to(self.device) + dydx = torch.autograd.grad(outputs=y, + inputs=x, + grad_outputs=weight, + retain_graph=True, + create_graph=True, + only_inputs=True)[0] + + dydx = dydx.view(dydx.size(0), -1) + dydx_l2norm = torch.sqrt(torch.sum(dydx**2, dim=1)) + return torch.mean((dydx_l2norm-1)**2) + + def label2onehot(self, labels, dim): + """Convert label indices to one-hot vectors.""" + batch_size = labels.size(0) + out = torch.zeros(batch_size, dim) + out[np.arange(batch_size), labels.long()] = 1 + return out + + def create_labels(self, c_org, c_dim=5, dataset='CelebA', selected_attrs=None): + """Generate target domain labels for debugging and testing.""" + # Get hair color indices. + if dataset == 'CelebA': + hair_color_indices = [] + for i, attr_name in enumerate(selected_attrs): + if attr_name in ['Black_Hair', 'Blond_Hair', 'Brown_Hair', 'Gray_Hair']: + hair_color_indices.append(i) + + c_trg_list = [] + for i in range(c_dim): + if dataset == 'CelebA': + c_trg = c_org.clone() + if i in hair_color_indices: # Set one hair color to 1 and the rest to 0. + c_trg[:, i] = 1 + for j in hair_color_indices: + if j != i: + c_trg[:, j] = 0 + else: + c_trg[:, i] = (c_trg[:, i] == 0) # Reverse attribute value. + elif dataset == 'RaFD': + c_trg = self.label2onehot(torch.ones(c_org.size(0))*i, c_dim) + + c_trg_list.append(c_trg.to(self.device)) + return c_trg_list + + def classification_loss(self, logit, target, dataset='CelebA'): + """Compute binary or softmax cross entropy loss.""" + if dataset == 'CelebA': + return F.binary_cross_entropy_with_logits(logit, target, size_average=False) / logit.size(0) + elif dataset == 'RaFD': + return F.cross_entropy(logit, target) + + def train(self): + """Train StarGAN within a single dataset.""" + # Set data loader. + if self.dataset == 'CelebA': + data_loader = self.celeba_loader + elif self.dataset == 'RaFD': + data_loader = self.rafd_loader + + # Fetch fixed inputs for debugging. + data_iter = iter(data_loader) + x_fixed, c_org = next(data_iter) + x_fixed = x_fixed.to(self.device) + c_fixed_list = self.create_labels(c_org, self.c_dim, self.dataset, self.selected_attrs) + + # Learning rate cache for decaying. + g_lr = self.g_lr + d_lr = self.d_lr + + # Start training from scratch or resume training. + start_iters = 0 + if self.resume_iters: + start_iters = self.resume_iters + self.restore_model(self.resume_iters) + + # Start training. + print('Start training...') + start_time = time.time() + for i in range(start_iters, self.num_iters): + + # =================================================================================== # + # 1. Preprocess input data # + # =================================================================================== # + + # Fetch real images and labels. + try: + x_real, label_org = next(data_iter) + except: + data_iter = iter(data_loader) + x_real, label_org = next(data_iter) + + # Generate target domain labels randomly. + rand_idx = torch.randperm(label_org.size(0)) + label_trg = label_org[rand_idx] + + if self.dataset == 'CelebA': + c_org = label_org.clone() + c_trg = label_trg.clone() + elif self.dataset == 'RaFD': + c_org = self.label2onehot(label_org, self.c_dim) + c_trg = self.label2onehot(label_trg, self.c_dim) + + x_real = x_real.to(self.device) # Input images. + c_org = c_org.to(self.device) # Original domain labels. + c_trg = c_trg.to(self.device) # Target domain labels. + label_org = label_org.to(self.device) # Labels for computing classification loss. + label_trg = label_trg.to(self.device) # Labels for computing classification loss. + + # =================================================================================== # + # 2. Train the discriminator # + # =================================================================================== # + + # Compute loss with real images. + out_src, out_cls = self.D(x_real) + d_loss_real = - torch.mean(out_src) + d_loss_cls = self.classification_loss(out_cls, label_org, self.dataset) + + # Compute loss with fake images. + x_fake = self.G(x_real, c_trg) + out_src, out_cls = self.D(x_fake.detach()) + d_loss_fake = torch.mean(out_src) + + # Compute loss for gradient penalty. + alpha = torch.rand(x_real.size(0), 1, 1, 1).to(self.device) + x_hat = (alpha * x_real.data + (1 - alpha) * x_fake.data).requires_grad_(True) + out_src, _ = self.D(x_hat) + d_loss_gp = self.gradient_penalty(out_src, x_hat) + + # Backward and optimize. + d_loss = d_loss_real + d_loss_fake + self.lambda_cls * d_loss_cls + self.lambda_gp * d_loss_gp + self.reset_grad() + d_loss.backward() + self.d_optimizer.step() + + # Logging. + loss = {} + loss['D/loss_real'] = d_loss_real.item() + loss['D/loss_fake'] = d_loss_fake.item() + loss['D/loss_cls'] = d_loss_cls.item() + loss['D/loss_gp'] = d_loss_gp.item() + + # =================================================================================== # + # 3. Train the generator # + # =================================================================================== # + + if (i+1) % self.n_critic == 0: + # Original-to-target domain. + x_fake = self.G(x_real, c_trg) + out_src, out_cls = self.D(x_fake) + g_loss_fake = - torch.mean(out_src) + g_loss_cls = self.classification_loss(out_cls, label_trg, self.dataset) + + # Target-to-original domain. + x_reconst = self.G(x_fake, c_org) + g_loss_rec = torch.mean(torch.abs(x_real - x_reconst)) + + # Backward and optimize. + g_loss = g_loss_fake + self.lambda_rec * g_loss_rec + self.lambda_cls * g_loss_cls + self.reset_grad() + g_loss.backward() + self.g_optimizer.step() + + # Logging. + loss['G/loss_fake'] = g_loss_fake.item() + loss['G/loss_rec'] = g_loss_rec.item() + loss['G/loss_cls'] = g_loss_cls.item() + + # =================================================================================== # + # 4. Miscellaneous # + # =================================================================================== # + + # Print out training information. + if (i+1) % self.log_step == 0: + et = time.time() - start_time + et = str(datetime.timedelta(seconds=et))[:-7] + log = "Elapsed [{}], Iteration [{}/{}]".format(et, i+1, self.num_iters) + for tag, value in loss.items(): + log += ", {}: {:.4f}".format(tag, value) + print(log) + + if self.use_tensorboard: + for tag, value in loss.items(): + self.logger.scalar_summary(tag, value, i+1) + + # Translate fixed images for debugging. + if (i+1) % self.sample_step == 0: + with torch.no_grad(): + x_fake_list = [x_fixed] + for c_fixed in c_fixed_list: + x_fake_list.append(self.G(x_fixed, c_fixed)) + x_concat = torch.cat(x_fake_list, dim=3) + sample_path = os.path.join(self.sample_dir, '{}-images.jpg'.format(i+1)) + save_image(self.denorm(x_concat.data.cpu()), sample_path, nrow=1, padding=0) + print('Saved real and fake images into {}...'.format(sample_path)) + + # Save model checkpoints. + if (i+1) % self.model_save_step == 0: + G_path = os.path.join(self.model_save_dir, '{}-G.ckpt'.format(i+1)) + D_path = os.path.join(self.model_save_dir, '{}-D.ckpt'.format(i+1)) + torch.save(self.G.state_dict(), G_path) + torch.save(self.D.state_dict(), D_path) + print('Saved model checkpoints into {}...'.format(self.model_save_dir)) + + # Decay learning rates. + if (i+1) % self.lr_update_step == 0 and (i+1) > (self.num_iters - self.num_iters_decay): + g_lr -= (self.g_lr / float(self.num_iters_decay)) + d_lr -= (self.d_lr / float(self.num_iters_decay)) + self.update_lr(g_lr, d_lr) + print ('Decayed learning rates, g_lr: {}, d_lr: {}.'.format(g_lr, d_lr)) + + def train_multi(self): + """Train StarGAN with multiple datasets.""" + # Data iterators. + celeba_iter = iter(self.celeba_loader) + rafd_iter = iter(self.rafd_loader) + + # Fetch fixed inputs for debugging. + x_fixed, c_org = next(celeba_iter) + x_fixed = x_fixed.to(self.device) + c_celeba_list = self.create_labels(c_org, self.c_dim, 'CelebA', self.selected_attrs) + c_rafd_list = self.create_labels(c_org, self.c2_dim, 'RaFD') + zero_celeba = torch.zeros(x_fixed.size(0), self.c_dim).to(self.device) # Zero vector for CelebA. + zero_rafd = torch.zeros(x_fixed.size(0), self.c2_dim).to(self.device) # Zero vector for RaFD. + mask_celeba = self.label2onehot(torch.zeros(x_fixed.size(0)), 2).to(self.device) # Mask vector: [1, 0]. + mask_rafd = self.label2onehot(torch.ones(x_fixed.size(0)), 2).to(self.device) # Mask vector: [0, 1]. + + # Learning rate cache for decaying. + g_lr = self.g_lr + d_lr = self.d_lr + + # Start training from scratch or resume training. + start_iters = 0 + if self.resume_iters: + start_iters = self.resume_iters + self.restore_model(self.resume_iters) + + # Start training. + print('Start training...') + start_time = time.time() + for i in range(start_iters, self.num_iters): + for dataset in ['CelebA', 'RaFD']: + + # =================================================================================== # + # 1. Preprocess input data # + # =================================================================================== # + + # Fetch real images and labels. + data_iter = celeba_iter if dataset == 'CelebA' else rafd_iter + + try: + x_real, label_org = next(data_iter) + except: + if dataset == 'CelebA': + celeba_iter = iter(self.celeba_loader) + x_real, label_org = next(celeba_iter) + elif dataset == 'RaFD': + rafd_iter = iter(self.rafd_loader) + x_real, label_org = next(rafd_iter) + + # Generate target domain labels randomly. + rand_idx = torch.randperm(label_org.size(0)) + label_trg = label_org[rand_idx] + + if dataset == 'CelebA': + c_org = label_org.clone() + c_trg = label_trg.clone() + zero = torch.zeros(x_real.size(0), self.c2_dim) + mask = self.label2onehot(torch.zeros(x_real.size(0)), 2) + c_org = torch.cat([c_org, zero, mask], dim=1) + c_trg = torch.cat([c_trg, zero, mask], dim=1) + elif dataset == 'RaFD': + c_org = self.label2onehot(label_org, self.c2_dim) + c_trg = self.label2onehot(label_trg, self.c2_dim) + zero = torch.zeros(x_real.size(0), self.c_dim) + mask = self.label2onehot(torch.ones(x_real.size(0)), 2) + c_org = torch.cat([zero, c_org, mask], dim=1) + c_trg = torch.cat([zero, c_trg, mask], dim=1) + + x_real = x_real.to(self.device) # Input images. + c_org = c_org.to(self.device) # Original domain labels. + c_trg = c_trg.to(self.device) # Target domain labels. + label_org = label_org.to(self.device) # Labels for computing classification loss. + label_trg = label_trg.to(self.device) # Labels for computing classification loss. + + # =================================================================================== # + # 2. Train the discriminator # + # =================================================================================== # + + # Compute loss with real images. + out_src, out_cls = self.D(x_real) + out_cls = out_cls[:, :self.c_dim] if dataset == 'CelebA' else out_cls[:, self.c_dim:] + d_loss_real = - torch.mean(out_src) + d_loss_cls = self.classification_loss(out_cls, label_org, dataset) + + # Compute loss with fake images. + x_fake = self.G(x_real, c_trg) + out_src, _ = self.D(x_fake.detach()) + d_loss_fake = torch.mean(out_src) + + # Compute loss for gradient penalty. + alpha = torch.rand(x_real.size(0), 1, 1, 1).to(self.device) + x_hat = (alpha * x_real.data + (1 - alpha) * x_fake.data).requires_grad_(True) + out_src, _ = self.D(x_hat) + d_loss_gp = self.gradient_penalty(out_src, x_hat) + + # Backward and optimize. + d_loss = d_loss_real + d_loss_fake + self.lambda_cls * d_loss_cls + self.lambda_gp * d_loss_gp + self.reset_grad() + d_loss.backward() + self.d_optimizer.step() + + # Logging. + loss = {} + loss['D/loss_real'] = d_loss_real.item() + loss['D/loss_fake'] = d_loss_fake.item() + loss['D/loss_cls'] = d_loss_cls.item() + loss['D/loss_gp'] = d_loss_gp.item() + + # =================================================================================== # + # 3. Train the generator # + # =================================================================================== # + + if (i+1) % self.n_critic == 0: + # Original-to-target domain. + x_fake = self.G(x_real, c_trg) + out_src, out_cls = self.D(x_fake) + out_cls = out_cls[:, :self.c_dim] if dataset == 'CelebA' else out_cls[:, self.c_dim:] + g_loss_fake = - torch.mean(out_src) + g_loss_cls = self.classification_loss(out_cls, label_trg, dataset) + + # Target-to-original domain. + x_reconst = self.G(x_fake, c_org) + g_loss_rec = torch.mean(torch.abs(x_real - x_reconst)) + + # Backward and optimize. + g_loss = g_loss_fake + self.lambda_rec * g_loss_rec + self.lambda_cls * g_loss_cls + self.reset_grad() + g_loss.backward() + self.g_optimizer.step() + + # Logging. + loss['G/loss_fake'] = g_loss_fake.item() + loss['G/loss_rec'] = g_loss_rec.item() + loss['G/loss_cls'] = g_loss_cls.item() + + # =================================================================================== # + # 4. Miscellaneous # + # =================================================================================== # + + # Print out training info. + if (i+1) % self.log_step == 0: + et = time.time() - start_time + et = str(datetime.timedelta(seconds=et))[:-7] + log = "Elapsed [{}], Iteration [{}/{}], Dataset [{}]".format(et, i+1, self.num_iters, dataset) + for tag, value in loss.items(): + log += ", {}: {:.4f}".format(tag, value) + print(log) + + if self.use_tensorboard: + for tag, value in loss.items(): + self.logger.scalar_summary(tag, value, i+1) + + # Translate fixed images for debugging. + if (i+1) % self.sample_step == 0: + with torch.no_grad(): + x_fake_list = [x_fixed] + for c_fixed in c_celeba_list: + c_trg = torch.cat([c_fixed, zero_rafd, mask_celeba], dim=1) + x_fake_list.append(self.G(x_fixed, c_trg)) + for c_fixed in c_rafd_list: + c_trg = torch.cat([zero_celeba, c_fixed, mask_rafd], dim=1) + x_fake_list.append(self.G(x_fixed, c_trg)) + x_concat = torch.cat(x_fake_list, dim=3) + sample_path = os.path.join(self.sample_dir, '{}-images.jpg'.format(i+1)) + save_image(self.denorm(x_concat.data.cpu()), sample_path, nrow=1, padding=0) + print('Saved real and fake images into {}...'.format(sample_path)) + + # Save model checkpoints. + if (i+1) % self.model_save_step == 0: + G_path = os.path.join(self.model_save_dir, '{}-G.ckpt'.format(i+1)) + D_path = os.path.join(self.model_save_dir, '{}-D.ckpt'.format(i+1)) + torch.save(self.G.state_dict(), G_path) + torch.save(self.D.state_dict(), D_path) + print('Saved model checkpoints into {}...'.format(self.model_save_dir)) + + # Decay learning rates. + if (i+1) % self.lr_update_step == 0 and (i+1) > (self.num_iters - self.num_iters_decay): + g_lr -= (self.g_lr / float(self.num_iters_decay)) + d_lr -= (self.d_lr / float(self.num_iters_decay)) + self.update_lr(g_lr, d_lr) + print ('Decayed learning rates, g_lr: {}, d_lr: {}.'.format(g_lr, d_lr)) + + def test(self): + """Translate images using StarGAN trained on a single dataset.""" + # Load the trained generator. + self.restore_model(self.test_iters) + + # Set data loader. + if self.dataset == 'CelebA': + data_loader = self.celeba_loader + elif self.dataset == 'RaFD': + data_loader = self.rafd_loader + + with torch.no_grad(): + for i, (x_real, c_org) in enumerate(data_loader): + + # Prepare input images and target domain labels. + x_real = x_real.to(self.device) + c_trg_list = self.create_labels(c_org, self.c_dim, self.dataset, self.selected_attrs) + + # Translate images. + x_fake_list = [x_real] + for c_trg in c_trg_list: + x_fake_list.append(self.G(x_real, c_trg)) + + # Save the translated images. + x_concat = torch.cat(x_fake_list, dim=3) + result_path = os.path.join(self.result_dir, '{}-images.jpg'.format(i+1)) + save_image(self.denorm(x_concat.data.cpu()), result_path, nrow=1, padding=0) + print('Saved real and fake images into {}...'.format(result_path)) + + def test_attack(self): + """Translate images using StarGAN trained on a single dataset.""" + # Load the trained generator. + self.restore_model(self.test_iters) + + # Set data loader. + if self.dataset == 'CelebA': + data_loader = self.celeba_loader + elif self.dataset == 'RaFD': + data_loader = self.rafd_loader + + # Initialize Metrics + l1_error = 0.0 + l2_error = 0.0 + perceptual_error = 0.0 + n_samples = 0 + + for i, (x_real, c_org) in enumerate(data_loader): + # Black image + black = np.zeros((1,3,256,256)) + black = torch.FloatTensor(black).to(self.device) + + # Prepare input images and target domain labels. + x_real = x_real.to(self.device) + c_trg_list = self.create_labels(c_org, self.c_dim, self.dataset, self.selected_attrs) + + pgd_attack = attacks.LinfPGDAttack(model=self.G, device=self.device) + + # Translate images. + x_fake_list = [x_real] + + # if i == 0: + # x_adv, perturb = pgd_attack.perturb(x_real, x_real, c_trg_list[0]) + + for c_trg in c_trg_list: + # Attack + x_adv, perturb = pgd_attack.perturb(x_real, black, c_trg) + # x_adv = x_real + perturb + # x_adv = self.blur_tensor(x_adv) + + # Metrics + with torch.no_grad(): + gen, preproc_x = self.G(x_adv, c_trg) + + # Add to lists + x_fake_list.append(preproc_x) + x_fake_list.append(gen) + + # No Attack + gen_noattack, _ = self.G(x_real, c_trg) + + l1_error += F.l1_loss(gen, gen_noattack) + l2_error += F.mse_loss(gen, gen_noattack) + n_samples += 1 + + # Save the translated images. + x_concat = torch.cat(x_fake_list, dim=3) + result_path = os.path.join(self.result_dir, '{}-images.jpg'.format(i+1)) + save_image(self.denorm(x_concat.data.cpu()), result_path, nrow=1, padding=0) + print('Saved real and fake images into {}...'.format(result_path)) + + if i == 199: + break + + # Print metrics + print('{} images. L1 error: {}. L2 error: {}. Perceptual error: {}.'.format(n_samples, l1_error / n_samples, l2_error / n_samples, + perceptual_error / n_samples)) + + def test_multi(self): + """Translate images using StarGAN trained on multiple datasets.""" + # Load the trained generator. + self.restore_model(self.test_iters) + + with torch.no_grad(): + for i, (x_real, c_org) in enumerate(self.celeba_loader): + + # Prepare input images and target domain labels. + x_real = x_real.to(self.device) + c_celeba_list = self.create_labels(c_org, self.c_dim, 'CelebA', self.selected_attrs) + c_rafd_list = self.create_labels(c_org, self.c2_dim, 'RaFD') + zero_celeba = torch.zeros(x_real.size(0), self.c_dim).to(self.device) # Zero vector for CelebA. + zero_rafd = torch.zeros(x_real.size(0), self.c2_dim).to(self.device) # Zero vector for RaFD. + mask_celeba = self.label2onehot(torch.zeros(x_real.size(0)), 2).to(self.device) # Mask vector: [1, 0]. + mask_rafd = self.label2onehot(torch.ones(x_real.size(0)), 2).to(self.device) # Mask vector: [0, 1]. + + # Translate images. + x_fake_list = [x_real] + for c_celeba in c_celeba_list: + c_trg = torch.cat([c_celeba, zero_rafd, mask_celeba], dim=1) + x_fake_list.append(self.G(x_real, c_trg)) + for c_rafd in c_rafd_list: + c_trg = torch.cat([zero_celeba, c_rafd, mask_rafd], dim=1) + x_fake_list.append(self.G(x_real, c_trg)) + + # Save the translated images. + x_concat = torch.cat(x_fake_list, dim=3) + result_path = os.path.join(self.result_dir, '{}-images.jpg'.format(i+1)) + save_image(self.denorm(x_concat.data.cpu()), result_path, nrow=1, padding=0) + print('Saved real and fake images into {}...'.format(result_path)) + + def blur_tensor(self, tensor): + # PIL to numpy + img = self.denorm(tensor[0].data.cpu()) + img = transforms.ToPILImage()(img) + img = img.filter(ImageFilter.GaussianBlur(radius=1.3)) + # img = img.filter(ImageFilter.BoxBlur(radius=1)) + img = transforms.ToTensor()(img) + img = transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5))(img) + img = torch.unsqueeze(img, 0).to(self.device) + return img \ No newline at end of file diff --git a/stargan/stargan_celeba_256 b/stargan/stargan_celeba_256 new file mode 120000 index 0000000..c5f97bb --- /dev/null +++ b/stargan/stargan_celeba_256 @@ -0,0 +1 @@ +/scratch2/fsynth/stargan/stargan_celeba_256 \ No newline at end of file diff --git a/stargan/vgg_loss.py b/stargan/vgg_loss.py new file mode 100644 index 0000000..c8555c4 --- /dev/null +++ b/stargan/vgg_loss.py @@ -0,0 +1,51 @@ +import torch +import torch.nn as nn +import numpy as np + +from torchvision import models + +class Vgg19(torch.nn.Module): + def __init__(self, requires_grad=False): + super(Vgg19, self).__init__() + vgg_pretrained_features = models.vgg19(pretrained=True).features + self.slice1 = torch.nn.Sequential() + self.slice2 = torch.nn.Sequential() + self.slice3 = torch.nn.Sequential() + self.slice4 = torch.nn.Sequential() + self.slice5 = torch.nn.Sequential() + for x in range(2): + self.slice1.add_module(str(x), vgg_pretrained_features[x]) + for x in range(2, 7): + self.slice2.add_module(str(x), vgg_pretrained_features[x]) + for x in range(7, 12): + self.slice3.add_module(str(x), vgg_pretrained_features[x]) + for x in range(12, 21): + self.slice4.add_module(str(x), vgg_pretrained_features[x]) + for x in range(21, 30): + self.slice5.add_module(str(x), vgg_pretrained_features[x]) + if not requires_grad: + for param in self.parameters(): + param.requires_grad = False + + def forward(self, X): + h_relu1 = self.slice1(X) + h_relu2 = self.slice2(h_relu1) + h_relu3 = self.slice3(h_relu2) + h_relu4 = self.slice4(h_relu3) + h_relu5 = self.slice5(h_relu4) + out = [h_relu1, h_relu2, h_relu3, h_relu4, h_relu5] + return out + +class VGGLoss(nn.Module): + def __init__(self, gpu_ids): + super(VGGLoss, self).__init__() + self.vgg = Vgg19().cuda() + self.criterion = nn.L1Loss() + self.weights = [0.0, 0.0, 0.0, 0.0, 1.0] + + def forward(self, x, y): + x_vgg, y_vgg = self.vgg(x), self.vgg(y) + loss = 0 + for i in range(len(x_vgg)): + loss += self.weights[i] * self.criterion(x_vgg[i], y_vgg[i].detach()) + return loss \ No newline at end of file