File size: 29,923 Bytes
21673ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "UtWMVEPUgurg"
},
"outputs": [],
"source": [
"#|default_exp app"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "wU2LMUSGhUbE"
},
"source": [
"#Musical Instrument Recognizer"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "3txLmR_EhYZA",
"outputId": "2f7a0b63-d437-42db-cc3a-bac114b2b184"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"ERROR: Some build dependencies for cymem==2.0.2 from https://files.pythonhosted.org/packages/8b/dc/0976e04cc46f86e0dd3ee3797ec68057eaafebf31daca9a076dc138b9920/cymem-2.0.2.tar.gz (from fastai) conflict with the backend dependencies: wheel==0.42.0 is incompatible with wheel>=0.32.0,<0.33.0.\n"
]
}
],
"source": [
"!pip install -Uqq fastai fastbook nbdev gradio"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "15NDmjd8hmMm"
},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'fastai'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32md:\\Data Science\\MasterCourse\\Capstone Project 2 - image recognizer\\Project Files\\indian_classical_musical_instrument_recognizer\\app.ipynb Cell 4\u001b[0m line \u001b[0;36m2\n\u001b[0;32m <a href='vscode-notebook-cell:/d%3A/Data%20Science/MasterCourse/Capstone%20Project%202%20-%20image%20recognizer/Project%20Files/indian_classical_musical_instrument_recognizer/app.ipynb#W5sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m \u001b[39m#!export\u001b[39;00m\n\u001b[1;32m----> <a href='vscode-notebook-cell:/d%3A/Data%20Science/MasterCourse/Capstone%20Project%202%20-%20image%20recognizer/Project%20Files/indian_classical_musical_instrument_recognizer/app.ipynb#W5sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mfastai\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mvision\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mall\u001b[39;00m \u001b[39mimport\u001b[39;00m load_learner\n\u001b[0;32m <a href='vscode-notebook-cell:/d%3A/Data%20Science/MasterCourse/Capstone%20Project%202%20-%20image%20recognizer/Project%20Files/indian_classical_musical_instrument_recognizer/app.ipynb#W5sZmlsZQ%3D%3D?line=2'>3</a>\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mgradio\u001b[39;00m \u001b[39mas\u001b[39;00m \u001b[39mgr\u001b[39;00m\n",
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'fastai'"
]
}
],
"source": [
"#!export\n",
"from fastai.vision.all import load_learner\n",
"import gradio as gr"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"id": "CXrdoKsLiCgz"
},
"outputs": [],
"source": [
"#!export\n",
"model = load_learner(f\"models/musical-instrument-recognizer-v6.pkl\")"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"id": "ikyofbmki9rk"
},
"outputs": [],
"source": [
"#|export\n",
"musical_instruments = (\n",
" 'Bansuri',\n",
" 'Harmonium',\n",
" 'Pakhawaz',\n",
" 'Santoor',\n",
" 'Sarangi',\n",
" 'Sarod',\n",
" 'Shehnai',\n",
" 'Sitar',\n",
" 'Tabla',\n",
" 'Tanpura'\n",
")\n",
"\n",
"def recognize_image(image):\n",
" pred, idx, probs = model.predict(image)\n",
" return dict(zip(musical_instruments, map(float, probs)))"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 209
},
"id": "8QOU1viCkYPy",
"outputId": "df789043-f5df-4c1a-e581-5ce62439f948"
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAIAAADdvvtQAAA1fElEQVR4nO29eZTl11Xfu/c+5/yGO9Wtee6unkcNrcGyLUueQIvYwcbGshMzvRCGkPfADwcTWBAIJMYk5AEB/JwskjgmkDw/Bj9sIARPsjxqVktq9VzdNc91606/8Zyz3x+3blV1S5YltyV1V/0+q1Wr66fuutV9v73PPntEZoaMjG8XerW/gYwbm0xAGddEJqCMayITUMY1kQko45rIBJRxTWQCyrgmMgFlXBOZgDKuiUxAGddEJqCMayITUMY1IQ0DITAAAuCW/2GtZWuJCGlDZLzxARjWf3nr9yAAgG3/dOvXydjeSMOcGiNIECEBxHFqrSEEpZQ1FpGQgZkBGDeE1FIKbxEQAeP6Y8oEtJOQktAw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Ui2lgFnAtqB8JU/2Qhltz61lgWhTrUSgghrtYojhJfLAQAgGWOZCQUBtlL9mYB2DFtHm288wbZBoi1mSRtWhACs49jxHGALRlvLTIKEQBS2PYE6u4XtaLD9saWDlhvEzFGcJsYiouN5Nk2MToEIiIkBgBhAM0SxtsyZgHYQz2kvtRs/EHijAM0Y6zhSSgIAYzQpxa3eD5KWrW0fWYIIs5roHcULzEbciiMFA3BrqD4gALWmOQAKoPXZQRJBKcLMB8q4RrIjLOOayASUcU1kAsq4JjIBZVwTmYAyrolMQBnXRCagjGsiE1DGNZEJKOOayASUcU1kAsq4JjIBZVwTmYAyron/H0ePoW+oXSFSAAAAAElFTkSuQmCC",
"text/plain": [
"<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=192x192>"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from PIL import Image\n",
"img = Image.open(f'test_data/bansuri.jfif')\n",
"img.thumbnail((192,192))\n",
"img"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 191
},
"id": "GjFbAe0WlPX5",
"outputId": "d94b325b-4c3e-4b9d-800f-450fc8b30413"
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<style>\n",
" /* Turns off some styling */\n",
" progress {\n",
" /* gets rid of default border in Firefox and Opera. */\n",
" border: none;\n",
" /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
" background-size: auto;\n",
" }\n",
" progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
" background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
" }\n",
" .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
" background: #F44336;\n",
" }\n",
"</style>\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"{'Bansuri': 0.9995973706245422,\n",
" 'Harmonium': 3.5202569961256813e-06,\n",
" 'Pakhawaz': 2.915377308454481e-06,\n",
" 'Santoor': 2.1727865373577515e-07,\n",
" 'Sarangi': 4.1493856883789704e-07,\n",
" 'Sarod': 1.0827788088363377e-07,\n",
" 'Shehnai': 0.0003836842952296138,\n",
" 'Sitar': 9.002708793559577e-06,\n",
" 'Tabla': 2.717604274948826e-06,\n",
" 'Tanpura': 1.3091357686789706e-07}"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"recognize_image(img)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "_3eo0O8tmwi5",
"outputId": "eeb35528-c779-46d6-cc8a-3c39efca8dbb"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python3.10/dist-packages/gradio/inputs.py:256: UserWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components\n",
" warnings.warn(\n",
"/usr/local/lib/python3.10/dist-packages/gradio/deprecation.py:40: UserWarning: `optional` parameter is deprecated, and it has no effect\n",
" warnings.warn(value)\n",
"/usr/local/lib/python3.10/dist-packages/gradio/outputs.py:196: UserWarning: Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components\n",
" warnings.warn(\n",
"/usr/local/lib/python3.10/dist-packages/gradio/deprecation.py:40: UserWarning: The 'type' parameter has been deprecated. Use the Number component instead.\n",
" warnings.warn(value)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"IMPORTANT: You are using gradio version 3.13.0, however version 3.14.0 is available, please upgrade.\n",
"--------\n",
"Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
"\n",
"Setting up a public link... we have recently upgraded the way public links are generated. If you encounter any problems, please report the issue and downgrade to gradio version 3.13.0\n",
".\n",
"Running on public URL: https://9fc74c01-6bc9-4897.gradio.live\n",
"\n",
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n"
]
},
{
"data": {
"text/plain": []
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#!export\n",
"image = gr.inputs.Image(shape=(192,192))\n",
"label = gr.outputs.Label()\n",
"examples = [\n",
" 'test_data/bansuri.jfif',\n",
" 'test_data/harmonium.jfif',\n",
" 'test_data/pakhawaj.jfif',\n",
" 'test_data/santoor.jfif',\n",
" 'test_data/sarengi.jfif',\n",
" 'test_data/sarod.jfif',\n",
" 'test_data/shehnai.jfif',\n",
" 'test_data/sitar.jfif',\n",
" 'test_data/tabla.jfif',\n",
" 'test_data/tanpura.jfif'\n",
"]\n",
"\n",
"iface = gr.Interface(fn=recognize_image, inputs = image, outputs= label, examples = examples)\n",
"iface.launch(inline =False, share = True)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "lMYKAOtLuLLA"
},
"source": [
"# Notebook to Python Script Export"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"id": "mkTtKu_GuPHT"
},
"outputs": [],
"source": [
"# from nbdev.export import notebook2script\n",
"# notebook2script('app.ipynb')"
]
}
],
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.0"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|