Logonet is a convolutional neural network model to detect brand logo in the given input image.
it can detect the following brand logo's: (updated - 21/10/2018)
['ups','dhl','fedex','aldi','cocacola','mcdonalds']
from bs4 import BeautifulSoup | |
import csv | |
import requests | |
################################### | |
# Jagadeesh Kotra # | |
# hello@jagadeesh.me # | |
################################### | |
scrap = [] |
from numpy import base_repr | |
def sum_of_digits(array): | |
digit_sum = [] | |
for i in range(len(array)): | |
x = [int(x) for x in str(array[i])] | |
digit_sum.append(sum(x)) | |
return digit_sum |
train = train[train['fare_amount'] > 0] | |
train = train[train['pickup_longitude'] < -72] | |
train = train[(train['pickup_latitude'] > 40) & (train['pickup_latitude'] < 44)] | |
train = train[train['dropoff_longitude'] < -72] | |
train = train[(train['dropoff_latitude'] > 40) & (train['dropoff_latitude'] < 44)] | |
train = train[(train['passenger_count'] > 0) & (train['passenger_count'] < 10)] | |
#---# | |
from keras.models import Sequential, Model | |
from keras.layers import Dense, Dropout, Activation | |
from keras import optimizers | |
from keras import regularizers | |
model = Sequential() | |
model.add(Dense(128, activation='relu', input_dim=len(features))) | |
model.add(Dense(64)) | |
model.add(Dense(1)) |
parms = {'max_depth': 8,'learning_rate':0.07, 'eta': 0.03, 'subsample': 1, 'colsample_bytree': 0.8, 'objective': 'reg:linear', 'eval_metric': 'rmse', 'silent': 0} | |
reg = xgb.XGBRegressor(parms=parms,n_jobs=6) | |
reg = xgb.train(parms, dtrain, num_boost_round=500) |