This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip3 install --upgrade tensorflow | |
pip3 install numpy | |
pip3 install scipy | |
pip3 install pillow | |
pip3 install h5py | |
pip3 install opencv-python | |
pip3 install matplotlib | |
pip3 install keras |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Editor: Ahan M R | |
Date: 18-06-2018 | |
Python 3.6.0 | |
''' | |
#PS1 CROWD DETECTION IN THE CAFETERIA | |
''' | |
From imageAI API, we import Object detection and use it to detect the object classes in the image | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Editor: Ahan M R | |
Date: 18-06-2018 | |
Python 3.6.0 | |
''' | |
#PS1 CROWD DETECTION IN THE SITUATION | |
''' | |
From imageAI API, we import Object detection and use it to detect the object classes in the image | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kaiming H. et al, Deep Residual Learning for Image Recognition | |
https://arxiv.org/abs/1512.03385 | |
Szegedy. et al, Rethinking the Inception Architecture for Computer Vision | |
https://arxiv.org/abs/1512.00567 | |
Gao. et al, Densely Connected Convolutional Networks | |
https://arxiv.org/abs/1608.06993 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install https://github.com/OlafenwaMoses/ImageAI/releases/download/2.0.1/imageai-2.0.1-py3-none-any.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/OlafenwaMoses/ImageAI/releases/download/1.0/resnet50_coco_best_v2.0.1.h5 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
car : 52.74809002876282 | |
car : 54.43572402000427 | |
car : 61.86940670013428 | |
car : 64.99541997909546 | |
car : 54.53670620918274 | |
car : 54.111236333847046 | |
car : 55.92341423034668 | |
person : 54.37796711921692 | |
person : 61.132240295410156 | |
car : 70.4900324344635 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Import libraries: | |
import pandas as pd | |
import numpy as np | |
import xgboost as xgb | |
from xgboost.sklearn import XGBClassifier | |
from sklearn import cross_validation, metrics #Additional scklearn functions | |
from sklearn.grid_search import GridSearchCV #Perforing grid search | |
import matplotlib.pylab as plt | |
%matplotlib inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def modelfit(alg, dtrain, predictors,useTrainCV=True, cv_folds=5, early_stopping_rounds=50): | |
if useTrainCV: | |
xgb_param = alg.get_xgb_params() | |
xgtrain = xgb.DMatrix(dtrain[predictors].values, label=dtrain[target].values) | |
cvresult = xgb.cv(xgb_param, xgtrain, num_boost_round=alg.get_params()['n_estimators'], nfold=cv_folds, | |
metrics='auc', early_stopping_rounds=early_stopping_rounds, show_progress=False) | |
alg.set_params(n_estimators=cvresult.shape[0]) | |
#Fit the algorithm on the data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_tables(self, table_settings={}): | |
return TableFinder(self, table_settings).tables | |
def extract_tables(self, table_settings={}): | |
tables = self.find_tables(table_settings) | |
return [ table.extract() for table in tables ] | |
def extract_table(self, table_settings={}): | |
tables = self.find_tables(table_settings) | |
# Return the largest table, as measured by number of cells. |
OlderNewer