├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md ├── dependabot.yml └── workflows │ ├── blank.yml │ └── codeql-analysis.yml ├── LICENSE ├── Machine defect detection .ipynb ├── MobileNet_model_keras.json ├── MobileNet_model_wieghts.h5 ├── README.md ├── Results ├── Laplacian_Blur.jpg ├── Laplacian_Gray.jpg ├── README.md ├── Sharpen_Blur.jpg ├── Sharpen_Gray.jpg ├── Sobel X_Blur.jpg ├── Sobel X_Gray.jpg ├── Sobel Y_Blur.jpg └── Sobel Y_Gray.jpg ├── functions.py ├── requirements.txt ├── routes.py └── templates ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md └── index.html /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | 13 | -------------------------------------------------------------------------------- /.github/workflows/blank.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: CI 4 | 5 | # Controls when the action will run. Triggers the workflow on push or pull request 6 | # events but only for the master branch 7 | on: 8 | push: 9 | branches: [ master ] 10 | pull_request: 11 | branches: [ master ] 12 | 13 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 14 | jobs: 15 | # This workflow contains a single job called "build" 16 | build: 17 | # The type of runner that the job will run on 18 | runs-on: ubuntu-latest 19 | 20 | # Steps represent a sequence of tasks that will be executed as part of the job 21 | steps: 22 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 23 | - uses: actions/checkout@v4.1.7 24 | 25 | # Runs a single command using the runners shell 26 | - name: Run a one-line script 27 | run: echo Hello, world! 28 | 29 | # Runs a set of commands using the runners shell 30 | - name: Run a multi-line script 31 | run: | 32 | echo Add other actions to build, 33 | echo test, and deploy your project. 34 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | # The branches below must be a subset of the branches above 8 | branches: [master] 9 | schedule: 10 | - cron: '0 10 * * 3' 11 | 12 | jobs: 13 | analyze: 14 | name: Analyze 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | # Override automatic language detection by changing the below list 21 | # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] 22 | language: ['python'] 23 | # Learn more... 24 | # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection 25 | 26 | steps: 27 | - name: Checkout repository 28 | uses: actions/checkout@v4.1.7 29 | with: 30 | # We must fetch at least the immediate parents so that if this is 31 | # a pull request then we can checkout the head. 32 | fetch-depth: 2 33 | 34 | # If this run was triggered by a pull request event, then checkout 35 | # the head of the pull request instead of the merge commit. 36 | - run: git checkout HEAD^2 37 | if: ${{ github.event_name == 'pull_request' }} 38 | 39 | # Initializes the CodeQL tools for scanning. 40 | - name: Initialize CodeQL 41 | uses: github/codeql-action/init@v3 42 | with: 43 | languages: ${{ matrix.language }} 44 | 45 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 46 | # If this step fails, then you should remove it and run the build manually (see below) 47 | - name: Autobuild 48 | uses: github/codeql-action/autobuild@v3 49 | 50 | # ℹ️ Command-line programs to run using the OS shell. 51 | # 📚 https://git.io/JvXDl 52 | 53 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 54 | # and modify them (or add more) to build your code if your project 55 | # uses a compiled language 56 | 57 | #- run: | 58 | # make bootstrap 59 | # make release 60 | 61 | - name: Perform CodeQL Analysis 62 | uses: github/codeql-action/analyze@v3 63 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /MobileNet_model_keras.json: -------------------------------------------------------------------------------- 1 | {"class_name": "Model", "config": {"name": "model_2", "layers": [{"name": "input_2", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 224, 224, 3], "dtype": "float32", "sparse": false, "name": "input_2"}, "inbound_nodes": []}, {"name": "conv1", "class_name": "Conv2D", "config": {"name": "conv1", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["input_2", 0, 0, {}]]]}, {"name": "conv1_bn", "class_name": "BatchNormalization", "config": {"name": "conv1_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv1", 0, 0, {}]]]}, {"name": "conv1_relu", "class_name": "Activation", "config": {"name": "conv1_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv1_bn", 0, 0, {}]]]}, {"name": "conv_dw_1", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_1", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv1_relu", 0, 0, {}]]]}, {"name": "conv_dw_1_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_1_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_1", 0, 0, {}]]]}, {"name": "conv_dw_1_relu", "class_name": "Activation", "config": {"name": "conv_dw_1_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_1_bn", 0, 0, {}]]]}, {"name": "conv_pw_1", "class_name": "Conv2D", "config": {"name": "conv_pw_1", "trainable": true, "filters": 64, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_1_relu", 0, 0, {}]]]}, {"name": "conv_pw_1_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_1_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_1", 0, 0, {}]]]}, {"name": "conv_pw_1_relu", "class_name": "Activation", "config": {"name": "conv_pw_1_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_1_bn", 0, 0, {}]]]}, {"name": "conv_dw_2", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_2", "trainable": true, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_1_relu", 0, 0, {}]]]}, {"name": "conv_dw_2_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_2_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_2", 0, 0, {}]]]}, {"name": "conv_dw_2_relu", "class_name": "Activation", "config": {"name": "conv_dw_2_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_2_bn", 0, 0, {}]]]}, {"name": "conv_pw_2", "class_name": "Conv2D", "config": {"name": "conv_pw_2", "trainable": true, "filters": 128, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_2_relu", 0, 0, {}]]]}, {"name": "conv_pw_2_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_2_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_2", 0, 0, {}]]]}, {"name": "conv_pw_2_relu", "class_name": "Activation", "config": {"name": "conv_pw_2_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_2_bn", 0, 0, {}]]]}, {"name": "conv_dw_3", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_3", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_2_relu", 0, 0, {}]]]}, {"name": "conv_dw_3_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_3_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_3", 0, 0, {}]]]}, {"name": "conv_dw_3_relu", "class_name": "Activation", "config": {"name": "conv_dw_3_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_3_bn", 0, 0, {}]]]}, {"name": "conv_pw_3", "class_name": "Conv2D", "config": {"name": "conv_pw_3", "trainable": true, "filters": 128, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_3_relu", 0, 0, {}]]]}, {"name": "conv_pw_3_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_3_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_3", 0, 0, {}]]]}, {"name": "conv_pw_3_relu", "class_name": "Activation", "config": {"name": "conv_pw_3_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_3_bn", 0, 0, {}]]]}, {"name": "conv_dw_4", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_4", "trainable": true, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_3_relu", 0, 0, {}]]]}, {"name": "conv_dw_4_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_4_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_4", 0, 0, {}]]]}, {"name": "conv_dw_4_relu", "class_name": "Activation", "config": {"name": "conv_dw_4_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_4_bn", 0, 0, {}]]]}, {"name": "conv_pw_4", "class_name": "Conv2D", "config": {"name": "conv_pw_4", "trainable": true, "filters": 256, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_4_relu", 0, 0, {}]]]}, {"name": "conv_pw_4_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_4_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_4", 0, 0, {}]]]}, {"name": "conv_pw_4_relu", "class_name": "Activation", "config": {"name": "conv_pw_4_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_4_bn", 0, 0, {}]]]}, {"name": "conv_dw_5", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_5", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_4_relu", 0, 0, {}]]]}, {"name": "conv_dw_5_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_5_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_5", 0, 0, {}]]]}, {"name": "conv_dw_5_relu", "class_name": "Activation", "config": {"name": "conv_dw_5_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_5_bn", 0, 0, {}]]]}, {"name": "conv_pw_5", "class_name": "Conv2D", "config": {"name": "conv_pw_5", "trainable": true, "filters": 256, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_5_relu", 0, 0, {}]]]}, {"name": "conv_pw_5_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_5_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_5", 0, 0, {}]]]}, {"name": "conv_pw_5_relu", "class_name": "Activation", "config": {"name": "conv_pw_5_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_5_bn", 0, 0, {}]]]}, {"name": "conv_dw_6", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_6", "trainable": true, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_5_relu", 0, 0, {}]]]}, {"name": "conv_dw_6_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_6_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_6", 0, 0, {}]]]}, {"name": "conv_dw_6_relu", "class_name": "Activation", "config": {"name": "conv_dw_6_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_6_bn", 0, 0, {}]]]}, {"name": "conv_pw_6", "class_name": "Conv2D", "config": {"name": "conv_pw_6", "trainable": true, "filters": 512, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_6_relu", 0, 0, {}]]]}, {"name": "conv_pw_6_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_6_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_6", 0, 0, {}]]]}, {"name": "conv_pw_6_relu", "class_name": "Activation", "config": {"name": "conv_pw_6_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_6_bn", 0, 0, {}]]]}, {"name": "conv_dw_7", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_7", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_6_relu", 0, 0, {}]]]}, {"name": "conv_dw_7_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_7_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_7", 0, 0, {}]]]}, {"name": "conv_dw_7_relu", "class_name": "Activation", "config": {"name": "conv_dw_7_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_7_bn", 0, 0, {}]]]}, {"name": "conv_pw_7", "class_name": "Conv2D", "config": {"name": "conv_pw_7", "trainable": true, "filters": 512, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_7_relu", 0, 0, {}]]]}, {"name": "conv_pw_7_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_7_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_7", 0, 0, {}]]]}, {"name": "conv_pw_7_relu", "class_name": "Activation", "config": {"name": "conv_pw_7_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_7_bn", 0, 0, {}]]]}, {"name": "conv_dw_8", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_8", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_7_relu", 0, 0, {}]]]}, {"name": "conv_dw_8_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_8_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_8", 0, 0, {}]]]}, {"name": "conv_dw_8_relu", "class_name": "Activation", "config": {"name": "conv_dw_8_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_8_bn", 0, 0, {}]]]}, {"name": "conv_pw_8", "class_name": "Conv2D", "config": {"name": "conv_pw_8", "trainable": true, "filters": 512, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_8_relu", 0, 0, {}]]]}, {"name": "conv_pw_8_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_8_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_8", 0, 0, {}]]]}, {"name": "conv_pw_8_relu", "class_name": "Activation", "config": {"name": "conv_pw_8_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_8_bn", 0, 0, {}]]]}, {"name": "conv_dw_9", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_9", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_8_relu", 0, 0, {}]]]}, {"name": "conv_dw_9_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_9_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_9", 0, 0, {}]]]}, {"name": "conv_dw_9_relu", "class_name": "Activation", "config": {"name": "conv_dw_9_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_9_bn", 0, 0, {}]]]}, {"name": "conv_pw_9", "class_name": "Conv2D", "config": {"name": "conv_pw_9", "trainable": true, "filters": 512, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_9_relu", 0, 0, {}]]]}, {"name": "conv_pw_9_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_9_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_9", 0, 0, {}]]]}, {"name": "conv_pw_9_relu", "class_name": "Activation", "config": {"name": "conv_pw_9_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_9_bn", 0, 0, {}]]]}, {"name": "conv_dw_10", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_10", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_9_relu", 0, 0, {}]]]}, {"name": "conv_dw_10_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_10_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_10", 0, 0, {}]]]}, {"name": "conv_dw_10_relu", "class_name": "Activation", "config": {"name": "conv_dw_10_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_10_bn", 0, 0, {}]]]}, {"name": "conv_pw_10", "class_name": "Conv2D", "config": {"name": "conv_pw_10", "trainable": true, "filters": 512, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_10_relu", 0, 0, {}]]]}, {"name": "conv_pw_10_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_10_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_10", 0, 0, {}]]]}, {"name": "conv_pw_10_relu", "class_name": "Activation", "config": {"name": "conv_pw_10_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_10_bn", 0, 0, {}]]]}, {"name": "conv_dw_11", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_11", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_10_relu", 0, 0, {}]]]}, {"name": "conv_dw_11_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_11_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_11", 0, 0, {}]]]}, {"name": "conv_dw_11_relu", "class_name": "Activation", "config": {"name": "conv_dw_11_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_11_bn", 0, 0, {}]]]}, {"name": "conv_pw_11", "class_name": "Conv2D", "config": {"name": "conv_pw_11", "trainable": true, "filters": 512, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_11_relu", 0, 0, {}]]]}, {"name": "conv_pw_11_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_11_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_11", 0, 0, {}]]]}, {"name": "conv_pw_11_relu", "class_name": "Activation", "config": {"name": "conv_pw_11_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_11_bn", 0, 0, {}]]]}, {"name": "conv_dw_12", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_12", "trainable": true, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_11_relu", 0, 0, {}]]]}, {"name": "conv_dw_12_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_12_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_12", 0, 0, {}]]]}, {"name": "conv_dw_12_relu", "class_name": "Activation", "config": {"name": "conv_dw_12_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_12_bn", 0, 0, {}]]]}, {"name": "conv_pw_12", "class_name": "Conv2D", "config": {"name": "conv_pw_12", "trainable": true, "filters": 1024, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_12_relu", 0, 0, {}]]]}, {"name": "conv_pw_12_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_12_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_12", 0, 0, {}]]]}, {"name": "conv_pw_12_relu", "class_name": "Activation", "config": {"name": "conv_pw_12_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_12_bn", 0, 0, {}]]]}, {"name": "conv_dw_13", "class_name": "DepthwiseConv2D", "config": {"name": "conv_dw_13", "trainable": true, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bias_regularizer": null, "activity_regularizer": null, "bias_constraint": null, "depth_multiplier": 1, "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "depthwise_regularizer": null, "depthwise_constraint": null}, "inbound_nodes": [[["conv_pw_12_relu", 0, 0, {}]]]}, {"name": "conv_dw_13_bn", "class_name": "BatchNormalization", "config": {"name": "conv_dw_13_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_dw_13", 0, 0, {}]]]}, {"name": "conv_dw_13_relu", "class_name": "Activation", "config": {"name": "conv_dw_13_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_dw_13_bn", 0, 0, {}]]]}, {"name": "conv_pw_13", "class_name": "Conv2D", "config": {"name": "conv_pw_13", "trainable": true, "filters": 1024, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["conv_dw_13_relu", 0, 0, {}]]]}, {"name": "conv_pw_13_bn", "class_name": "BatchNormalization", "config": {"name": "conv_pw_13_bn", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv_pw_13", 0, 0, {}]]]}, {"name": "conv_pw_13_relu", "class_name": "Activation", "config": {"name": "conv_pw_13_relu", "trainable": true, "activation": "relu6"}, "inbound_nodes": [[["conv_pw_13_bn", 0, 0, {}]]]}, {"name": "global_average_pooling2d_2", "class_name": "GlobalAveragePooling2D", "config": {"name": "global_average_pooling2d_2", "trainable": true, "data_format": "channels_last"}, "inbound_nodes": [[["conv_pw_13_relu", 0, 0, {}]]]}, {"name": "dense_6", "class_name": "Dense", "config": {"name": "dense_6", "trainable": true, "units": 512, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["global_average_pooling2d_2", 0, 0, {}]]]}, {"name": "dense_7", "class_name": "Dense", "config": {"name": "dense_7", "trainable": true, "units": 2, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["dense_6", 0, 0, {}]]]}], "input_layers": [["input_2", 0, 0]], "output_layers": [["dense_7", 0, 0]]}, "keras_version": "2.0.8", "backend": "tensorflow"} -------------------------------------------------------------------------------- /MobileNet_model_wieghts.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/MobileNet_model_wieghts.h5 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Machine part defect detection application 2 | :star2: *Live Demo available at https://kapilve.pythonanywhere.com/*
3 | Classification of a specific automotive part called **Fender Apron** (shown below) as defective and non-defective using Transfer Learning with an f-1 score of 1.00
4 | #### Contents 5 | * `functions.py` contains functions for preprocessing of images and making classes
6 | * `Machine defect detection.ipynb` is for code walk-through
7 | * `routes.py` is the Flask API file 8 | * [Results](Results/) folder contain processed images with different kernels of the machine part for manual defect detection. It also contains a document about the approach followed. 9 | * [templates](templates/) contain `index.html`, the frontend of the application 10 | * `MobileNet_model_keras.json` & `MobileNet_model_wieghts.h5` are saved model and its weights respectively, which are deployed in our application 11 | #### Sample processed image of Fender Apron 12 | Drawing 13 | 14 | ### Dataset 15 | The data is already labelled having a total of 250 images with 139 images as healthy machine parts and rest 111 as defective parts. Images given in the dataset were captured from different angles and scales. Training and Test datasets were prepared by randomly selecting a total of 25 images (i.e. 10%) in which 10 were defective and 15 were healthy parts. Training/validation split used is 90/10.
16 | [Dataset Link](https://drive.google.com/file/d/1k57jP_oy4c9VDZmlgqCvfErzVTzPeA_M/view?usp=sharing) 17 | > You will have to segregate them into test and train datasets yourself. To follow the notebook, you should know that I have put these random 25 test images in a new "Test" folder and renamed them as 1.jpg, 2.jpg ..... 25.jpg and put the rest other into "Train" folder with two separate "Train\Defective" and "Train\Healthy" sub-directories. 18 | 19 | > * To read about approach and architecture used, go to [README](Results/) at *Results* folder. 20 | -------------------------------------------------------------------------------- /Results/Laplacian_Blur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/Results/Laplacian_Blur.jpg -------------------------------------------------------------------------------- /Results/Laplacian_Gray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/Results/Laplacian_Gray.jpg -------------------------------------------------------------------------------- /Results/README.md: -------------------------------------------------------------------------------- 1 | ## Approaches: 2 | The initial approach was to apply object localization and image cropping for all of the images to increase consistency i.e. to locate the machine part first and then the defects. The issue with this approach was that with computer Vision, It would require to rewriting our code to find our regions of interests whenever there are changes in product types. 3 |
Another approach, to make it easier for the model to learn how to differentiate between the defective and healthy parts, by feeding in processed images with convolution kernels. But these approaches would have made the model weaker in the sense that in those cases it would need only object- localized and specially processed images to give accurate results.
4 | > Hence the final decision was to use the original images as it is with some minor processing of rotation, resizing and grayscale conversion (just for facilitating faster computation) so that model can learn to predict the defects from images with no particularly defined scale, angle, light settings etc. Later Approach of filtering with Kernel was retained for manual inspection 5 | (some samples are provided here, above in this sub-directory). 6 | 7 | ### Deep Learning Architectures: 8 | As we are having insufficiency for training data (just 250 images) for applying deep learning so I have employed transfer learning to mitigate that problem. 9 | 1) **Convolutional neural network (CNN)** as the baseline model: 3 Conv2D/MaxPooling2D pairs as the feature extractor and 3 Dense layers as the classifier. 10 | Transfer Learning Models 11 | 2) **InceptionV3**: [Keras Application InceptionV3](https://keras.io/applications/#mobilenet) fine-tuning the classifier by using 1 GlobalAveragePooling2D layer and 2 Dense layers. 12 | 3) **MobileNet**: [Keras Application MobileNet](https://keras.io/applications/#inceptionv3) fine-tuning the classifier by using 1 GlobalAveragePooling2D layer and 2 Dense layers 13 | -------------------------------------------------------------------------------- /Results/Sharpen_Blur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/Results/Sharpen_Blur.jpg -------------------------------------------------------------------------------- /Results/Sharpen_Gray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/Results/Sharpen_Gray.jpg -------------------------------------------------------------------------------- /Results/Sobel X_Blur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/Results/Sobel X_Blur.jpg -------------------------------------------------------------------------------- /Results/Sobel X_Gray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/Results/Sobel X_Gray.jpg -------------------------------------------------------------------------------- /Results/Sobel Y_Blur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/Results/Sobel Y_Blur.jpg -------------------------------------------------------------------------------- /Results/Sobel Y_Gray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kapil-verma/Machine_part_defect-detection/24d289f5d0c1c19b82beecff91c3222497532919/Results/Sobel Y_Gray.jpg -------------------------------------------------------------------------------- /functions.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | import pandas as pd 4 | from PIL import Image #pillow 5 | 6 | def pre_processing(image_path): 7 | """ 8 | Function performs minor processing of rotation, blurring, resizing and grayscale conversion and returns tuple containing 9 | resized gray, blurred and original images 10 | """ 11 | import cv2 as cv #openCV 12 | import numpy as np 13 | #Reading the image with opencv 14 | image=cv.imread(image_path) 15 | image = np.array(image, dtype=np.uint8) 16 | #changing to grayscale 17 | 18 | #Rotating if image is vertical 19 | if image.shape[1] 0.5: 41 | return "Healthy", i[0] 42 | elif i[0] <= 0.5: 43 | return "Defective", i[0] 44 | 45 | def pred(test_image_path): 46 | """ 47 | Main function for image prediction which uses saved MobileNet model to return resulted class using make_classes function 48 | """ 49 | import keras 50 | from keras.applications import MobileNet 51 | from keras import optimizers 52 | from keras.models import load_model, model_from_json 53 | import cv2 as cv 54 | import numpy as np 55 | from PIL import Image #pillow 56 | from functions import pre_processing, make_classes 57 | from keras.utils.generic_utils import CustomObjectScope 58 | with CustomObjectScope({'relu6': keras.applications.mobilenet.relu6,'DepthwiseConv2D': keras.applications.mobilenet.DepthwiseConv2D}): 59 | with open("MobileNet_model_keras.json") as json_file: 60 | loaded_model_json = json_file.read() 61 | loaded_model = model_from_json(loaded_model_json) 62 | #print(loaded_model.summary()) 63 | #load weights into new model 64 | loaded_model.load_weights("MobileNet_model_wieghts.h5") 65 | sgd = optimizers.SGD(lr=0.01, clipvalue=0.5) 66 | loaded_model.compile(loss='binary_crossentropy', 67 | optimizer=sgd, 68 | metrics=['accuracy']) 69 | X_test=[] 70 | X_test.append(cv.resize(pre_processing(test_image_path)[2],(224,224), interpolation=cv.INTER_CUBIC)) 71 | img = np.array(X_test) 72 | pred= loaded_model.predict(img) 73 | return make_classes(pred) 74 | 75 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | #python version 3.6.8 2 | Flask==2.3.2 3 | Flask-Cors==3.0.9 4 | Keras==2.0.8 5 | Keras-Applications==1.0.7 6 | opencv-python==4.2.0.32 7 | numpy==1.17.2 8 | Pillow>=6.2.2 9 | pandas==0.23.4 10 | pyopenssl==18.0.0 11 | matplotlib==3.1.1 12 | seaborn==0.8.1 13 | scikit-learn==0.20.3 14 | scikit-image==0.15.0 15 | 16 | -------------------------------------------------------------------------------- /routes.py: -------------------------------------------------------------------------------- 1 | import os 2 | from functions import pred 3 | from flask import Flask,request,render_template,jsonify 4 | from keras import backend as K 5 | 6 | app = Flask(__name__) 7 | @app.route('/') 8 | def home(): 9 | """ 10 | Renders a HTML page which allows us to input an image. 11 | """ 12 | return render_template('index.html') 13 | 14 | @app.route('/predict' ,methods=['POST']) 15 | def predict(): 16 | """ 17 | Main API function which takes image from local storage with request and uses function pred for classification 18 | and covert the result to JSON format 19 | """ 20 | if request.method == 'POST': 21 | # check if the post request has the file part 22 | if 'file' not in request.files: 23 | return 'No file found' 24 | user_file = request.files['file'] 25 | if user_file.filename == '': 26 | return 'file name not found …' 27 | else: 28 | path=os.path.join(os.getcwd()+user_file.filename) 29 | user_file.save(path) 30 | K.clear_session() 31 | classes = pred(path) 32 | K.clear_session() 33 | 34 | return jsonify({ 35 | "status":"success", 36 | "prediction":classes[0], 37 | "confidence":str(classes[1]) 38 | }) 39 | 40 | if __name__ == '__main__': 41 | app.run(ssl_context='adhoc') 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /templates/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at 99kapilverma@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | 65 | ## Attribution 66 | 67 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 68 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 69 | 70 | [homepage]: https://www.contributor-covenant.org 71 | 72 | For answers to common questions about this code of conduct, see 73 | https://www.contributor-covenant.org/faq 74 | -------------------------------------------------------------------------------- /templates/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | If you wish to contribute to this repository, please make a new branch and raise a pull request. I will review and merge if found suitable. 2 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Heading 12 | 13 | 14 |
15 | 16 |
17 |
18 |
19 |

Automated Machine Part Defect Detection Model

20 |

Upload your machine part image here

21 |

Model is trained over a specific automobile part called Fender Apron, make sure you upload images of such part only for reliable results.

22 |
23 |
24 |

Instructions:

25 |

1. A new page will appear after uploading & clicking submit.

26 |

2. You will get a dictionary of classification results.

27 |
28 |
29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 |
37 | 38 | 39 | 48 | 49 | 50 | 51 | 52 | 53 | --------------------------------------------------------------------------------