Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Contribution - EDA of Car Damage Data - Rishabh Added #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,553 changes: 3,553 additions & 0 deletions 00 - EDA of the Car Damage Data.ipynb

Large diffs are not rendered by default.

95 changes: 29 additions & 66 deletions 01-first_gate-car_or_not.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Pipe1 :\n",
"### To check if user input image is a car or not. Tested against multiple cnn frameworks to find one with maximum accuracy.\n",
"\n",
"### data0 - all car images, including whole and damaged"
]
},
Expand Down Expand Up @@ -31,9 +34,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stderr",
Expand All @@ -51,7 +52,7 @@
"import pandas as pd\n",
"\n",
"from keras.utils.data_utils import get_file\n",
"from keras.applications.resnet50 import ResNet50\n",
"from tensorflow.keras.applications.resnet50 import ResNet50\n",
"from keras.applications.vgg16 import VGG16\n",
"from keras.applications.vgg19 import VGG19\n",
"from keras.applications.inception_v3 import InceptionV3\n",
Expand All @@ -68,9 +69,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"CLASS_INDEX = None\n",
Expand All @@ -80,9 +79,7 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# from Keras GitHub \n",
Expand Down Expand Up @@ -110,9 +107,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"vgg16 = VGG16(weights='imagenet')"
Expand All @@ -132,9 +127,7 @@
{
"cell_type": "code",
"execution_count": 74,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -156,9 +149,7 @@
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand All @@ -183,9 +174,7 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"def prepare_image(img_path):\n",
Expand All @@ -206,9 +195,7 @@
{
"cell_type": "code",
"execution_count": 230,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -227,9 +214,7 @@
{
"cell_type": "code",
"execution_count": 76,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -248,9 +233,7 @@
{
"cell_type": "code",
"execution_count": 77,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -299,7 +282,6 @@
"cell_type": "code",
"execution_count": 148,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -1626,9 +1608,7 @@
{
"cell_type": "code",
"execution_count": 158,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"with open('cat_counter.pk', 'wb') as f:\n",
Expand All @@ -1645,9 +1625,7 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"with open('cat_counter.pk', 'rb') as f:\n",
Expand All @@ -1657,9 +1635,7 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"cat_list = [k for k, v in cat_counter.most_common()[:50]]"
Expand Down Expand Up @@ -1705,7 +1681,6 @@
"cell_type": "code",
"execution_count": 179,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -1750,9 +1725,7 @@
{
"cell_type": "code",
"execution_count": 210,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1782,9 +1755,7 @@
{
"cell_type": "code",
"execution_count": 212,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -1830,9 +1801,7 @@
{
"cell_type": "code",
"execution_count": 222,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -1869,9 +1838,7 @@
{
"cell_type": "code",
"execution_count": 213,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -1926,9 +1893,7 @@
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1956,9 +1921,7 @@
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1987,23 +1950,23 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
"pygments_lexer": "ipython3",
"version": "3.8.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
Loading