├── Final_Assignment concrete.ipynb └── README.md /Final_Assignment concrete.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "metadata": { 7 | "colab": {}, 8 | "colab_type": "code", 9 | "id": "kFafJT43Kp_L" 10 | }, 11 | "outputs": [], 12 | "source": [ 13 | "import os\n", 14 | "import numpy as np\n", 15 | "import matplotlib.pyplot as plt\n", 16 | "\n", 17 | "from PIL import Image" 18 | ] 19 | }, 20 | { 21 | "cell_type": "code", 22 | "execution_count": 12, 23 | "metadata": { 24 | "colab": { 25 | "base_uri": "https://localhost:8080/", 26 | "height": 202 27 | }, 28 | "colab_type": "code", 29 | "id": "JhiRo9voKwOl", 30 | "outputId": "5f086e2a-1e37-4fa2-8b8e-f9bd7c3d0b17" 31 | }, 32 | "outputs": [ 33 | { 34 | "name": "stdout", 35 | "output_type": "stream", 36 | "text": [ 37 | "--2020-04-29 18:33:12-- https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DL0321EN/data/concrete_data_week4.zip\n", 38 | "Resolving s3-api.us-geo.objectstorage.softlayer.net (s3-api.us-geo.objectstorage.softlayer.net)... 67.228.254.196\n", 39 | "Connecting to s3-api.us-geo.objectstorage.softlayer.net (s3-api.us-geo.objectstorage.softlayer.net)|67.228.254.196|:443... connected.\n", 40 | "HTTP request sent, awaiting response... 200 OK\n", 41 | "Length: 261483817 (249M) [application/zip]\n", 42 | "Saving to: ‘concrete_data_week4.zip.1’\n", 43 | "\n", 44 | "concrete_data_week4 100%[===================>] 249.37M 35.6MB/s in 7.8s \n", 45 | "\n", 46 | "2020-04-29 18:33:21 (32.0 MB/s) - ‘concrete_data_week4.zip.1’ saved [261483817/261483817]\n", 47 | "\n" 48 | ] 49 | } 50 | ], 51 | "source": [ 52 | "!wget https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DL0321EN/data/concrete_data_week4.zip" 53 | ] 54 | }, 55 | { 56 | "cell_type": "code", 57 | "execution_count": null, 58 | "metadata": {}, 59 | "outputs": [], 60 | "source": [ 61 | "!unzip concrete_data_week4.zip" 62 | ] 63 | }, 64 | { 65 | "cell_type": "code", 66 | "execution_count": null, 67 | "metadata": { 68 | "colab": {}, 69 | "colab_type": "code", 70 | "id": "o0TJ9OvxLYVf" 71 | }, 72 | "outputs": [], 73 | "source": [ 74 | "negative_images = os.listdir('/content/concrete_data_week4/train/negative')\n", 75 | "positive_images = os.listdir('/content/concrete_data_week4/train/positive')" 76 | ] 77 | }, 78 | { 79 | "cell_type": "code", 80 | "execution_count": null, 81 | "metadata": { 82 | "colab": {}, 83 | "colab_type": "code", 84 | "id": "Y55gH429Lp4d" 85 | }, 86 | "outputs": [], 87 | "source": [ 88 | "import keras\n", 89 | "from keras.preprocessing.image import ImageDataGenerator\n", 90 | "from keras.models import Sequential\n", 91 | "from keras.layers import Dense\n", 92 | "from keras.applications import ResNet50\n", 93 | "from keras.applications.resnet50 import preprocess_input" 94 | ] 95 | }, 96 | { 97 | "cell_type": "code", 98 | "execution_count": null, 99 | "metadata": { 100 | "colab": {}, 101 | "colab_type": "code", 102 | "id": "_E7GKnvmN3Yl" 103 | }, 104 | "outputs": [], 105 | "source": [ 106 | "num_classes = 2\n", 107 | "image_resize = 224\n", 108 | "batch_size_training = 100\n", 109 | "batch_size_validation = 100" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": null, 115 | "metadata": { 116 | "colab": {}, 117 | "colab_type": "code", 118 | "id": "DEgZAXBVOIq3" 119 | }, 120 | "outputs": [], 121 | "source": [ 122 | "data_generator = ImageDataGenerator(\n", 123 | " preprocessing_function=preprocess_input,\n", 124 | ")" 125 | ] 126 | }, 127 | { 128 | "cell_type": "code", 129 | "execution_count": 19, 130 | "metadata": { 131 | "colab": { 132 | "base_uri": "https://localhost:8080/", 133 | "height": 34 134 | }, 135 | "colab_type": "code", 136 | "id": "_W4l75rCOKx0", 137 | "outputId": "cf3765a4-f03b-41bb-be03-6d76054b8421" 138 | }, 139 | "outputs": [ 140 | { 141 | "name": "stdout", 142 | "output_type": "stream", 143 | "text": [ 144 | "Found 30001 images belonging to 2 classes.\n" 145 | ] 146 | } 147 | ], 148 | "source": [ 149 | "train_generator = data_generator.flow_from_directory(\n", 150 | " 'concrete_data_week4/train',\n", 151 | " target_size=(image_resize, image_resize),\n", 152 | " batch_size=batch_size_training,\n", 153 | " class_mode='categorical')" 154 | ] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "execution_count": 20, 159 | "metadata": { 160 | "colab": { 161 | "base_uri": "https://localhost:8080/", 162 | "height": 34 163 | }, 164 | "colab_type": "code", 165 | "id": "fZzzUYzTONL3", 166 | "outputId": "8f6201de-37a0-40f2-e641-94b5616b2951" 167 | }, 168 | "outputs": [ 169 | { 170 | "name": "stdout", 171 | "output_type": "stream", 172 | "text": [ 173 | "Found 9501 images belonging to 2 classes.\n" 174 | ] 175 | } 176 | ], 177 | "source": [ 178 | "validation_generator = data_generator.flow_from_directory(\n", 179 | " 'concrete_data_week4/valid',\n", 180 | " target_size=(image_resize, image_resize),\n", 181 | " batch_size=batch_size_validation,\n", 182 | " class_mode='categorical')" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": null, 188 | "metadata": { 189 | "colab": {}, 190 | "colab_type": "code", 191 | "id": "ew1MEBIMOPLr" 192 | }, 193 | "outputs": [], 194 | "source": [ 195 | "model = Sequential()" 196 | ] 197 | }, 198 | { 199 | "cell_type": "code", 200 | "execution_count": 22, 201 | "metadata": { 202 | "colab": { 203 | "base_uri": "https://localhost:8080/", 204 | "height": 70 205 | }, 206 | "colab_type": "code", 207 | "id": "tIqfoz5WORbM", 208 | "outputId": "adec33d3-2d1b-473b-9288-5da1ba86761b" 209 | }, 210 | "outputs": [ 211 | { 212 | "name": "stdout", 213 | "output_type": "stream", 214 | "text": [ 215 | "Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.2/resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5\n", 216 | "94658560/94653016 [==============================] - 3s 0us/step\n" 217 | ] 218 | } 219 | ], 220 | "source": [ 221 | "model.add(ResNet50(\n", 222 | " include_top=False,\n", 223 | " pooling='avg',\n", 224 | " weights='imagenet',\n", 225 | " ))" 226 | ] 227 | }, 228 | { 229 | "cell_type": "code", 230 | "execution_count": null, 231 | "metadata": { 232 | "colab": {}, 233 | "colab_type": "code", 234 | "id": "YJpYwGBpOTNO" 235 | }, 236 | "outputs": [], 237 | "source": [ 238 | "model.add(Dense(num_classes, activation='softmax'))" 239 | ] 240 | }, 241 | { 242 | "cell_type": "code", 243 | "execution_count": 25, 244 | "metadata": { 245 | "colab": { 246 | "base_uri": "https://localhost:8080/", 247 | "height": 67 248 | }, 249 | "colab_type": "code", 250 | "id": "9IWHbY8QOZpN", 251 | "outputId": "5a067976-d318-4315-ccdc-80fcf8253d37" 252 | }, 253 | "outputs": [ 254 | { 255 | "data": { 256 | "text/plain": [ 257 | "[,\n", 258 | " ,\n", 259 | " ]" 260 | ] 261 | }, 262 | "execution_count": 25, 263 | "metadata": { 264 | "tags": [] 265 | }, 266 | "output_type": "execute_result" 267 | } 268 | ], 269 | "source": [ 270 | "model.layers" 271 | ] 272 | }, 273 | { 274 | "cell_type": "code", 275 | "execution_count": null, 276 | "metadata": { 277 | "colab": {}, 278 | "colab_type": "code", 279 | "id": "X7O-qjh9OebH" 280 | }, 281 | "outputs": [], 282 | "source": [ 283 | "model.layers[0].trainable = False" 284 | ] 285 | }, 286 | { 287 | "cell_type": "code", 288 | "execution_count": 27, 289 | "metadata": { 290 | "colab": { 291 | "base_uri": "https://localhost:8080/", 292 | "height": 252 293 | }, 294 | "colab_type": "code", 295 | "id": "42MdFaCxOged", 296 | "outputId": "f62698f8-1dd5-435b-8210-94c53e50e6c6" 297 | }, 298 | "outputs": [ 299 | { 300 | "name": "stdout", 301 | "output_type": "stream", 302 | "text": [ 303 | "Model: \"sequential_1\"\n", 304 | "_________________________________________________________________\n", 305 | "Layer (type) Output Shape Param # \n", 306 | "=================================================================\n", 307 | "resnet50 (Model) (None, 2048) 23587712 \n", 308 | "_________________________________________________________________\n", 309 | "dense_1 (Dense) (None, 2) 4098 \n", 310 | "_________________________________________________________________\n", 311 | "dense_2 (Dense) (None, 2) 6 \n", 312 | "=================================================================\n", 313 | "Total params: 23,591,816\n", 314 | "Trainable params: 4,104\n", 315 | "Non-trainable params: 23,587,712\n", 316 | "_________________________________________________________________\n" 317 | ] 318 | } 319 | ], 320 | "source": [ 321 | "model.summary()" 322 | ] 323 | }, 324 | { 325 | "cell_type": "code", 326 | "execution_count": null, 327 | "metadata": { 328 | "colab": {}, 329 | "colab_type": "code", 330 | "id": "1jBAQcYVOjdM" 331 | }, 332 | "outputs": [], 333 | "source": [ 334 | "model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])" 335 | ] 336 | }, 337 | { 338 | "cell_type": "code", 339 | "execution_count": null, 340 | "metadata": { 341 | "colab": {}, 342 | "colab_type": "code", 343 | "id": "5WgsYNbcO2zS" 344 | }, 345 | "outputs": [], 346 | "source": [ 347 | "steps_per_epoch_training = len(train_generator)\n", 348 | "steps_per_epoch_validation = len(validation_generator)\n", 349 | "num_epochs = 2" 350 | ] 351 | }, 352 | { 353 | "cell_type": "code", 354 | "execution_count": 31, 355 | "metadata": { 356 | "colab": { 357 | "base_uri": "https://localhost:8080/", 358 | "height": 84 359 | }, 360 | "colab_type": "code", 361 | "id": "w-KdakwZO9ul", 362 | "outputId": "ef5ffdfa-fcfb-4043-a37d-093265b31a00" 363 | }, 364 | "outputs": [ 365 | { 366 | "name": "stdout", 367 | "output_type": "stream", 368 | "text": [ 369 | "Epoch 1/2\n", 370 | "301/301 [==============================] - 276s 916ms/step - loss: 0.5091 - accuracy: 0.9683 - val_loss: 0.3966 - val_accuracy: 0.8953\n", 371 | "Epoch 2/2\n", 372 | "301/301 [==============================] - 264s 875ms/step - loss: 0.3324 - accuracy: 0.9946 - val_loss: 0.2648 - val_accuracy: 0.9401\n" 373 | ] 374 | } 375 | ], 376 | "source": [ 377 | "fit_history = model.fit_generator(\n", 378 | " train_generator,\n", 379 | " steps_per_epoch=steps_per_epoch_training,\n", 380 | " epochs=num_epochs,\n", 381 | " validation_data=validation_generator,\n", 382 | " validation_steps=steps_per_epoch_validation,\n", 383 | " verbose=1,\n", 384 | ")" 385 | ] 386 | }, 387 | { 388 | "cell_type": "code", 389 | "execution_count": null, 390 | "metadata": { 391 | "colab": {}, 392 | "colab_type": "code", 393 | "id": "SItHs1vEPEe8" 394 | }, 395 | "outputs": [], 396 | "source": [ 397 | "model.save('classifier_resnet_model.h5')" 398 | ] 399 | }, 400 | { 401 | "cell_type": "code", 402 | "execution_count": null, 403 | "metadata": { 404 | "colab": {}, 405 | "colab_type": "code", 406 | "id": "2uX476ZKRSIq" 407 | }, 408 | "outputs": [], 409 | "source": [ 410 | "from keras.applications.vgg16 import VGG16" 411 | ] 412 | }, 413 | { 414 | "cell_type": "code", 415 | "execution_count": null, 416 | "metadata": { 417 | "colab": {}, 418 | "colab_type": "code", 419 | "id": "5ZE58imZRVwR" 420 | }, 421 | "outputs": [], 422 | "source": [ 423 | "model_vgg = Sequential()" 424 | ] 425 | }, 426 | { 427 | "cell_type": "code", 428 | "execution_count": null, 429 | "metadata": { 430 | "colab": {}, 431 | "colab_type": "code", 432 | "id": "ln5pqcqcRZ9O" 433 | }, 434 | "outputs": [], 435 | "source": [ 436 | "model_vgg.add(VGG16(\n", 437 | " include_top=False,\n", 438 | " pooling='avg',\n", 439 | " weights='imagenet',\n", 440 | " ))" 441 | ] 442 | }, 443 | { 444 | "cell_type": "code", 445 | "execution_count": null, 446 | "metadata": { 447 | "colab": {}, 448 | "colab_type": "code", 449 | "id": "dfFLIlJlRqYm" 450 | }, 451 | "outputs": [], 452 | "source": [ 453 | "model_vgg.add(Dense(num_classes, activation='softmax'))" 454 | ] 455 | }, 456 | { 457 | "cell_type": "code", 458 | "execution_count": null, 459 | "metadata": { 460 | "colab": {}, 461 | "colab_type": "code", 462 | "id": "A2O5f1RTR5rs" 463 | }, 464 | "outputs": [], 465 | "source": [ 466 | "model_vgg.layers[0].trainable = False" 467 | ] 468 | }, 469 | { 470 | "cell_type": "code", 471 | "execution_count": 46, 472 | "metadata": { 473 | "colab": { 474 | "base_uri": "https://localhost:8080/", 475 | "height": 218 476 | }, 477 | "colab_type": "code", 478 | "id": "NdJB1bJTSEZe", 479 | "outputId": "35e491e4-9c42-464c-afcf-9f88e2155008" 480 | }, 481 | "outputs": [ 482 | { 483 | "name": "stdout", 484 | "output_type": "stream", 485 | "text": [ 486 | "Model: \"sequential_3\"\n", 487 | "_________________________________________________________________\n", 488 | "Layer (type) Output Shape Param # \n", 489 | "=================================================================\n", 490 | "vgg16 (Model) (None, 512) 14714688 \n", 491 | "_________________________________________________________________\n", 492 | "dense_4 (Dense) (None, 2) 1026 \n", 493 | "=================================================================\n", 494 | "Total params: 14,715,714\n", 495 | "Trainable params: 1,026\n", 496 | "Non-trainable params: 14,714,688\n", 497 | "_________________________________________________________________\n" 498 | ] 499 | } 500 | ], 501 | "source": [ 502 | "model_vgg.summary()" 503 | ] 504 | }, 505 | { 506 | "cell_type": "code", 507 | "execution_count": null, 508 | "metadata": { 509 | "colab": {}, 510 | "colab_type": "code", 511 | "id": "xRwmmlnASJQO" 512 | }, 513 | "outputs": [], 514 | "source": [ 515 | "model_vgg.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])" 516 | ] 517 | }, 518 | { 519 | "cell_type": "code", 520 | "execution_count": 48, 521 | "metadata": { 522 | "colab": { 523 | "base_uri": "https://localhost:8080/", 524 | "height": 84 525 | }, 526 | "colab_type": "code", 527 | "id": "KZfH_lkdSWT1", 528 | "outputId": "2faa9957-cbea-4d62-8a2b-b98785c678be" 529 | }, 530 | "outputs": [ 531 | { 532 | "name": "stdout", 533 | "output_type": "stream", 534 | "text": [ 535 | "Epoch 1/2\n", 536 | "301/301 [==============================] - 243s 808ms/step - loss: 0.0873 - accuracy: 0.9728 - val_loss: 4.7684e-07 - val_accuracy: 0.9952\n", 537 | "Epoch 2/2\n", 538 | "301/301 [==============================] - 241s 801ms/step - loss: 0.0189 - accuracy: 0.9958 - val_loss: 0.0012 - val_accuracy: 0.9969\n" 539 | ] 540 | } 541 | ], 542 | "source": [ 543 | "fit_history_vgg = model_vgg.fit_generator(\n", 544 | " train_generator,\n", 545 | " steps_per_epoch=steps_per_epoch_training,\n", 546 | " epochs=num_epochs,\n", 547 | " validation_data=validation_generator,\n", 548 | " validation_steps=steps_per_epoch_validation,\n", 549 | " verbose=1,\n", 550 | ")" 551 | ] 552 | }, 553 | { 554 | "cell_type": "code", 555 | "execution_count": null, 556 | "metadata": { 557 | "colab": {}, 558 | "colab_type": "code", 559 | "id": "ngUfW4j4U43t" 560 | }, 561 | "outputs": [], 562 | "source": [ 563 | "model_vgg.save('classifier_vgg16_model.h5')" 564 | ] 565 | }, 566 | { 567 | "cell_type": "code", 568 | "execution_count": null, 569 | "metadata": { 570 | "colab": {}, 571 | "colab_type": "code", 572 | "id": "dE4wScyAScuX" 573 | }, 574 | "outputs": [], 575 | "source": [ 576 | "data_generator_test = ImageDataGenerator(\n", 577 | " preprocessing_function=preprocess_input,\n", 578 | ")" 579 | ] 580 | }, 581 | { 582 | "cell_type": "code", 583 | "execution_count": 60, 584 | "metadata": { 585 | "colab": { 586 | "base_uri": "https://localhost:8080/", 587 | "height": 34 588 | }, 589 | "colab_type": "code", 590 | "id": "5MOQg-L-Tgt9", 591 | "outputId": "18c56dfa-9528-4506-e314-33fbea44b164" 592 | }, 593 | "outputs": [ 594 | { 595 | "name": "stdout", 596 | "output_type": "stream", 597 | "text": [ 598 | "Found 500 images belonging to 2 classes.\n" 599 | ] 600 | } 601 | ], 602 | "source": [ 603 | "test_generator = data_generator_test.flow_from_directory(\n", 604 | " 'concrete_data_week4/test',\n", 605 | " target_size=(image_resize, image_resize),\n", 606 | " shuffle=False)" 607 | ] 608 | }, 609 | { 610 | "cell_type": "code", 611 | "execution_count": 61, 612 | "metadata": { 613 | "colab": { 614 | "base_uri": "https://localhost:8080/", 615 | "height": 34 616 | }, 617 | "colab_type": "code", 618 | "id": "2GbkNLpMVLFT", 619 | "outputId": "1aa369e3-717f-42ba-d6fe-0c8136ab6c30" 620 | }, 621 | "outputs": [ 622 | { 623 | "data": { 624 | "text/plain": [ 625 | "[0.0062302956357598305, 0.9980000257492065]" 626 | ] 627 | }, 628 | "execution_count": 61, 629 | "metadata": { 630 | "tags": [] 631 | }, 632 | "output_type": "execute_result" 633 | } 634 | ], 635 | "source": [ 636 | "model_vgg.evaluate_generator(test_generator,steps=None, callbacks=None, max_queue_size=10, workers=1, use_multiprocessing=False)" 637 | ] 638 | }, 639 | { 640 | "cell_type": "code", 641 | "execution_count": 62, 642 | "metadata": { 643 | "colab": { 644 | "base_uri": "https://localhost:8080/", 645 | "height": 34 646 | }, 647 | "colab_type": "code", 648 | "id": "wEnKGjjkVzja", 649 | "outputId": "84270746-32f3-4a04-c8e0-4fbd5267e701" 650 | }, 651 | "outputs": [ 652 | { 653 | "data": { 654 | "text/plain": [ 655 | "[0.3369705080986023, 0.9539999961853027]" 656 | ] 657 | }, 658 | "execution_count": 62, 659 | "metadata": { 660 | "tags": [] 661 | }, 662 | "output_type": "execute_result" 663 | } 664 | ], 665 | "source": [ 666 | "model.evaluate_generator(test_generator, steps=None, callbacks=None, max_queue_size=10, workers=1, use_multiprocessing=False)" 667 | ] 668 | }, 669 | { 670 | "cell_type": "code", 671 | "execution_count": null, 672 | "metadata": { 673 | "colab": {}, 674 | "colab_type": "code", 675 | "id": "L6IDExwMWT4Z" 676 | }, 677 | "outputs": [], 678 | "source": [ 679 | "result=model_vgg.predict_generator(test_generator, steps=None, callbacks=None, max_queue_size=10, workers=1, use_multiprocessing=False)" 680 | ] 681 | }, 682 | { 683 | "cell_type": "code", 684 | "execution_count": 71, 685 | "metadata": { 686 | "colab": { 687 | "base_uri": "https://localhost:8080/", 688 | "height": 101 689 | }, 690 | "colab_type": "code", 691 | "id": "vYqClGnCZxTK", 692 | "outputId": "797e40c0-d872-45d8-b29e-276c89113b52" 693 | }, 694 | "outputs": [ 695 | { 696 | "name": "stdout", 697 | "output_type": "stream", 698 | "text": [ 699 | "Negative\n", 700 | "Negative\n", 701 | "Negative\n", 702 | "Positive\n", 703 | "Positive\n" 704 | ] 705 | } 706 | ], 707 | "source": [ 708 | "for i in range(1,500,100):\n", 709 | " if result[i][0]>result[i][1]:\n", 710 | " print(\"Negative\")\n", 711 | " else:\n", 712 | " print(\"Positive\")" 713 | ] 714 | }, 715 | { 716 | "cell_type": "code", 717 | "execution_count": null, 718 | "metadata": { 719 | "colab": {}, 720 | "colab_type": "code", 721 | "id": "IR85DodmchIg" 722 | }, 723 | "outputs": [], 724 | "source": [] 725 | } 726 | ], 727 | "metadata": { 728 | "accelerator": "GPU", 729 | "colab": { 730 | "collapsed_sections": [], 731 | "name": "Final Assignment.ipynb", 732 | "provenance": [] 733 | }, 734 | "kernelspec": { 735 | "display_name": "Python 3", 736 | "language": "python", 737 | "name": "python3" 738 | }, 739 | "language_info": { 740 | "codemirror_mode": { 741 | "name": "ipython", 742 | "version": 3 743 | }, 744 | "file_extension": ".py", 745 | "mimetype": "text/x-python", 746 | "name": "python", 747 | "nbconvert_exporter": "python", 748 | "pygments_lexer": "ipython3", 749 | "version": "3.7.3" 750 | } 751 | }, 752 | "nbformat": 4, 753 | "nbformat_minor": 2 754 | } 755 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Concrete-Crack-Images-Classification 2 | Created a Deep Learning model using Keras to predict whether an image of concrete surface has a crack in it. The model is trained using existing deep learning models namely VGG16 and resnet50. Also the comparison based on the performance of these two models is made. 3 | ## Installation 4 | 5 | We need numpy, pandas, matplotlib, tensorflow, keras python libraries for creating and evaluating the model. We need to create Python 3 kernel in Jupyter Notebook 6 | 7 | ## Project Motivation 8 | Compared the performance of two very famous deep learning classification models namely VGG16 and resnet50 9 | 10 | ## File Descriptions 11 | 12 | There is one Jupyter notebook available to show the code, used to train and evaluate the models . The notebook easily explains the above question. 13 | 14 | ## Results 15 | Both the models performed upto the mark and there is no large performance difference is seen between two models. 16 | 17 | 18 | ## Dataset 19 | Find the link to the dataset https://www.kaggle.com/thesighsrikar/concrete-crack-images-for-classification 20 | The dataset contains 3 folders 21 | ### 1.Train 22 | Train folder contains two folders negative(Images without cracks) and positive(Images with cracks) each folder has 15000 images each. 23 | ### 2.Test 24 | Test folder contains two folders negative(Images without cracks) and positive(Images with cracks) each folder has 250 images each to test the models. 25 | ### 3.Valid 26 | Valider contains two folders negative(Images without cracks) and positive(Images with cracks) each folder has 4750ges each for validation. 27 | 28 | --------------------------------------------------------------------------------