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
from skimage.io import imread | |
from skimage.filters import threshold_otsu | |
import matplotlib.pyplot as plt | |
car_image = imread("car.jpg", as_grey=True) | |
# it should be a 2 dimensional array | |
print(car_image.shape) | |
# the next line is not compulsory however, a grey scale pixel | |
# in skimage ranges between 0 & 1. multiplying it with 255 |
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
from skimage import measure | |
from skimage.measure import regionprops | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
import localization | |
# this gets all the connected regions and groups them together | |
label_image = measure.label(localization.binary_car_image) | |
fig, (ax1) = plt.subplots(1) | |
ax1.imshow(localization.gray_car_image, cmap="gray"); |
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
from skimage import measure | |
from skimage.measure import regionprops | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
import localization | |
# this gets all the connected regions and groups them together | |
label_image = measure.label(localization.binary_car_image) | |
# getting the maximum width, height and minimum width and height that a license plate can be |
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 numpy as np | |
from skimage.transform import resize | |
from skimage import measure | |
from skimage.measure import regionprops | |
import matplotlib.patches as patches | |
import matplotlib.pyplot as plt | |
import cca2 | |
# on the image I'm using, the headlamps were categorized as a license plate | |
# because their shapes were similar |
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 os | |
import numpy as np | |
from sklearn.svm import SVC | |
from sklearn.model_selection import cross_val_score | |
from sklearn.externals import joblib | |
from skimage.io import imread | |
from skimage.filters import threshold_otsu | |
letters = [ | |
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', |
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 os | |
import segmentation | |
from sklearn.externals import joblib | |
# load the model | |
current_dir = os.path.dirname(os.path.realpath(__file__)) | |
model_dir = os.path.join(current_dir, 'models/svc/svc.pkl') | |
model = joblib.load(model_dir) | |
classification_result = [] |
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
from skimage.io import imread | |
from skimage.filters import threshold_otsu | |
import matplotlib.pyplot as plt | |
car_image = imread("car.jpg", as_gray=True) | |
# it should be a 2 dimensional array | |
print(car_image.shape) | |
# the next line is not compulsory however, a grey scale pixel | |
# in skimage ranges between 0 & 1. multiplying it with 255 |
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
{ | |
"manifest_version": 2, | |
"name": "Social Media Screentime", | |
"description": "Control how much time you invest in social media", | |
"short_name": "social media screentime", | |
"version": "1.0", | |
"browser_action": { | |
"default_popup": "index.html" | |
}, | |
"background": { |
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
const urls = [ | |
'*://*.facebook.com/', | |
'*://*.twitter.com/', | |
'*://*.youtube.com/', | |
'*://*.instagram.com/' | |
] | |
let active = {}; | |
const end = () => { |
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
const urls = [ | |
'*://*.facebook.com/', | |
'*://*.twitter.com/', | |
'*://*.youtube.com/', | |
'*://*.instagram.com/' | |
] | |
const STORAGE = chrome.storage.local; | |
let active = {}; |
OlderNewer