diff --git a/.gitattributes b/.gitattributes
index 43a8476c895e425a3455b2271a2e23935f7e9b7a..38d8678536a3728098f0b3e9c2890c440ef13782 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -157,3 +157,21 @@ local-scratch-vm/test/fixtures/load-extensions/confirm-load/pen-dolphin-3d.sb3 f
local-scratch-vm/test/fixtures/looks.sb2 filter=lfs diff=lfs merge=lfs -text
local-scratch-vm/test/fixtures/ordering.sb2 filter=lfs diff=lfs merge=lfs -text
local-scratch-vm/test/fixtures/pen.sb2 filter=lfs diff=lfs merge=lfs -text
+ml2scratch/audio/overview.wav filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/1or2.gif filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/en/ml2scratch.gif filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/en/recognition.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/en/rock.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/en/scratch_program.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/ja/ml2scratch.gif filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/ml2scratch.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/en/original/7.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/en/original/8.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/en/original/scratchx_main.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/en/original/scratchx_top.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/en/windows.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/ja/original/7.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/ja/original/8.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/ja/windows.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/old/zh-cn/windows.png filter=lfs diff=lfs merge=lfs -text
+ml2scratch/images/zh-cn/windows.png filter=lfs diff=lfs merge=lfs -text
diff --git a/ml2scratch/.github/workflows/deploy.yml b/ml2scratch/.github/workflows/deploy.yml
new file mode 100644
index 0000000000000000000000000000000000000000..0aac97f9980079dfbf76611953ea61e9eb714be6
--- /dev/null
+++ b/ml2scratch/.github/workflows/deploy.yml
@@ -0,0 +1,36 @@
+name: Deploy
+on:
+ push:
+ branches:
+ - master
+ tags:
+ - "!*"
+
+jobs:
+ build-deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ repository: LLK/scratch-gui
+ ref: v3.6.18
+ - run: npm install
+ - uses: actions/checkout@v2
+ with:
+ path: ./ml2scratch
+ - run: sh ./ml2scratch/install.sh
+ - run: npm run build
+ - name: npm install under ml2scratch
+ run: npm install
+ working-directory: ./ml2scratch
+ - name: Build ml2scratch.mjs for xcratch
+ run: npm run build
+ working-directory: ./ml2scratch
+ - name: Copy ml2scratch.mjs to build folder
+ run: cp ./ml2scratch/dist/ml2scratch.mjs ./build
+ - name: Copy sample.sb3 to build folder
+ run: cp ./ml2scratch/sample_projects/xcratch/sample.sb3 ./build
+ - uses: peaceiris/actions-gh-pages@v3
+ with:
+ deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
+ publish_dir: ./build
diff --git a/ml2scratch/.gitignore b/ml2scratch/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..7fc702e7349c8f2c710482fa6c1d10c941acfd05
--- /dev/null
+++ b/ml2scratch/.gitignore
@@ -0,0 +1,4 @@
+node_modules
+.DS_Store
+dist
+keys
diff --git a/ml2scratch/LICENSE b/ml2scratch/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..ada1a8176b23b97e70d89300c3f06c3c471bec2c
--- /dev/null
+++ b/ml2scratch/LICENSE
@@ -0,0 +1,661 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 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 Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are 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.
+
+ 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.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ 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 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 work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero 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 Affero 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 Affero 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 Affero 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 Affero 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 Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ 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 AGPL, see
+.
diff --git a/ml2scratch/README.en.md b/ml2scratch/README.en.md
new file mode 100644
index 0000000000000000000000000000000000000000..7e5b4e473f967a44b3695cd72a2894d7d8dd9f5f
--- /dev/null
+++ b/ml2scratch/README.en.md
@@ -0,0 +1,189 @@
+# ML2Scratch(Scratch2ML)
+
+ML2Scratch connects Machine Learning([TensorFlow.js](https://www.tensorflow.org/js)) with Scratch.
+
+If you take a few images with a webcam, label them, and learn them, you can classify similar new images based on the learning results. The captured images are not sent to the server, and all learning and classification are performed in the browser. (However, a network connection is required to load the application at startup and to download the learning model.)
+
+The block languages are English, Japanese, Japanese, Simplified Chinese(provided by 陶旭 https://twitter.com/taoxu_toukyoku), and Traditional Chinese(provided by
+CAVEDU Education https://github.com/cavedunissin). If you would like to help us translate into other languages, please open an issue or contact us.
+
+*Read this in other languages: [English](README.en.md), [日本語](README.md), [简体中文](README.zh-cn.md).*
+
+[ML2Scratch Website](https://champierre.github.io/ml2scratch/)
+
+
+
+## Demo Movie
+
+### Learn/Classify Scratch stage images
+
+
+
+- [handwriting(1or2) recognition sample project](https://github.com/champierre/ml2scratch/blob/master/sample_projects/1or2.sb3?raw=true)
+- [handwriting(1or2) recognition learning data](https://github.com/champierre/ml2scratch/blob/master/sample_projects/1or2.json?raw=true)
+
+### Learn/Classify Scratch webcam images
+
+
+
+#### Other samples
+
+- Rock/Scissors/Paper Demo [YouTube](https://www.youtube.com/watch?v=DkH1hwc-Gb4) | [.mov file](https://s3.amazonaws.com/champierre/movies/rsp_demo.mov)
+- Control a toy robot, MiP, by hand gestures [YouTube](https://www.youtube.com/watch?v=GKXimEB5WQg) | [.mov file](https://s3.amazonaws.com/champierre/movies/mip_demo.mov)
+
+## Requirements
+
+- OS
+ - Windows 8
+ - Windows 10
+ - MacOS
+ - Chrome OS
+ - iOS
+- Browser
+ - Chrome
+ - Safari(iOS)
+
+ML2Scratch sometimes does not work because of some Chrome extensions. Plese switch to [Guest Mode](https://support.google.com/chrome/answer/6130773) in such cases.
+
+## How to use(Step by step)
+
+### Setup
+
+1. Open [https://stretch3.github.io/](https://stretch3.github.io/).
+
+2. Open "Choose an Extension" window and select "ML2Scratch".
+
+
+
+3. Chrome asks you to allow the access to Camera, then click "Allow".
+
+4. Check the checkboxes besides "label", "counts of label 1", "counts of label 2" and "counts of label 3" blocks.
+
+
+
+### Training
+
+5. Show "rock" hand sign to the camera and click "train label 1" block. This is to train the machine to recognize "rock" sign as label 1.
+
+
+
+6. Keep clicking the button until you capture about 20 images. The number of images captured is displayed in "counts of label 1" field in Stage window.
+
+7. Show "paper" hand sign to the camera and keep clicking "train label 2" block until you get 20 as "counts of label 2".
+
+8. Show "scissors" hand sign to the camera and keep clicking "train label 3" block until you get 20 as "counts of label 3".
+
+### Recognition
+
+9. After training, the recognition result shows in the "label" field in Stage area. If you show "rock", the "label" should show "1", if you show "paper", the "label" should show "2" and if you show "scissors", the "label" should show "3".
+
+
+
+10. You can use "when received label #" blocks and create a sample program like this:
+
+
+
+### Switching between images to be learned/classified
+
+You can switch the images to be learned/classified.
+
+By default, Scratch's stage image is used for learning/classification.
+
+
+
+If there is a webcam image on the stage, it learns/classified the webcam image, or if the "Turn off video" block stops showing the webcam image and shows a game or animation screen, etc., it uses that screen for learning/classfication.
+
+If you want to learn/classify only the webcam's image, you can use
+
+
+
+It can be switch to a webcam image for learning/classification. If you want to move the character by gestures on the camera image, I think this is a more accurate way to judge.
+
+
+### Download/Upload
+
+With ML2Scratch, you can download and save the trained model on your PC by using the "download learning data" block.
+
+
+
+Click, specify the file download destination, and press the "Save" button. The learning data will be saved as a file <numerical string>.json.
+
+The project itself is not saved automatically like a normal Scratch, so select "File" > "Save to your computer" and save it on your PC as a .sb3 file.
+
+
+
+To reopen a saved project, choose "File" > "Load from your computer" and select the saved .sb3 file. After that, upload the learning data.
+
+
+
+The saved learning data can be uploaded in the "upload learning data" block.
+
+
+
+When you click, a window called "upload learning data" opens, so click the "Select file" button, select the training data file (<numerical sequence>.json), and press Click.
+
+
+
+At this time, be aware that the data that has been learned will be overwritten.
+
+## For Developers - How to run ML2Scratch extension on your computer
+
+1. Setup LLK/scratch-gui on your computer.
+
+ ```
+ git clone --depth 1 git@github.com:LLK/scratch-gui.git
+ cd scratch-gui
+ npm install
+ ```
+
+2. In scratch-gui folder, clone ML2Scratch. You will have ml2scratch folder under scratch-gui.
+
+ ```
+ git clone git@github.com:champierre/ml2scratch.git
+ ```
+
+3. Run the install script.
+
+ ```
+ sh ml2scratch/install.sh
+ ```
+
+4. Run Scratch, then go to http://localhost:8601/.
+
+ ```
+ npm start
+ ```
+
+## Acknowledgments
+
+This project was made possible by the contributions of the following people. I would also like to thank those who have reported bugs or suggested improvements not listed below, and those who have used the software in workshops and given me feedback.
+
+- Banner images and icons: [Yu Ishihara](https://twitter.com/is8r_)
+- Simplified Chinese Translation: [陶旭](https://twitter.com/taoxu_toukyoku)
+- Traditional Chinese Translation: [CAVEDU Education](https://github.com/cavedunissin)
+
+## Licence
+
+ML2Scratch is under [AGPL-3.0 license](./LICENSE), open source and freely available to anyone. You can use it at your classes, workshops. Commercial usage is also accepted. If you or your students created something cool using ML2Scratch, please share it on SNS using hashtag #ml2scratch or let me know to any of these contacts. Interesting projects will be added to the "Examples of use".
+
+## Contacts
+
+- Twitter
+
+
+
+## Examples of use
+
+- [Try to avoid obstacles with machine learning # ML2Scratch # ev3(Google Translated)](https://translate.google.com/translate?hl=&sl=auto&tl=en&u=https%3A%2F%2Fwww.ogaworks.com%2Farchives%2F11301&sandbox=1)
+- [Control Wagara-saurus(Japanese style dinosaur) using ML2Scratch](https://www.facebook.com/azusa.amino/videos/2408305165934138/)
+- [Control an electric fan with illustration](https://www.facebook.com/groups/scratch.microbit/permalink/704715526600743/)
+- [Smart Trash Box(Japanese)](https://robotstart.info/2019/10/20/jjpc-4thprog-competition.html)
+- [Making a coin sorting AI robot with Scratch and micro:bit](http://make-lab.sakura.ne.jp/wordpress/2019/10/12/making-a-coin-sorting-ai-robot-with-scratch-and-micro-bit/)
+- [Go forward with jasmine bottle, go backward with canned coffee (movie)](https://www.facebook.com/groups/visualprogramming.jp/permalink/531024724134426/)
+- [ML2Scratch bookshelf arrangement check (movie)](https://www.youtube.com/watch?v=ZQ88E6HSUdg)
+- [ML2Scratch detects parking space fullness (movie)](https://www.youtube.com/watch?v=vZwfN18op8w)
+
+## Reference
+
+- [https://js.tensorflow.org/](https://js.tensorflow.org/)
+- [https://github.com/googlecreativelab/teachable-machine-boilerplate](https://github.com/googlecreativelab/teachable-machine-boilerplate)
diff --git a/ml2scratch/README.md b/ml2scratch/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..169587a78f93adbd3b472696c61ab1e19725f09d
--- /dev/null
+++ b/ml2scratch/README.md
@@ -0,0 +1,219 @@
+## サポートのお願い
+
+ML2Scratchは2018年よりオープンソースかつ無料で提供しており、学校や各種プログラミング教室はじめさまざまな場所で利用されております。継続して開発を続けるためには、使っていただいている皆さまからの支援が必要です。
+[一杯のコーヒー](https://www.buymeacoffee.com/champierre)という形でサポートをいただけると大変ありがたく思います。
+
+
+
+# ML2Scratch(エムエル トゥー スクラッチ)
+
+ML2Scratch(エムエル トゥー スクラッチ)は[TensorFlow.js](https://www.tensorflow.org/js)を使った機械学習をScratchから簡単に体験、利用できるようにします。
+
+Webカメラでいくつかの画像を撮り、ラベルを付けて学習すれば、似たような新たな画像を、学習結果をもとに分類することができます。キャプチャした画像はサーバーに送られることはなく、学習および分類はすべてブラウザ上で行われるのが特徴です。(ただし、起動時にアプリケーションを読み込むのと、学習モデルをダウンロードするためにはネットワーク接続が必要です。)
+
+ブロックの言語は、English、日本語、にほんご、简体中文(陶旭 https://twitter.com/taoxu_toukyoku 提供)、繁體中文(CAVEDU Education https://github.com/cavedunissin 提供)、に対応しています。その他の言語への翻訳にご協力いただける方がいましたら、Issue に登録いただくか、連絡先までご連絡ください。
+
+*他の言語で読む: [English](README.en.md), [日本語](README.md), [简体中文](README.zh-cn.md).*
+
+[ML2Scratch ホームページ](https://champierre.github.io/ml2scratch/)
+
+
+
+## 音声解説(NotebookLMを使って生成)
+
+[音声ファイルを再生・ダウンロード](https://raw.githubusercontent.com/champierre/ml2scratch/master/audio/overview.wav)
+
+## Demo Movie(デモ動画)
+
+### ステージの画像を学習
+
+
+
+- [手書き数字(1or2)認識 サンプルプロジェクト](https://github.com/champierre/ml2scratch/blob/master/sample_projects/1or2.sb3?raw=true)
+- [手書き数字(1or2)認識 学習データ](https://github.com/champierre/ml2scratch/blob/master/sample_projects/1or2.json?raw=true)
+
+### Webカメラの画像を学習
+
+
+
+#### その他のデモ動画
+
+- Webカメラでグー、チョキ、パーを判定 [YouTube](https://www.youtube.com/watch?v=DkH1hwc-Gb4) | [.mov file](https://s3.amazonaws.com/champierre/movies/rsp_demo.mov)
+- ジェスチャーで倒立2輪ロボットMiPを動かす [YouTube](https://www.youtube.com/watch?v=GKXimEB5WQg) | [.mov file](https://s3.amazonaws.com/champierre/movies/mip_demo.mov)
+
+## Requirements(推奨環境)
+
+- OS
+ - Windows 8
+ - Windows 10
+ - MacOS
+ - Chrome OS
+ - iOS
+- ブラウザ
+ - Chrome
+ - Safari(iOS)
+
+Chrome の拡張機能を使用している場合に、正常に動作しないことがあるので、もしうまく動かないという場合には、[ゲストモード](https://support.google.com/chrome/answer/6130773?hl=ja)に切り替えてお試しください。
+
+## How to use(使い方)
+
+### Setup(準備)
+
+1. [https://stretch3.github.io/](https://stretch3.github.io/) をChromeで開きます。
+
+2. 「拡張機能を選ぶ」画面を開き、「ML2Scratch」を選びます。
+
+
+
+3. Chromeがカメラの使用の許可を求めるダイアログが表示されるので、「許可」をクリックします。
+
+4. 「ラベル」、「ラベル1の枚数」、「ラベル2の枚数」、「ラベル3の枚数」の横のチェックボックスにチェックを入れます。
+
+
+
+### Training(学習)
+
+5. ジャンケンの「グー」のサインをカメラに映し、「ラベル1を学習する」ブロックをクリックします。この操作で、「グー」をラベル1として機械に学習させます。
+
+
+
+6. 撮った写真の枚数が20枚になるまで「ラベル1を学習する」ブロックをクリックし続けます。撮った写真の枚数はステージ上の「ラベル1の枚数」に表示されています。
+
+7. 次に「パー」をカメラに映し、同様に「ラベル2の枚数」が20になるまで、「ラベル2を学習する」ブロックをクリックし続けます。
+
+8. 「チョキ」をカメラに映し、「ラベル3の枚数」が20になるまで、「ラベル3を学習する」ブロックをクリックし続けます。
+
+### Recognition(認識)
+
+9. 学習を終えると、認識結果が常にステージ上の「ラベル」に表示されるようになります。「グー」を見せれば「1」に、「パー」を見せれば「2」に、「チョキ」を見せれば「3」と表示されます。
+
+
+
+10. 「ラベル◯◯を受け取ったとき」ブロックを使って、以下のようなサンプルプログラムを作ることができます。
+
+
+
+### 学習/判定する画像の切り替え
+
+学習/判定する画像を切り替えることができます。
+
+デフォルトではScratchのステージ画像を学習/判定に使っています。
+
+
+
+ステージにWebカメラの画像を映していれば、Webカメラの画像を学習/判定しますし、「ビデオを切にする」ブロックでWebカメラの画像を映すのをやめて、ゲームやアニメーションの画面などを表示した場合は、その画面を学習/判定に使用します。
+
+「ビデオを入にする」でWebカメラの画像を映すと同時に、ゲームやアニメーションのキャラクターも表示しているのだけれども、Webカメラの画像だけを学習/判定したい場合には、
+
+
+
+で学習/判定する画像をWebカメラの画像に切り替えることができます。カメラの画像に映ったジェスチャーでキャラクターを動かしたいという場合は、こちらの方が精度良く判定できると思います。
+
+### Download/Upload(学習データとプロジェクトのダウンロード/アップロード)
+
+ML2Scratch では、学習したモデルを「学習データをダウンロード」ブロックを使うことで、PC上にダウンロードして保存しておくことができます。
+
+
+
+をクリックし、ファイルのダウンロード先を指定して「保存」ボタンを押すと <数字の列>.json というファイルとして学習データが保存されます。
+
+プロジェクト自体は、通常の Scratch とは違って自動で保存されないので、「ファイル」>「コンピューターに保存する」を選び、.sb3 ファイルとして自分の PC 上に保存します。
+
+
+
+保存しておいたプロジェクトを再び開くには、「ファイル」>「コンピューターから読み込む」を選び、保存してあった .sb3 ファイルを選びます。そのあとに学習データをアップロードします。
+
+
+
+保存しておいた学習データは、「学習データをアップロード」ブロックでアップロードすることができます。
+
+
+
+をクリックすると、「学習データをアップロード」というウィンドウが開くので、「ファイルを選択」ボタンをクリックして、学習データのファイル(<数字の列>.json)を選んだあと、「アップロード」ボタンをクリックします。
+
+
+
+このとき、いままで学習していたデータは上書きされてしまうので注意してください。
+
+## How to use from Xcratch(Xcratch からの利用)
+
+ML2Scratch は必要な独自拡張機能を読み込むことができる Scratch Mod の「[Xcratch](https://xcratch.github.io/)」からも利用できます。
+
+Xcratch の URL である [https://xcratch.github.io/](https://xcratch.github.io/) をブラウザで開き、「エディターを開く」を選んだあと、「拡張機能を選ぶ」画面から「拡張機能を読み込む」を選んでから URL 入力欄に https://champierre.github.io/ml2scratch/ml2scratch.mjs を入力するか、以下のプロジェクトファイル付き URL から直接アクセスすれば、すでに ML2Scratch の拡張機能を読み込み済みの状態で Xcratch を開くことができます。
+
+» [ML2Scratch を読み込み済みの Xcratch を開く](https://xcratch.github.io/editor/#https://champierre.github.io/ml2scratch/sample.sb3)
+
+## For Developers - How to run ML2Scratch extension on your computer
+
+1. Setup LLK/scratch-gui on your computer.
+
+ ```
+ git clone --depth 1 git@github.com:LLK/scratch-gui.git
+ cd scratch-gui
+ npm install
+ ```
+
+2. In scratch-gui folder, clone ML2Scratch. You will have ml2scratch folder under scratch-gui.
+
+ ```
+ git clone git@github.com:champierre/ml2scratch.git
+ ```
+
+3. Run the install script.
+
+ ```
+ sh ml2scratch/install.sh
+ ```
+
+4. Run Scratch, then go to http://localhost:8601/.
+
+ ```
+ npm start
+ ```
+
+## Acknowledgments(謝辞)
+
+このプロジェクトは以下の方々の貢献で成り立っています。その他、以下に挙げきれていないバグ報告や機能改善を提案してくれた方々、ワークショップなどで使っていただきフィードバックをくださった方々などに感謝いたします。
+
+- バナー画像やアイコンのデザイン: [Yu Ishihara](https://twitter.com/is8r_)
+- 简体中文への翻訳: [陶旭](https://twitter.com/taoxu_toukyoku)
+- 繁體中文への翻訳: [CAVEDU Education](https://github.com/cavedunissin)
+
+## Licence(ライセンス)
+
+ML2Scratchには [AGPL-3.0 license](./LICENSE) が適用されます。オープンソースで、誰でも自由に利用できます。授業やワークショップで使用でき、商用利用も認められています。あなたやあなたの生徒さんがML2Scratchを使用して何か面白いプロジェクトを作成したときは、ぜひハッシュタグ #ml2scratch を使用してSNSで共有するか、連絡先までお知らせください。以下の「活用例」に追加させていただきます。
+
+## Contacts(連絡先)
+
+- Twitter
+
+
+
+## Examples of use(活用例)
+
+- [機械学習で障害物を避けてみる #ML2Scratch #ev3](https://www.ogaworks.com/archives/11301)
+- [ML2Scratchでワガラサウルスを動かしてみました!](https://www.facebook.com/azusa.amino/videos/2408305165934138/)
+- [イラストで扇風機をコントロール](https://www.facebook.com/groups/scratch.microbit/permalink/704715526600743/)
+- [小学生が作った「未来のゴミ箱」は自律走行&機械学習でゴミ分別 IoTセンサーで外の環境を検知!JJPC 全国小中学生プログラミング大会レポート](https://robotstart.info/2019/10/20/jjpc-4thprog-competition.html)
+- [Scratchとmicro:bitでコイン選別AIロボットを作る](http://make-lab.sakura.ne.jp/wordpress/2019/10/12/scratch%e3%81%a8microbit%e3%81%a7%e3%82%b3%e3%82%a4%e3%83%b3%e9%81%b8%e5%88%a5ai%e3%83%ad%e3%83%9c%e3%83%83%e3%83%88%e3%82%92%e4%bd%9c%e3%82%8b/)
+- [ジャスミンボトルで前進、缶コーヒーで後進(動画)](https://www.facebook.com/groups/visualprogramming.jp/permalink/531024724134426/)
+- [ML2Scratchで本棚整理チェック(動画)](https://www.youtube.com/watch?v=ZQ88E6HSUdg)
+- [ML2Scratchで駐車場の満空検知(動画)](https://www.youtube.com/watch?v=vZwfN18op8w)
+
+## Tシャツ
+
+ML2Scratchのロゴ入りTシャツ、こちらで販売しています ->
+[https://suzuri.jp/is8r_/1251743/t-shirt/s/white](https://suzuri.jp/is8r_/1251743/t-shirt/s/white)
+
+## Release Notes
+
+- 1.0.0 2018/04/09 ScratchXバージョン
+- 2.0.0 2019/01/20 Scratch3バージョン
+- 3.0.0 2020/03/28 Scratchのステージ画像を学習/判定できるようにした。
+- 3.0.1 2020/03/29 デフォルトで、カメラの画像を学習/判定するようにする。ラベル名を自由に設定できるようにする。
+- 3.0.2 2020/04/18 「ビデオを切にする」と「カメラの画像を学習/判定する」などのブロックを続けて使用した時、あとに続けたブロックが実行されないバグを修正しました。
+
+## Reference(参考)
+
+- [https://js.tensorflow.org/](https://js.tensorflow.org/)
+- [https://github.com/googlecreativelab/teachable-machine-boilerplate](https://github.com/googlecreativelab/teachable-machine-boilerplate)
diff --git a/ml2scratch/README.zh-cn.md b/ml2scratch/README.zh-cn.md
new file mode 100644
index 0000000000000000000000000000000000000000..becc6bad339eb4d642289b400ac5198b0266e83c
--- /dev/null
+++ b/ml2scratch/README.zh-cn.md
@@ -0,0 +1,189 @@
+# ML2Scratch(Scratch2ML)
+
+使用ML2Scratch可以将机器学习 ([TensorFlow.js](https://www.tensorflow.org/js))与Scratch连接起来。
+
+如果使用网络摄像头拍摄一些图像,对其进行标记并进行学习,则可以根据学习结果对相似的新图像进行分类。捕获的图像不会发送到服务器,并且所有学习和分类都在浏览器中执行。 (但是,需要网络连接才能在启动时加载应用程序并下载学习模型。)
+
+*其他语言说明页: [English](README.en.md), [日本語](README.md), [简体中文](README.zh-cn.md).*
+
+[ML2Scratch Website](https://champierre.github.io/ml2scratch/)
+
+
+
+## Demo Movie(演示视频)
+
+### Learn/Classify Scratch stage images
+
+
+
+- [handwriting(1or2) recognition sample project](https://github.com/champierre/ml2scratch/blob/master/sample_projects/1or2.sb3?raw=true)
+- [handwriting(1or2) recognition learning data](https://github.com/champierre/ml2scratch/blob/master/sample_projects/1or2.json?raw=true)
+
+### Learn/Classify Scratch webcam images
+
+
+
+#### Other samples
+
+- 用电脑摄像头判别石头剪子布 [.mov file](https://s3.amazonaws.com/champierre/movies/rsp_demo.mov) | [YouTube](https://www.youtube.com/watch?v=DkH1hwc-Gb4)
+- 用手势指挥倒立两轮机器人MiP [.mov file](https://s3.amazonaws.com/champierre/movies/mip_demo.mov) | [YouTube](https://www.youtube.com/watch?v=GKXimEB5WQg)
+
+## License(许可证)
+
+- ML2Scratch受 [BSD 3-Clause License](./LICENSE.md) 的保护,是开源的,任何人均可免费使用。您可以在您的课堂,讲习班上使用它。商业用途也被接受。如果您或您的学生使用ML2Scratch创建了一些很棒的东西,请使用 #ml2scratch 标签在SNS上分享,或者让我知道这些联系人中的任何一个。有趣的项目将添加到“使用例”中。
+
+## Contacts(联络人)
+
+- WeChat
+
+
+
+- Twitter
+
+
+
+## Examples of use(使用例)
+
+- [尝试避免机器学习的障碍#ML2Scratch#ev3(Google Translated)](https://translate.google.com/translate?hl=&sl=ja&tl=zh-CN&u=https%3A%2F%2Fwww.ogaworks.com%2Farchives%2F11301)
+- [使用ML2Scratch控制Wagara-saurus(日式恐龙)](https://www.facebook.com/azusa.amino/videos/2408305165934138/)
+- [用插图控制电风扇]((https://www.facebook.com/groups/scratch.microbit/permalink/704715526600743/))
+- [智能垃圾箱](日文)](https://robotstart.info/2019/10/20/jjpc-4thprog-competition.html)
+- [使用Scratch和micro:bit制作硬币分类AI机器人](http://make-lab.sakura.ne.jp/wordpress/2019/10/12/making-a-coin-sorting-ai-robot-with-scratch-and-micro-bit/)
+- [用茉莉花瓶向前走,用罐装咖啡向后走(电影)](https://www.facebook.com/groups/visualprogramming.jp/permalink/531024724134426/)
+- [ML2Scratch书架排列检查(电影)](https://www.youtube.com/watch?v=ZQ88E6HSUdg)
+- [ML2Scratch检测到停车位已满(电影)](https://www.youtube.com/watch?v=vZwfN18op8w)
+
+## Requirements(运行环境)
+
+- OS
+ - Windows 8
+ - Windows 10
+ - MacOS
+ - Chrome OS
+ - iOS
+- Browser
+ - Chrome
+ - Safari(iOS)
+
+由于某些Chrome扩展程序,ML2Scratch有时不起作用。 在这种情况下,请切换到访客模式。
+
+## How to use(用法)
+
+### Setup(设定)
+
+1. 打开 [https://stretch3.github.io/](https://stretch3.github.io/)。
+
+2. 打开“选择扩展”窗口,然后选择“ML2Scratch”。
+
+
+
+3. Chrome要求您允许访问相机,然后单击“允许”。
+
+4. 选中“标签”,“标签1的计数”,“标签2的计数”和“标签3的计数”块旁边的复选框。
+
+
+
+### Training(训练)
+
+5. 向摄像机显示“摇滚”手势,然后单击“火车标签1”块。 这是为了训练机器将“岩石”符号识别为标签1。
+
+
+
+6. 持续单击该按钮,直到捕获约20张图像。 捕获的图像数量显示在“阶段”窗口的“标签数量1”字段中。
+
+7. 在相机上显示“纸”手势,并继续单击“火车标签2”块,直到获得20作为“标签2的数量”。
+
+8. 在相机上显示“剪刀”手势,并继续单击“火车标签3”块,直到获得20作为“标签3的数量”。
+
+### Recognition(承认)
+
+9. 训练后,识别结果将显示在“阶段”区域的“标签”字段中。 如果显示“ rock”,则“ label”应显示“ 1”,如果显示“ paper”,则“ label”应显示“ 2”,如果显示“ scissorsors”,则“ label”应显示“ 3” 。
+
+
+
+10. 您可以使用“何时收到标签#”块并创建一个示例程序,如下所示:
+
+
+
+### Switching between images to be learned/classified
+
+You can switch the images to be learned/classified.
+
+By default, Scratch's stage image is used for learning/classification.
+
+
+
+If there is a webcam image on the stage, it learns/classified the webcam image, or if the "Turn off video" block stops showing the webcam image and shows a game or animation screen, etc., it uses that screen for learning/classfication.
+
+If you want to learn/classify only the webcam's image, you can use
+
+
+
+It can be switch to a webcam image for learning/classification. If you want to move the character by gestures on the camera image, I think this is a more accurate way to judge.
+
+### Download/Upload
+
+With ML2Scratch, you can download and save the trained model on your PC by using the "download learning data" block.
+
+
+
+Click, specify the file download destination, and press the "Save" button. The learning data will be saved as a file <numerical string>.json.
+
+The project itself is not saved automatically like a normal Scratch, so select "File" > "Save to your computer" and save it on your PC as a .sb3 file.
+
+
+
+To reopen a saved project, choose "File" > "Load from your computer" and select the saved .sb3 file. After that, upload the learning data.
+
+
+
+The saved learning data can be uploaded in the "upload learning data" block.
+
+
+
+When you click, a window called "upload learning data" opens, so click the "Select file" button, select the training data file (<numerical sequence>.json), and press Click.
+
+
+
+At this time, be aware that the data that has been learned will be overwritten.
+
+## For Developers - How to run ML2Scratch extension on your computer
+
+1. Setup LLK/scratch-gui on your computer.
+
+ ```
+ git clone --depth 1 git@github.com:LLK/scratch-gui.git
+ cd scratch-gui
+ npm install
+ ```
+
+2. In scratch-gui folder, clone ML2Scratch. You will have ml2scratch folder under scratch-gui.
+
+ ```
+ git clone git@github.com:champierre/ml2scratch.git
+ ```
+
+3. Run the install script.
+
+ ```
+ sh ml2scratch/install.sh
+ ```
+
+4. Run Scratch, then go to http://localhost:8601/.
+
+ ```
+ npm start
+ ```
+
+## Licence
+
+ML2Scratch is under [AGPL-3.0 license](./LICENSE), open source and freely available to anyone. You can use it at your classes, workshops. Commercial usage is also accepted. If you or your students created something cool using ML2Scratch, please share it on SNS using hashtag #ml2scratch or let me know to any of these contacts. Interesting projects will be added to the "Examples of use".
+
+## T-Shirt(文化衫)
+
+这里销售印有ML2Scratch标志的文化衫 -> [https://suzuri.jp/is8r_/1251743/t-shirt/s/white](https://suzuri.jp/is8r_/1251743/t-shirt/s/white)
+
+## Reference(参考链接)
+
+- [https://js.tensorflow.org/](https://js.tensorflow.org/)
+- [https://github.com/googlecreativelab/teachable-machine-boilerplate](https://github.com/googlecreativelab/teachable-machine-boilerplate)
diff --git a/ml2scratch/_config.yml b/ml2scratch/_config.yml
new file mode 100644
index 0000000000000000000000000000000000000000..dd480c554822350ebd6eb3bc88704ae8969e9bff
--- /dev/null
+++ b/ml2scratch/_config.yml
@@ -0,0 +1,12 @@
+plugins:
+ - jekyll-relative-links
+relative_links:
+ enabled: true
+ collections: true
+include:
+ - README.md
+ - README.en.md
+ - README.zh-cn.md
+ - LICENSE
+
+theme: jekyll-theme-leap-day
diff --git a/ml2scratch/audio/overview.wav b/ml2scratch/audio/overview.wav
new file mode 100644
index 0000000000000000000000000000000000000000..e2a6086fdee5bbde26c4039211bdb7cf297c5e85
--- /dev/null
+++ b/ml2scratch/audio/overview.wav
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f80d2792f22094e6d5903ac080dce5edf1a13abfc0f2c9804204c9e07e581e93
+size 17290170
diff --git a/ml2scratch/images/1or2.gif b/ml2scratch/images/1or2.gif
new file mode 100644
index 0000000000000000000000000000000000000000..a53e5d1686f85a4b096b569ee5b64d1619758210
--- /dev/null
+++ b/ml2scratch/images/1or2.gif
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bc68a3a32c7b4c3f618a8e6ac1f70d9f45510d2b76b18fcf61cb18e298066bea
+size 225652
diff --git a/ml2scratch/images/en/check_blocks.png b/ml2scratch/images/en/check_blocks.png
new file mode 100644
index 0000000000000000000000000000000000000000..0cf798b18961d6f7a15b4510e4e1fc8e42436f4c
Binary files /dev/null and b/ml2scratch/images/en/check_blocks.png differ
diff --git a/ml2scratch/images/en/download.png b/ml2scratch/images/en/download.png
new file mode 100644
index 0000000000000000000000000000000000000000..036a0829c36f26ba981c69a5f611b1cda47d4e46
Binary files /dev/null and b/ml2scratch/images/en/download.png differ
diff --git a/ml2scratch/images/en/load_project.png b/ml2scratch/images/en/load_project.png
new file mode 100644
index 0000000000000000000000000000000000000000..7e488730c8a8550333f10d62494467038309377c
Binary files /dev/null and b/ml2scratch/images/en/load_project.png differ
diff --git a/ml2scratch/images/en/ml2scratch.gif b/ml2scratch/images/en/ml2scratch.gif
new file mode 100644
index 0000000000000000000000000000000000000000..0948ae758a64f0328c6dc24a401b76e1ee1f3e1c
--- /dev/null
+++ b/ml2scratch/images/en/ml2scratch.gif
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:400bcc912c85d81de3bc0e7219e0c2e81b16240c72a5b272fb467bd3ef5020bb
+size 18515768
diff --git a/ml2scratch/images/en/ml2scratch.png b/ml2scratch/images/en/ml2scratch.png
new file mode 100644
index 0000000000000000000000000000000000000000..69504eed485b84a2f815571b6fe914ed1a49a4ab
Binary files /dev/null and b/ml2scratch/images/en/ml2scratch.png differ
diff --git a/ml2scratch/images/en/recognition.png b/ml2scratch/images/en/recognition.png
new file mode 100644
index 0000000000000000000000000000000000000000..db0ad1d08ac31bae3c570594d5e0d0490cbfa871
--- /dev/null
+++ b/ml2scratch/images/en/recognition.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:facc8398f18ec153532f3117802876b69dd0310058f3c395f379279a1891ad87
+size 350962
diff --git a/ml2scratch/images/en/rock.png b/ml2scratch/images/en/rock.png
new file mode 100644
index 0000000000000000000000000000000000000000..f71304aff84751b168ef4e208fbb9cd4dcd436eb
--- /dev/null
+++ b/ml2scratch/images/en/rock.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b1c4ca86241e8321665a8487f229303336b9d86db7bd8a3584f1a6a825a71bf2
+size 194409
diff --git a/ml2scratch/images/en/save_project.png b/ml2scratch/images/en/save_project.png
new file mode 100644
index 0000000000000000000000000000000000000000..1c62475476e27f5486bc64a1edd1f1cc28007308
Binary files /dev/null and b/ml2scratch/images/en/save_project.png differ
diff --git a/ml2scratch/images/en/scratch_program.png b/ml2scratch/images/en/scratch_program.png
new file mode 100644
index 0000000000000000000000000000000000000000..0c219eab98b30b5be415358211112c1eab0706fe
--- /dev/null
+++ b/ml2scratch/images/en/scratch_program.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a9c0820dd04fff81b5ebae8a3c08f1dcbfaf555e80dde553330383338a455304
+size 228702
diff --git a/ml2scratch/images/en/stage.png b/ml2scratch/images/en/stage.png
new file mode 100644
index 0000000000000000000000000000000000000000..1618513eabed9902616a81b359d0387f578f1997
Binary files /dev/null and b/ml2scratch/images/en/stage.png differ
diff --git a/ml2scratch/images/en/upload.png b/ml2scratch/images/en/upload.png
new file mode 100644
index 0000000000000000000000000000000000000000..47956f0cef569a3e77018b972b21efbaaf179dd8
Binary files /dev/null and b/ml2scratch/images/en/upload.png differ
diff --git a/ml2scratch/images/en/upload_dialog.png b/ml2scratch/images/en/upload_dialog.png
new file mode 100644
index 0000000000000000000000000000000000000000..ac9450bf957746ab8889b19011cc754a0816b2bd
Binary files /dev/null and b/ml2scratch/images/en/upload_dialog.png differ
diff --git a/ml2scratch/images/en/webcam.png b/ml2scratch/images/en/webcam.png
new file mode 100644
index 0000000000000000000000000000000000000000..f6ac3287e8a61129b190d9414c400350cbd92e4d
Binary files /dev/null and b/ml2scratch/images/en/webcam.png differ
diff --git a/ml2scratch/images/ja/check_blocks.png b/ml2scratch/images/ja/check_blocks.png
new file mode 100644
index 0000000000000000000000000000000000000000..11b292d755c99f63b538fc745187b58634531996
Binary files /dev/null and b/ml2scratch/images/ja/check_blocks.png differ
diff --git a/ml2scratch/images/ja/download.png b/ml2scratch/images/ja/download.png
new file mode 100644
index 0000000000000000000000000000000000000000..de5284b87c68bfa3a98d39f3f9917ae96518af1d
Binary files /dev/null and b/ml2scratch/images/ja/download.png differ
diff --git a/ml2scratch/images/ja/load_project.png b/ml2scratch/images/ja/load_project.png
new file mode 100644
index 0000000000000000000000000000000000000000..fc1906b5575379db58255a79520d1354685dc345
Binary files /dev/null and b/ml2scratch/images/ja/load_project.png differ
diff --git a/ml2scratch/images/ja/ml2scratch.gif b/ml2scratch/images/ja/ml2scratch.gif
new file mode 100644
index 0000000000000000000000000000000000000000..430fc0c1fd855949cf9a3a7b69ea8284c3f8aabc
--- /dev/null
+++ b/ml2scratch/images/ja/ml2scratch.gif
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0cc24e99ca7c22737ce1a7a27370951489abf1b860dc6a25553d77a5ff07a7c7
+size 8540606
diff --git a/ml2scratch/images/ja/ml2scratch.png b/ml2scratch/images/ja/ml2scratch.png
new file mode 100644
index 0000000000000000000000000000000000000000..889d0619fea142d76f0a0e7efaa2fb1d261adfc3
Binary files /dev/null and b/ml2scratch/images/ja/ml2scratch.png differ
diff --git a/ml2scratch/images/ja/save_project.png b/ml2scratch/images/ja/save_project.png
new file mode 100644
index 0000000000000000000000000000000000000000..b05a39f148e7fbd53347883b34dc03896c380d41
Binary files /dev/null and b/ml2scratch/images/ja/save_project.png differ
diff --git a/ml2scratch/images/ja/stage.png b/ml2scratch/images/ja/stage.png
new file mode 100644
index 0000000000000000000000000000000000000000..687021dd9d3b6c33ab8b7bcde7a35ffb17169ace
Binary files /dev/null and b/ml2scratch/images/ja/stage.png differ
diff --git a/ml2scratch/images/ja/upload.png b/ml2scratch/images/ja/upload.png
new file mode 100644
index 0000000000000000000000000000000000000000..559b78106ad33cbc878b1c5b3ae8856e8fefdcc7
Binary files /dev/null and b/ml2scratch/images/ja/upload.png differ
diff --git a/ml2scratch/images/ja/upload_dialog.png b/ml2scratch/images/ja/upload_dialog.png
new file mode 100644
index 0000000000000000000000000000000000000000..4471397a4307e02bc877982ad296848890d733b9
Binary files /dev/null and b/ml2scratch/images/ja/upload_dialog.png differ
diff --git a/ml2scratch/images/ja/webcam.png b/ml2scratch/images/ja/webcam.png
new file mode 100644
index 0000000000000000000000000000000000000000..2e337edf6d84b5bc4b02b6d7e65cbd8b4e92d660
Binary files /dev/null and b/ml2scratch/images/ja/webcam.png differ
diff --git a/ml2scratch/images/ml2scratch.png b/ml2scratch/images/ml2scratch.png
new file mode 100644
index 0000000000000000000000000000000000000000..104149d6c82cc254ad86a672738762aa2e361511
--- /dev/null
+++ b/ml2scratch/images/ml2scratch.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:410646f504340b2547587046cc6f11dd60506387bb6fdb6fcb1aeebb524ee862
+size 4812313
diff --git a/ml2scratch/images/old/en/1.png b/ml2scratch/images/old/en/1.png
new file mode 100644
index 0000000000000000000000000000000000000000..752bfdd389490853aa837a2eb927717f201576b4
Binary files /dev/null and b/ml2scratch/images/old/en/1.png differ
diff --git a/ml2scratch/images/old/en/5.png b/ml2scratch/images/old/en/5.png
new file mode 100644
index 0000000000000000000000000000000000000000..270a5ad689f0be04421189b734712efc2d62eeda
Binary files /dev/null and b/ml2scratch/images/old/en/5.png differ
diff --git a/ml2scratch/images/old/en/8.png b/ml2scratch/images/old/en/8.png
new file mode 100644
index 0000000000000000000000000000000000000000..dbce60e7690eef5f8e2d4a3a64f3b2bf4feaa1b4
Binary files /dev/null and b/ml2scratch/images/old/en/8.png differ
diff --git a/ml2scratch/images/old/en/add_extension.png b/ml2scratch/images/old/en/add_extension.png
new file mode 100644
index 0000000000000000000000000000000000000000..cbe3114da28816ea99bac6a2ca95f2dba8cc25a9
Binary files /dev/null and b/ml2scratch/images/old/en/add_extension.png differ
diff --git a/ml2scratch/images/old/en/after_training_0.png b/ml2scratch/images/old/en/after_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..0449693d65d6c8a101b9e6760037edb7ff267f73
Binary files /dev/null and b/ml2scratch/images/old/en/after_training_0.png differ
diff --git a/ml2scratch/images/old/en/after_training_1.png b/ml2scratch/images/old/en/after_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..11fa5daeb7a84c9c0e8af1ab452ac329ef00529b
Binary files /dev/null and b/ml2scratch/images/old/en/after_training_1.png differ
diff --git a/ml2scratch/images/old/en/before_training_0.png b/ml2scratch/images/old/en/before_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..b9888d81e75e318c59948e89e00e864fbf69e94d
Binary files /dev/null and b/ml2scratch/images/old/en/before_training_0.png differ
diff --git a/ml2scratch/images/old/en/before_training_1.png b/ml2scratch/images/old/en/before_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..b1b14c28b762e05dcba1840177a1db85f91d5772
Binary files /dev/null and b/ml2scratch/images/old/en/before_training_1.png differ
diff --git a/ml2scratch/images/old/en/connect.png b/ml2scratch/images/old/en/connect.png
new file mode 100644
index 0000000000000000000000000000000000000000..134b0c30a08641c80b361bf27c2263aef768f828
Binary files /dev/null and b/ml2scratch/images/old/en/connect.png differ
diff --git a/ml2scratch/images/old/en/connect_block.png b/ml2scratch/images/old/en/connect_block.png
new file mode 100644
index 0000000000000000000000000000000000000000..07dd2964a703fd7d236cbae5c8bcc16bfc1ae858
Binary files /dev/null and b/ml2scratch/images/old/en/connect_block.png differ
diff --git a/ml2scratch/images/old/en/download.png b/ml2scratch/images/old/en/download.png
new file mode 100644
index 0000000000000000000000000000000000000000..96024bd2df75cacb32c47f9c3b44c0a47ba105d6
Binary files /dev/null and b/ml2scratch/images/old/en/download.png differ
diff --git a/ml2scratch/images/old/en/gesture.png b/ml2scratch/images/old/en/gesture.png
new file mode 100644
index 0000000000000000000000000000000000000000..e8e9ba8f47ac3e8d9dadaabc0e91c7a7f7ab4eee
Binary files /dev/null and b/ml2scratch/images/old/en/gesture.png differ
diff --git a/ml2scratch/images/old/en/ml2scratch_extension.png b/ml2scratch/images/old/en/ml2scratch_extension.png
new file mode 100644
index 0000000000000000000000000000000000000000..4d1ab6812caf40867ee6e198fa30b2ac220f8854
Binary files /dev/null and b/ml2scratch/images/old/en/ml2scratch_extension.png differ
diff --git a/ml2scratch/images/old/en/ml2scratch_extension_added.png b/ml2scratch/images/old/en/ml2scratch_extension_added.png
new file mode 100644
index 0000000000000000000000000000000000000000..d0268c4e1661f78f0b474d3d32ba584cb27414cb
Binary files /dev/null and b/ml2scratch/images/old/en/ml2scratch_extension_added.png differ
diff --git a/ml2scratch/images/old/en/neutral.png b/ml2scratch/images/old/en/neutral.png
new file mode 100644
index 0000000000000000000000000000000000000000..220259b4164989342a0cb0aa65878ad6fac290c1
Binary files /dev/null and b/ml2scratch/images/old/en/neutral.png differ
diff --git a/ml2scratch/images/old/en/open_extension_url.png b/ml2scratch/images/old/en/open_extension_url.png
new file mode 100644
index 0000000000000000000000000000000000000000..4c2205226fee480880e8dfc27ae093e0cfe4b45d
Binary files /dev/null and b/ml2scratch/images/old/en/open_extension_url.png differ
diff --git a/ml2scratch/images/old/en/original/1.png b/ml2scratch/images/old/en/original/1.png
new file mode 100644
index 0000000000000000000000000000000000000000..19d73b07981445123ccf8be55013f0b710a97e53
Binary files /dev/null and b/ml2scratch/images/old/en/original/1.png differ
diff --git a/ml2scratch/images/old/en/original/5.png b/ml2scratch/images/old/en/original/5.png
new file mode 100644
index 0000000000000000000000000000000000000000..82087be0382604b8b42ee5ca0abd7141fb18b60a
Binary files /dev/null and b/ml2scratch/images/old/en/original/5.png differ
diff --git a/ml2scratch/images/old/en/original/6.png b/ml2scratch/images/old/en/original/6.png
new file mode 100644
index 0000000000000000000000000000000000000000..085192681216c962d4a253c05b042ee0335079ea
Binary files /dev/null and b/ml2scratch/images/old/en/original/6.png differ
diff --git a/ml2scratch/images/old/en/original/7.png b/ml2scratch/images/old/en/original/7.png
new file mode 100644
index 0000000000000000000000000000000000000000..96330614ac7004785cb3feb48c7d6e90759bead3
--- /dev/null
+++ b/ml2scratch/images/old/en/original/7.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:67bc612b65e5ef360dfb02708f9ebb44e532f4f65de97e268abd392c8156a9e7
+size 259240
diff --git a/ml2scratch/images/old/en/original/8.png b/ml2scratch/images/old/en/original/8.png
new file mode 100644
index 0000000000000000000000000000000000000000..1c3db3d8641936229897d8a35ab0bb6b4da42ba6
--- /dev/null
+++ b/ml2scratch/images/old/en/original/8.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1cf23b2fe2893ec8206eccd29e307ce9c4ea15f6ce19de862932edb33863d534
+size 264025
diff --git a/ml2scratch/images/old/en/original/after_training_0.png b/ml2scratch/images/old/en/original/after_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..5b98cc535f76f4761df550574d06b64a1449375b
Binary files /dev/null and b/ml2scratch/images/old/en/original/after_training_0.png differ
diff --git a/ml2scratch/images/old/en/original/after_training_1.png b/ml2scratch/images/old/en/original/after_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..17962580451f3423bf55f180e3d8908e9fd3079c
Binary files /dev/null and b/ml2scratch/images/old/en/original/after_training_1.png differ
diff --git a/ml2scratch/images/old/en/original/before_training_0.png b/ml2scratch/images/old/en/original/before_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..aa07bf1c920a1786ff644f2727833e0f9753ffa6
Binary files /dev/null and b/ml2scratch/images/old/en/original/before_training_0.png differ
diff --git a/ml2scratch/images/old/en/original/before_training_1.png b/ml2scratch/images/old/en/original/before_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..bbae84f15c0471db046c1f2cd3130ec6d08dccfc
Binary files /dev/null and b/ml2scratch/images/old/en/original/before_training_1.png differ
diff --git a/ml2scratch/images/old/en/original/connect.png b/ml2scratch/images/old/en/original/connect.png
new file mode 100644
index 0000000000000000000000000000000000000000..2b5f3daf0ee3f0adac3697f7c3826dc8ce55e950
Binary files /dev/null and b/ml2scratch/images/old/en/original/connect.png differ
diff --git a/ml2scratch/images/old/en/original/connect_block.png b/ml2scratch/images/old/en/original/connect_block.png
new file mode 100644
index 0000000000000000000000000000000000000000..07dd2964a703fd7d236cbae5c8bcc16bfc1ae858
Binary files /dev/null and b/ml2scratch/images/old/en/original/connect_block.png differ
diff --git a/ml2scratch/images/old/en/original/gesture.png b/ml2scratch/images/old/en/original/gesture.png
new file mode 100644
index 0000000000000000000000000000000000000000..e8e9ba8f47ac3e8d9dadaabc0e91c7a7f7ab4eee
Binary files /dev/null and b/ml2scratch/images/old/en/original/gesture.png differ
diff --git a/ml2scratch/images/old/en/original/neutral.png b/ml2scratch/images/old/en/original/neutral.png
new file mode 100644
index 0000000000000000000000000000000000000000..220259b4164989342a0cb0aa65878ad6fac290c1
Binary files /dev/null and b/ml2scratch/images/old/en/original/neutral.png differ
diff --git a/ml2scratch/images/old/en/original/open_extension_url.png b/ml2scratch/images/old/en/original/open_extension_url.png
new file mode 100644
index 0000000000000000000000000000000000000000..d799f4ccee22993b7ca21836c8cacde97dfdf905
Binary files /dev/null and b/ml2scratch/images/old/en/original/open_extension_url.png differ
diff --git a/ml2scratch/images/old/en/original/reset.png b/ml2scratch/images/old/en/original/reset.png
new file mode 100644
index 0000000000000000000000000000000000000000..f393ed018933c2e122ec66ac07671764103bd679
Binary files /dev/null and b/ml2scratch/images/old/en/original/reset.png differ
diff --git a/ml2scratch/images/old/en/original/reset_all.png b/ml2scratch/images/old/en/original/reset_all.png
new file mode 100644
index 0000000000000000000000000000000000000000..9f20a8db0057df9ca896cfbe1f4d791cd08ad770
Binary files /dev/null and b/ml2scratch/images/old/en/original/reset_all.png differ
diff --git a/ml2scratch/images/old/en/original/scratchx.png b/ml2scratch/images/old/en/original/scratchx.png
new file mode 100644
index 0000000000000000000000000000000000000000..2b5f3daf0ee3f0adac3697f7c3826dc8ce55e950
Binary files /dev/null and b/ml2scratch/images/old/en/original/scratchx.png differ
diff --git a/ml2scratch/images/old/en/original/scratchx_main.png b/ml2scratch/images/old/en/original/scratchx_main.png
new file mode 100644
index 0000000000000000000000000000000000000000..2f1dbff41874a945343e8e1eb7d00d4282e9c72a
--- /dev/null
+++ b/ml2scratch/images/old/en/original/scratchx_main.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:34dbab235b38734ab79863cccaaa6726392da539ce01ab4da6bae5f5af55769d
+size 309206
diff --git a/ml2scratch/images/old/en/original/scratchx_top.png b/ml2scratch/images/old/en/original/scratchx_top.png
new file mode 100644
index 0000000000000000000000000000000000000000..07d584f6c0b689099fd2d9566c91ceb598433180
--- /dev/null
+++ b/ml2scratch/images/old/en/original/scratchx_top.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aba491d497397e38b8787dc4a75e456b4cb859410e0e99bdadbb1f1023b1d6d1
+size 629265
diff --git a/ml2scratch/images/old/en/original/warning.png b/ml2scratch/images/old/en/original/warning.png
new file mode 100644
index 0000000000000000000000000000000000000000..75a20fe872de1efb71949eb7444d37d04a3f9997
Binary files /dev/null and b/ml2scratch/images/old/en/original/warning.png differ
diff --git a/ml2scratch/images/old/en/play_sound.png b/ml2scratch/images/old/en/play_sound.png
new file mode 100644
index 0000000000000000000000000000000000000000..6c8874de3713be6cf04f8bdb885ac4277f97069d
Binary files /dev/null and b/ml2scratch/images/old/en/play_sound.png differ
diff --git a/ml2scratch/images/old/en/reset.png b/ml2scratch/images/old/en/reset.png
new file mode 100644
index 0000000000000000000000000000000000000000..f393ed018933c2e122ec66ac07671764103bd679
Binary files /dev/null and b/ml2scratch/images/old/en/reset.png differ
diff --git a/ml2scratch/images/old/en/reset_all.png b/ml2scratch/images/old/en/reset_all.png
new file mode 100644
index 0000000000000000000000000000000000000000..541f7c9b3e72c031faafa847a7d616eaaca241e1
Binary files /dev/null and b/ml2scratch/images/old/en/reset_all.png differ
diff --git a/ml2scratch/images/old/en/scratch.png b/ml2scratch/images/old/en/scratch.png
new file mode 100644
index 0000000000000000000000000000000000000000..4dd258fa30e25456700d27aecc87b9956db2790a
Binary files /dev/null and b/ml2scratch/images/old/en/scratch.png differ
diff --git a/ml2scratch/images/old/en/scratch3_connect_block.png b/ml2scratch/images/old/en/scratch3_connect_block.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcea7f95af1c31ec4b2a383a94983abbd16efd1e
Binary files /dev/null and b/ml2scratch/images/old/en/scratch3_connect_block.png differ
diff --git a/ml2scratch/images/old/en/scratch3_play_sound.png b/ml2scratch/images/old/en/scratch3_play_sound.png
new file mode 100644
index 0000000000000000000000000000000000000000..c0ccf7e9dcfc2b51f0749977952d2d07ea896b4e
Binary files /dev/null and b/ml2scratch/images/old/en/scratch3_play_sound.png differ
diff --git a/ml2scratch/images/old/en/scratchx.png b/ml2scratch/images/old/en/scratchx.png
new file mode 100644
index 0000000000000000000000000000000000000000..7f6b2ccb5d8ef14d9227b5b5a89d0d02b9371fa7
Binary files /dev/null and b/ml2scratch/images/old/en/scratchx.png differ
diff --git a/ml2scratch/images/old/en/scratchx_main.png b/ml2scratch/images/old/en/scratchx_main.png
new file mode 100644
index 0000000000000000000000000000000000000000..d9182e19241405616e5b60586fa42af0421ace7b
Binary files /dev/null and b/ml2scratch/images/old/en/scratchx_main.png differ
diff --git a/ml2scratch/images/old/en/scratchx_top.png b/ml2scratch/images/old/en/scratchx_top.png
new file mode 100644
index 0000000000000000000000000000000000000000..de8d8cbddd5c911da9a82c425317120bc1b38173
Binary files /dev/null and b/ml2scratch/images/old/en/scratchx_top.png differ
diff --git a/ml2scratch/images/old/en/upload.png b/ml2scratch/images/old/en/upload.png
new file mode 100644
index 0000000000000000000000000000000000000000..76d921fe82cc4520046263a09376f78582ad4c50
Binary files /dev/null and b/ml2scratch/images/old/en/upload.png differ
diff --git a/ml2scratch/images/old/en/warning.png b/ml2scratch/images/old/en/warning.png
new file mode 100644
index 0000000000000000000000000000000000000000..3a128f9b14bd4e5cd5d8fe34d6cf92aa3cdfb080
Binary files /dev/null and b/ml2scratch/images/old/en/warning.png differ
diff --git a/ml2scratch/images/old/en/windows.png b/ml2scratch/images/old/en/windows.png
new file mode 100644
index 0000000000000000000000000000000000000000..6940816135cda4d1d825aa0593d2e60e6f89c60f
--- /dev/null
+++ b/ml2scratch/images/old/en/windows.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:756b8ec338143af0f8bf37a972426637d7a944ebede85456d44a49af73ab9c59
+size 123415
diff --git a/ml2scratch/images/old/ja/1.png b/ml2scratch/images/old/ja/1.png
new file mode 100644
index 0000000000000000000000000000000000000000..8975b08be166947e47f1fe1a8d27ae944a436f69
Binary files /dev/null and b/ml2scratch/images/old/ja/1.png differ
diff --git a/ml2scratch/images/old/ja/5.png b/ml2scratch/images/old/ja/5.png
new file mode 100644
index 0000000000000000000000000000000000000000..ad0b6519969f2010731de7f722dfe660552548d8
Binary files /dev/null and b/ml2scratch/images/old/ja/5.png differ
diff --git a/ml2scratch/images/old/ja/6.png b/ml2scratch/images/old/ja/6.png
new file mode 100644
index 0000000000000000000000000000000000000000..0a67c82e0cc6292263375b70cb9a65b5104aecf8
Binary files /dev/null and b/ml2scratch/images/old/ja/6.png differ
diff --git a/ml2scratch/images/old/ja/7.png b/ml2scratch/images/old/ja/7.png
new file mode 100644
index 0000000000000000000000000000000000000000..ea3c59110de2474352ba617ae6310da6658bcf54
Binary files /dev/null and b/ml2scratch/images/old/ja/7.png differ
diff --git a/ml2scratch/images/old/ja/8.png b/ml2scratch/images/old/ja/8.png
new file mode 100644
index 0000000000000000000000000000000000000000..57cd3dc36320979deef7d01b044a0137fd1a5220
Binary files /dev/null and b/ml2scratch/images/old/ja/8.png differ
diff --git a/ml2scratch/images/old/ja/add_extension.png b/ml2scratch/images/old/ja/add_extension.png
new file mode 100644
index 0000000000000000000000000000000000000000..73017bee4197187b1d19bd348ae2645eee2166e0
Binary files /dev/null and b/ml2scratch/images/old/ja/add_extension.png differ
diff --git a/ml2scratch/images/old/ja/after_training_0.png b/ml2scratch/images/old/ja/after_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..a5fc737bc1dfeef6b51895809caf44a857b94a5e
Binary files /dev/null and b/ml2scratch/images/old/ja/after_training_0.png differ
diff --git a/ml2scratch/images/old/ja/after_training_1.png b/ml2scratch/images/old/ja/after_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..7001dc96bf572150fc3580866b12d19e5d4ae1bb
Binary files /dev/null and b/ml2scratch/images/old/ja/after_training_1.png differ
diff --git a/ml2scratch/images/old/ja/before_training_0.png b/ml2scratch/images/old/ja/before_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..8b1c6b3eaf6759589e05379efd60015d193e91b9
Binary files /dev/null and b/ml2scratch/images/old/ja/before_training_0.png differ
diff --git a/ml2scratch/images/old/ja/before_training_1.png b/ml2scratch/images/old/ja/before_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..b106eb8fad5ae2418c7debbc40786cdf9a90ad3f
Binary files /dev/null and b/ml2scratch/images/old/ja/before_training_1.png differ
diff --git a/ml2scratch/images/old/ja/connect.png b/ml2scratch/images/old/ja/connect.png
new file mode 100644
index 0000000000000000000000000000000000000000..8a2daf1233c1294ddc7aba64a20b87ba3c44a095
Binary files /dev/null and b/ml2scratch/images/old/ja/connect.png differ
diff --git a/ml2scratch/images/old/ja/download.png b/ml2scratch/images/old/ja/download.png
new file mode 100644
index 0000000000000000000000000000000000000000..9f3918650c94e3f1f8ef54423c3dd70b16ad7e6b
Binary files /dev/null and b/ml2scratch/images/old/ja/download.png differ
diff --git a/ml2scratch/images/old/ja/ml2scratch_extension.png b/ml2scratch/images/old/ja/ml2scratch_extension.png
new file mode 100644
index 0000000000000000000000000000000000000000..a261b1a6d137ce649c47c2822af31c1b3a914235
Binary files /dev/null and b/ml2scratch/images/old/ja/ml2scratch_extension.png differ
diff --git a/ml2scratch/images/old/ja/ml2scratch_extension_added.png b/ml2scratch/images/old/ja/ml2scratch_extension_added.png
new file mode 100644
index 0000000000000000000000000000000000000000..bfc7ab48c58ff39a33417feaffe3793458184254
Binary files /dev/null and b/ml2scratch/images/old/ja/ml2scratch_extension_added.png differ
diff --git a/ml2scratch/images/old/ja/original/1.png b/ml2scratch/images/old/ja/original/1.png
new file mode 100644
index 0000000000000000000000000000000000000000..8073487679356ef3fe638b1561f2690de4824739
Binary files /dev/null and b/ml2scratch/images/old/ja/original/1.png differ
diff --git a/ml2scratch/images/old/ja/original/5.png b/ml2scratch/images/old/ja/original/5.png
new file mode 100644
index 0000000000000000000000000000000000000000..0ef4510fec6d938598200d3b023b477dfe759059
Binary files /dev/null and b/ml2scratch/images/old/ja/original/5.png differ
diff --git a/ml2scratch/images/old/ja/original/6.png b/ml2scratch/images/old/ja/original/6.png
new file mode 100644
index 0000000000000000000000000000000000000000..e0e1377642ecb22041c7464bcc0c4f69f6ff650a
Binary files /dev/null and b/ml2scratch/images/old/ja/original/6.png differ
diff --git a/ml2scratch/images/old/ja/original/7.png b/ml2scratch/images/old/ja/original/7.png
new file mode 100644
index 0000000000000000000000000000000000000000..ea39a055287ed97f39934c126a16d42970c08601
--- /dev/null
+++ b/ml2scratch/images/old/ja/original/7.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3c4240cb77ad4c35748fde42ddeed8098498e270d74b1b2dd6973fa5912f0e36
+size 275903
diff --git a/ml2scratch/images/old/ja/original/8.png b/ml2scratch/images/old/ja/original/8.png
new file mode 100644
index 0000000000000000000000000000000000000000..31dea0bda15b2c8dee6e50d09addde15d0248f84
--- /dev/null
+++ b/ml2scratch/images/old/ja/original/8.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:25b25a6f0ab311f31bf14db98e60cbeeeaf3958e5de7ae8a07ac6d3df4d6cb51
+size 283044
diff --git a/ml2scratch/images/old/ja/reset.png b/ml2scratch/images/old/ja/reset.png
new file mode 100644
index 0000000000000000000000000000000000000000..7bf239da6977f1ae555ddc9bd16a5433220d2a2f
Binary files /dev/null and b/ml2scratch/images/old/ja/reset.png differ
diff --git a/ml2scratch/images/old/ja/reset_all.png b/ml2scratch/images/old/ja/reset_all.png
new file mode 100644
index 0000000000000000000000000000000000000000..5e8748b70dba51d3640c6da6f599d38bff184663
Binary files /dev/null and b/ml2scratch/images/old/ja/reset_all.png differ
diff --git a/ml2scratch/images/old/ja/scratch.png b/ml2scratch/images/old/ja/scratch.png
new file mode 100644
index 0000000000000000000000000000000000000000..3249a6947a3122466d44267e1865c82497e1c06b
Binary files /dev/null and b/ml2scratch/images/old/ja/scratch.png differ
diff --git a/ml2scratch/images/old/ja/scratch3_connect_block.png b/ml2scratch/images/old/ja/scratch3_connect_block.png
new file mode 100644
index 0000000000000000000000000000000000000000..cf13816374d99e9cbd448e6458e407c442a8be10
Binary files /dev/null and b/ml2scratch/images/old/ja/scratch3_connect_block.png differ
diff --git a/ml2scratch/images/old/ja/scratch3_play_sound.png b/ml2scratch/images/old/ja/scratch3_play_sound.png
new file mode 100644
index 0000000000000000000000000000000000000000..b1c62712fa621cf944ebbc71cc4ddc246504d793
Binary files /dev/null and b/ml2scratch/images/old/ja/scratch3_play_sound.png differ
diff --git a/ml2scratch/images/old/ja/upload.png b/ml2scratch/images/old/ja/upload.png
new file mode 100644
index 0000000000000000000000000000000000000000..53ee4b0160f6594a1364e3e1f68f63b754c5f52a
Binary files /dev/null and b/ml2scratch/images/old/ja/upload.png differ
diff --git a/ml2scratch/images/old/ja/windows.png b/ml2scratch/images/old/ja/windows.png
new file mode 100644
index 0000000000000000000000000000000000000000..6940816135cda4d1d825aa0593d2e60e6f89c60f
--- /dev/null
+++ b/ml2scratch/images/old/ja/windows.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:756b8ec338143af0f8bf37a972426637d7a944ebede85456d44a49af73ab9c59
+size 123415
diff --git a/ml2scratch/images/old/zh-cn/add_extension.png b/ml2scratch/images/old/zh-cn/add_extension.png
new file mode 100644
index 0000000000000000000000000000000000000000..d22a991ac9ca7834b9e2f6d8d79a8c5875ded337
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/add_extension.png differ
diff --git a/ml2scratch/images/old/zh-cn/after_training_0.png b/ml2scratch/images/old/zh-cn/after_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..046ccd764f3be3242dbda366ea4f256cd7655b30
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/after_training_0.png differ
diff --git a/ml2scratch/images/old/zh-cn/after_training_1.png b/ml2scratch/images/old/zh-cn/after_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..9e4e96f9222938ed8f8ca9f0b041177211f5a9d5
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/after_training_1.png differ
diff --git a/ml2scratch/images/old/zh-cn/before_training_0.png b/ml2scratch/images/old/zh-cn/before_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..09a7b81c99a5541d63f6643c34ee9b60e1903df8
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/before_training_0.png differ
diff --git a/ml2scratch/images/old/zh-cn/before_training_1.png b/ml2scratch/images/old/zh-cn/before_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..f3c1a3a92311b1babc8ac96d51cd38cbe8a6f67f
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/before_training_1.png differ
diff --git a/ml2scratch/images/old/zh-cn/connect.png b/ml2scratch/images/old/zh-cn/connect.png
new file mode 100644
index 0000000000000000000000000000000000000000..d1914aaad419013848ca62506e7a8d2ad3a1a811
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/connect.png differ
diff --git a/ml2scratch/images/old/zh-cn/download.png b/ml2scratch/images/old/zh-cn/download.png
new file mode 100644
index 0000000000000000000000000000000000000000..ff76fdb7049901868fb22c065ac762e56809ab20
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/download.png differ
diff --git a/ml2scratch/images/old/zh-cn/ml2scratch_extension_added.png b/ml2scratch/images/old/zh-cn/ml2scratch_extension_added.png
new file mode 100644
index 0000000000000000000000000000000000000000..07a9abeb9a51447f08cafd004c78acc517165f89
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/ml2scratch_extension_added.png differ
diff --git a/ml2scratch/images/old/zh-cn/reset.png b/ml2scratch/images/old/zh-cn/reset.png
new file mode 100644
index 0000000000000000000000000000000000000000..4b66ca61c6a59440110308c6505e6b0766f74be0
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/reset.png differ
diff --git a/ml2scratch/images/old/zh-cn/reset_all.png b/ml2scratch/images/old/zh-cn/reset_all.png
new file mode 100644
index 0000000000000000000000000000000000000000..c0aa2c04a6af0e447d6f1297645ec3422b16f7bb
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/reset_all.png differ
diff --git a/ml2scratch/images/old/zh-cn/scratch.png b/ml2scratch/images/old/zh-cn/scratch.png
new file mode 100644
index 0000000000000000000000000000000000000000..64b6f79e79fe23c412281767b4fd7a811c1d3a1c
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/scratch.png differ
diff --git a/ml2scratch/images/old/zh-cn/scratch3_connect_block.png b/ml2scratch/images/old/zh-cn/scratch3_connect_block.png
new file mode 100644
index 0000000000000000000000000000000000000000..8bb5887a63b7c43f95b9f77f21ca6f54e45313a5
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/scratch3_connect_block.png differ
diff --git a/ml2scratch/images/old/zh-cn/scratch3_play_sound.png b/ml2scratch/images/old/zh-cn/scratch3_play_sound.png
new file mode 100644
index 0000000000000000000000000000000000000000..3364cc1fc472c215fce94e70aa46dde1fd5a49fe
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/scratch3_play_sound.png differ
diff --git a/ml2scratch/images/old/zh-cn/upload.png b/ml2scratch/images/old/zh-cn/upload.png
new file mode 100644
index 0000000000000000000000000000000000000000..743869dba41f034921cfbaf1cf6350df72e88fbe
Binary files /dev/null and b/ml2scratch/images/old/zh-cn/upload.png differ
diff --git a/ml2scratch/images/old/zh-cn/windows.png b/ml2scratch/images/old/zh-cn/windows.png
new file mode 100644
index 0000000000000000000000000000000000000000..6940816135cda4d1d825aa0593d2e60e6f89c60f
--- /dev/null
+++ b/ml2scratch/images/old/zh-cn/windows.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:756b8ec338143af0f8bf37a972426637d7a944ebede85456d44a49af73ab9c59
+size 123415
diff --git a/ml2scratch/images/qrcode.png b/ml2scratch/images/qrcode.png
new file mode 100644
index 0000000000000000000000000000000000000000..e3aefd182016687f1b280f19540b52a307a815fa
Binary files /dev/null and b/ml2scratch/images/qrcode.png differ
diff --git a/ml2scratch/images/twitter.png b/ml2scratch/images/twitter.png
new file mode 100644
index 0000000000000000000000000000000000000000..c1463b7998d635b401e6708d0da86beaaaca41d5
Binary files /dev/null and b/ml2scratch/images/twitter.png differ
diff --git a/ml2scratch/images/wechat.jpg b/ml2scratch/images/wechat.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..27abfc4b3dbc77df4eb3dd47721f66162106d5c4
Binary files /dev/null and b/ml2scratch/images/wechat.jpg differ
diff --git a/ml2scratch/images/zh-cn/add_extension.png b/ml2scratch/images/zh-cn/add_extension.png
new file mode 100644
index 0000000000000000000000000000000000000000..d22a991ac9ca7834b9e2f6d8d79a8c5875ded337
Binary files /dev/null and b/ml2scratch/images/zh-cn/add_extension.png differ
diff --git a/ml2scratch/images/zh-cn/after_training_0.png b/ml2scratch/images/zh-cn/after_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..046ccd764f3be3242dbda366ea4f256cd7655b30
Binary files /dev/null and b/ml2scratch/images/zh-cn/after_training_0.png differ
diff --git a/ml2scratch/images/zh-cn/after_training_1.png b/ml2scratch/images/zh-cn/after_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..9e4e96f9222938ed8f8ca9f0b041177211f5a9d5
Binary files /dev/null and b/ml2scratch/images/zh-cn/after_training_1.png differ
diff --git a/ml2scratch/images/zh-cn/before_training_0.png b/ml2scratch/images/zh-cn/before_training_0.png
new file mode 100644
index 0000000000000000000000000000000000000000..09a7b81c99a5541d63f6643c34ee9b60e1903df8
Binary files /dev/null and b/ml2scratch/images/zh-cn/before_training_0.png differ
diff --git a/ml2scratch/images/zh-cn/before_training_1.png b/ml2scratch/images/zh-cn/before_training_1.png
new file mode 100644
index 0000000000000000000000000000000000000000..f3c1a3a92311b1babc8ac96d51cd38cbe8a6f67f
Binary files /dev/null and b/ml2scratch/images/zh-cn/before_training_1.png differ
diff --git a/ml2scratch/images/zh-cn/check_blocks.png b/ml2scratch/images/zh-cn/check_blocks.png
new file mode 100644
index 0000000000000000000000000000000000000000..b8600c7e60a3f69c12a8a520c3411615b3e88fd7
Binary files /dev/null and b/ml2scratch/images/zh-cn/check_blocks.png differ
diff --git a/ml2scratch/images/zh-cn/connect.png b/ml2scratch/images/zh-cn/connect.png
new file mode 100644
index 0000000000000000000000000000000000000000..d1914aaad419013848ca62506e7a8d2ad3a1a811
Binary files /dev/null and b/ml2scratch/images/zh-cn/connect.png differ
diff --git a/ml2scratch/images/zh-cn/download.png b/ml2scratch/images/zh-cn/download.png
new file mode 100644
index 0000000000000000000000000000000000000000..ff76fdb7049901868fb22c065ac762e56809ab20
Binary files /dev/null and b/ml2scratch/images/zh-cn/download.png differ
diff --git a/ml2scratch/images/zh-cn/ml2scratch.png b/ml2scratch/images/zh-cn/ml2scratch.png
new file mode 100644
index 0000000000000000000000000000000000000000..a898d029821c5abaafd395a09c7b327ab3e0d435
Binary files /dev/null and b/ml2scratch/images/zh-cn/ml2scratch.png differ
diff --git a/ml2scratch/images/zh-cn/ml2scratch_extension_added.png b/ml2scratch/images/zh-cn/ml2scratch_extension_added.png
new file mode 100644
index 0000000000000000000000000000000000000000..07a9abeb9a51447f08cafd004c78acc517165f89
Binary files /dev/null and b/ml2scratch/images/zh-cn/ml2scratch_extension_added.png differ
diff --git a/ml2scratch/images/zh-cn/reset.png b/ml2scratch/images/zh-cn/reset.png
new file mode 100644
index 0000000000000000000000000000000000000000..4b66ca61c6a59440110308c6505e6b0766f74be0
Binary files /dev/null and b/ml2scratch/images/zh-cn/reset.png differ
diff --git a/ml2scratch/images/zh-cn/reset_all.png b/ml2scratch/images/zh-cn/reset_all.png
new file mode 100644
index 0000000000000000000000000000000000000000..c0aa2c04a6af0e447d6f1297645ec3422b16f7bb
Binary files /dev/null and b/ml2scratch/images/zh-cn/reset_all.png differ
diff --git a/ml2scratch/images/zh-cn/scratch.png b/ml2scratch/images/zh-cn/scratch.png
new file mode 100644
index 0000000000000000000000000000000000000000..64b6f79e79fe23c412281767b4fd7a811c1d3a1c
Binary files /dev/null and b/ml2scratch/images/zh-cn/scratch.png differ
diff --git a/ml2scratch/images/zh-cn/scratch3_connect_block.png b/ml2scratch/images/zh-cn/scratch3_connect_block.png
new file mode 100644
index 0000000000000000000000000000000000000000..8bb5887a63b7c43f95b9f77f21ca6f54e45313a5
Binary files /dev/null and b/ml2scratch/images/zh-cn/scratch3_connect_block.png differ
diff --git a/ml2scratch/images/zh-cn/scratch3_play_sound.png b/ml2scratch/images/zh-cn/scratch3_play_sound.png
new file mode 100644
index 0000000000000000000000000000000000000000..3364cc1fc472c215fce94e70aa46dde1fd5a49fe
Binary files /dev/null and b/ml2scratch/images/zh-cn/scratch3_play_sound.png differ
diff --git a/ml2scratch/images/zh-cn/stage.png b/ml2scratch/images/zh-cn/stage.png
new file mode 100644
index 0000000000000000000000000000000000000000..358c55e3a9d3ffd7827d5908ecc6385be9397536
Binary files /dev/null and b/ml2scratch/images/zh-cn/stage.png differ
diff --git a/ml2scratch/images/zh-cn/upload.png b/ml2scratch/images/zh-cn/upload.png
new file mode 100644
index 0000000000000000000000000000000000000000..743869dba41f034921cfbaf1cf6350df72e88fbe
Binary files /dev/null and b/ml2scratch/images/zh-cn/upload.png differ
diff --git a/ml2scratch/images/zh-cn/webcam.png b/ml2scratch/images/zh-cn/webcam.png
new file mode 100644
index 0000000000000000000000000000000000000000..991e39b8136fa4d2c222b4e68e6a20980f4ededf
Binary files /dev/null and b/ml2scratch/images/zh-cn/webcam.png differ
diff --git a/ml2scratch/images/zh-cn/windows.png b/ml2scratch/images/zh-cn/windows.png
new file mode 100644
index 0000000000000000000000000000000000000000..6940816135cda4d1d825aa0593d2e60e6f89c60f
--- /dev/null
+++ b/ml2scratch/images/zh-cn/windows.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:756b8ec338143af0f8bf37a972426637d7a944ebede85456d44a49af73ab9c59
+size 123415
diff --git a/ml2scratch/install.sh b/ml2scratch/install.sh
new file mode 100644
index 0000000000000000000000000000000000000000..dfe72805c3f32d50be3d45bbf2936fa572437dec
--- /dev/null
+++ b/ml2scratch/install.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+LF=$(printf '\\\012_')
+LF=${LF%_}
+EXTENSION_NAME=ML2Scratch
+EXTENSION_ID=ml2scratch
+COLLABORATOR=champierre
+EXTENSION_DESCRIPTION="ML2Scratch Blocks."
+
+cd node_modules/scratch-vm
+npm install ml5@0.12.2
+cd ../../
+
+mkdir -p node_modules/scratch-vm/src/extensions/scratch3_${EXTENSION_ID}
+cp ${EXTENSION_ID}/scratch-vm/src/extensions/scratch3_${EXTENSION_ID}/index.js node_modules/scratch-vm/src/extensions/scratch3_${EXTENSION_ID}/
+mv node_modules/scratch-vm/src/extension-support/extension-manager.js node_modules/scratch-vm/src/extension-support/extension-manager.js_orig
+sed -e "s|class ExtensionManager {$|builtinExtensions['${EXTENSION_ID}'] = () => require('../extensions/scratch3_${EXTENSION_ID}');${LF}${LF}class ExtensionManager {|g" node_modules/scratch-vm/src/extension-support/extension-manager.js_orig > node_modules/scratch-vm/src/extension-support/extension-manager.js
+
+mkdir -p src/lib/libraries/extensions/${EXTENSION_ID}
+cp ${EXTENSION_ID}/scratch-gui/src/lib/libraries/extensions/${EXTENSION_ID}/${EXTENSION_ID}.png src/lib/libraries/extensions/${EXTENSION_ID}/
+cp ${EXTENSION_ID}/scratch-gui/src/lib/libraries/extensions/${EXTENSION_ID}/${EXTENSION_ID}-small.png src/lib/libraries/extensions/${EXTENSION_ID}/
+mv src/lib/libraries/extensions/index.jsx src/lib/libraries/extensions/index.jsx_orig
+DESCRIPTION="\
+ {${LF}\
+ name: '${EXTENSION_NAME}',${LF}\
+ extensionId: '${EXTENSION_ID}',${LF}\
+ collaborator: '${COLLABORATOR}',${LF}\
+ iconURL: ${EXTENSION_ID}IconURL,${LF}\
+ insetIconURL: ${EXTENSION_ID}InsetIconURL,${LF}\
+ description: (${LF}\
+ ${LF}\
+ ),${LF}\
+ featured: true,${LF}\
+ disabled: false,${LF}\
+ internetConnectionRequired: true,${LF}\
+ bluetoothRequired: false${LF}\
+ },"
+sed -e "s|^export default \[$|import ${EXTENSION_ID}IconURL from './${EXTENSION_ID}/${EXTENSION_ID}.png';${LF}import ${EXTENSION_ID}InsetIconURL from './ml2scratch/ml2scratch-small.png';${LF}${LF}export default [${LF}${DESCRIPTION}|g" src/lib/libraries/extensions/index.jsx_orig > src/lib/libraries/extensions/index.jsx
diff --git a/ml2scratch/old/app/images/bg-card-button-hover.png b/ml2scratch/old/app/images/bg-card-button-hover.png
new file mode 100644
index 0000000000000000000000000000000000000000..6de952f7e122778846c862c42726c15eccc5f069
Binary files /dev/null and b/ml2scratch/old/app/images/bg-card-button-hover.png differ
diff --git a/ml2scratch/old/app/images/bg-card-button.png b/ml2scratch/old/app/images/bg-card-button.png
new file mode 100644
index 0000000000000000000000000000000000000000..182927513574d1601503c505832ccad2d6c72bf9
Binary files /dev/null and b/ml2scratch/old/app/images/bg-card-button.png differ
diff --git a/ml2scratch/old/app/images/bg-card-top.png b/ml2scratch/old/app/images/bg-card-top.png
new file mode 100644
index 0000000000000000000000000000000000000000..15272069a86f03ea9ab987a22b4601a43ea46564
Binary files /dev/null and b/ml2scratch/old/app/images/bg-card-top.png differ
diff --git a/ml2scratch/old/app/images/bg-card.png b/ml2scratch/old/app/images/bg-card.png
new file mode 100644
index 0000000000000000000000000000000000000000..d35cc8b21b797717415a598c3d8e8a9d539e75c2
Binary files /dev/null and b/ml2scratch/old/app/images/bg-card.png differ
diff --git a/ml2scratch/old/app/images/bg-pattern.png b/ml2scratch/old/app/images/bg-pattern.png
new file mode 100644
index 0000000000000000000000000000000000000000..dbe1887777f3facd3f61348e4ae2d0d95efffd1a
Binary files /dev/null and b/ml2scratch/old/app/images/bg-pattern.png differ
diff --git a/ml2scratch/old/app/images/ja/scratch3_connect_block.png b/ml2scratch/old/app/images/ja/scratch3_connect_block.png
new file mode 100644
index 0000000000000000000000000000000000000000..fa9387de83fc563cd53fe4517b105c49180e3973
Binary files /dev/null and b/ml2scratch/old/app/images/ja/scratch3_connect_block.png differ
diff --git a/ml2scratch/old/app/javascripts/scripts.js b/ml2scratch/old/app/javascripts/scripts.js
new file mode 100644
index 0000000000000000000000000000000000000000..845fbb279bc7ec4fbffd3a1f86ae0382b3c6e3b0
--- /dev/null
+++ b/ml2scratch/old/app/javascripts/scripts.js
@@ -0,0 +1,488 @@
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import $ from 'jquery'
+import 'jquery.cookie';
+import 'bootstrap'
+import FileSaver from 'file-saver';
+
+// Number of classes to classify
+const NUM_CLASSES = 8;
+
+String.prototype.sprintf = function()
+{
+ let str = this + '';
+ const args = Array.prototype.slice.call(arguments);
+
+ let ph = true;
+ if (str.indexOf('%s', 0) != -1) {
+ ph = false;
+ }
+
+ if (args.length === 1) {
+ if (ph) {
+ return str.replace(/%1$s/g, args[0]);
+ } else {
+ return str.replace(/%s/g, args[0]);
+ }
+ } else {
+ for (let i=0; i 0) {
+ lang = vars['lang'];
+ }
+ if (lang == 'ja') {
+ return LOCALIZED_TEXT['ja'][key].sprintf(arg);
+ } else if (lang == 'zh_cn') {
+ return LOCALIZED_TEXT['zh_cn'][key].sprintf(arg);
+ }else {
+ return LOCALIZED_TEXT['en'][key].sprintf(arg);
+ }
+ }
+
+ static getUrlVars() {
+ let vars = [], max = 0, hash = "", array = "";
+ const url = window.location.search;
+
+ hash = url.slice(1).split('&');
+ max = hash.length;
+ for (let i = 0; i < max; i++) {
+ array = hash[i].split('=');
+ vars.push(array[0]);
+ vars[array[0]] = array[1];
+ }
+ return vars;
+ }
+}
+
+class Main {
+ constructor(){
+ // Initiate variables
+ this.infoTexts = [];
+ this.training = -1; // -1 when no class is being trained
+ this.videoPlaying = false;
+ this.connId = undefined;
+ this.wss_url = $.cookie('wss_url') || "wss://ml2scratch-helper.glitch.me"
+ this.video = $('video')[0];
+ this.isTouchDevice = 'ontouchstart' in document.documentElement;
+ this.knnClassifier = ml5.KNNClassifier();
+ this.featureExtractor = ml5.featureExtractor('MobileNet', () => {
+ this.start();
+ });
+
+ let params = new URLSearchParams(window.location.search);
+ if (params.get('conn_id')) {
+ this.connId = params.get('conn_id');
+ } else {
+ this.connId = Math.floor(Math.random(100000000) * 100000000)
+ }
+ $('#conn-id').val(this.connId);
+ this.connect(this.connId);
+
+ // Create cards. This needs to be run at the first place.
+ for(let i=0;i {
+ this.clearAll();
+ return false;
+ });
+
+ $('#learning .edit-label-menu').each((i, el) => {
+ $(el).on('click', ()=> {
+ this.editLabel(i);
+ return false;
+ });
+ });
+
+ $('#learning .clear-menu').each((i, el) => {
+ $(el).on('click', ()=> {
+ this.clear(i);
+ return false;
+ });
+ });
+
+ $('#download-button').on('click', ()=> {
+ this.download();
+ return false;
+ });
+
+ $('#conn-id').on('click', (e)=> {
+ $(e.target).select();
+ })
+
+ // fileを選択したら名前を表示する
+ $('[data-file]').each(function(index, el) {
+ $(el).on('change', function(e) {
+ let filename = $(e.currentTarget).val().split('\\').pop()
+ let element = $(e.currentTarget).closest('.input-file').find('[data-file-name]')[0]
+ element.innerText = filename;
+ $(e.currentTarget).closest('.input-file').addClass('has-file')
+ });
+ });
+
+ $("#upload-files").change(()=>{
+ this.upload();
+ });
+
+ $('.card-block').each((i, el) => {
+ $(el).on('click', ()=> {
+ $('#trained-images .images').hide();
+ $('#trained-images .images').eq(i).show();
+ $("#trained-images .training-id").html(i);
+ });
+ });
+
+ // Create training buttons and info texts
+ for(let i=0;i{
+ if (this.isTouchDevice == false) {
+ this.training = i;
+ }
+ });
+
+ button.mouseup(()=>{
+ if (this.isTouchDevice == false) {
+ this.training = -1;
+ }
+ });
+
+ button.on('touchstart', ()=>{
+ if (this.isTouchDevice) {
+ this.training = i;
+ }
+ });
+
+ button.on('touchend', ()=>{
+ if (this.isTouchDevice) {
+ this.training = -1;
+ }
+ });
+
+ $('#learning .card-block .input').eq(i).on("blur", ()=>{
+ let label = $('#learning .card-block .card-block__label').eq(i);
+ let input = $('#learning .card-block .input').eq(i);
+ label.removeClass("none");
+ input.addClass("none");
+ label.html(input.val() || i);
+ })
+ }
+
+ $('#wss_url').val(this.wss_url);
+ $('#wss_url').on('blur', (e)=> {
+ this.wss_url = $(e.target).val();
+ $.cookie('wss_url', this.wss_url, { expires: 90 });
+ });
+
+ $('#connect-button').on('click', (e)=> {
+ let connId = $('#conn-id').val();
+ this.connect(connId);
+ return false;
+ });
+
+ $("#scratch-link").attr('href', 'https://champierre.github.io/scratch/');
+
+ // Setup webcam
+ navigator.mediaDevices.getUserMedia({video: true, audio: false})
+ .then((stream) => {
+ this.video.srcObject = stream;
+ this.video.addEventListener('playing', ()=> this.videoPlaying = true);
+ this.video.addEventListener('paused', ()=> this.videoPlaying = false);
+ })
+
+ $(window).on('beforeunload', function() {
+ if (location.href != "http://localhost:9966/dist/") {
+ return 'ページから離れようとしていますが、よろしいですか?';
+ }
+ });
+ }
+
+ start() {
+ if (this.timer) {
+ this.stop();
+ }
+ this.video.play();
+ this.timer = requestAnimationFrame(this.animate.bind(this));
+ }
+
+ stop() {
+ this.video.pause();
+ cancelAnimationFrame(this.timer);
+ }
+
+ classify() {
+ const numLabels = this.knnClassifier.getNumLabels();
+ if (numLabels == 0) return;
+
+ const features = this.featureExtractor.infer(this.video);
+ this.knnClassifier.classify(features, (err, result) => {
+ if (err) {
+ console.error(err);
+ } else {
+ if(this.ws && this.ws.readyState === WebSocket.OPEN){
+ let label = $('#learning .card-block .card-block__label').eq(result.classIndex).html();
+ this.ws.send(JSON.stringify({action: 'predict', conn_id: this.connId, value: result.classIndex, label: label}));
+ }
+ this.updateProgress(result.confidences);
+ }
+ });
+ }
+
+ animate() {
+ if(this.videoPlaying){
+ this.classify();
+
+ // Train class if one of the buttons is held down
+ if(this.training != -1){
+ const features = this.featureExtractor.infer(this.video);
+ this.knnClassifier.addExample(features, String(this.training));
+ this.updateCounts();
+ }
+ }
+ this.timer = requestAnimationFrame(this.animate.bind(this));
+ }
+
+ connect(connId) {
+ this.ws = new WebSocket(`${this.wss_url}/ml`);
+ this.connId = connId;
+ }
+
+ download() {
+ const fileName = String(Date.now());
+ this.knnClassifier.save(fileName);
+ }
+
+ upload() {
+ const files = document.getElementById('upload-files').files;
+ if (files.length <= 0) {
+ return false;
+ }
+
+ const fr = new FileReader();
+
+ fr.onload = (e) => {
+ const data = JSON.parse(e.target.result);
+ this.knnClassifier.load(data, () => {
+ this.updateCounts();
+ });
+ }
+
+ fr.onloadend = (e) => {
+ document.getElementById('upload-files').value = "";
+ }
+
+ fr.readAsText(files.item(0));
+ }
+
+ editLabel(i) {
+ let label = $('.card-block .card-block__label').eq(i);
+ let input = $('.card-block .input').eq(i);
+
+ label.addClass('none');
+ input.removeClass('none');
+
+ input.val(label.html());
+ }
+
+ clear(i) {
+ this.knnClassifier.clearLabel(String(i));
+ this.updateCounts();
+ }
+
+ clearAll() {
+ this.knnClassifier.clearAllLabels()
+ this.updateCounts();
+ }
+
+ updateProgress(confidences) {
+ let html = '';
+ let labels = $('.card-block .card-block__label');
+ $.each(confidences, function(i, confidence) {
+ let label = "";
+ if (confidence > 0) {
+ label = labels.eq(i).html();
+ }
+ html += `