This file contains hidden or 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
!wget https://www.mykidstime.com/wp-content/uploads/2017/01/family-dog.jpg -O input.jpg | |
im = cv2.imread("./input.jpg") | |
cv2_imshow(im) |
This file contains hidden or 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 torch, torchvision | |
# Импорт detectron2 и установка логгера | |
import detectron2 | |
from detectron2.utils.logger import setup_logger | |
setup_logger() | |
# numpy - для работы с векторами, сv2 - для отображения и обработки изображений | |
import numpy as np | |
import cv2 |
This file contains hidden or 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 -U torch torchvision | |
!pip install git+https://github.com/facebookresearch/fvcore.git | |
!git clone https://github.com/facebookresearch/detectron2 detectron2_repo | |
!pip install -e detectron2_repo |
This file contains hidden or 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 h2o.estimators.gbm import H2OGradientBoostingEstimator | |
mgb = H2OGradientBoostingEstimator(model_id='iris_gbm') # укажем model_id, чтобы модель можно было легче найти через flow | |
mgb.train(["sepal_len", "sepal_wid", "petal_len", "petal_wid"], "class", train) | |
mgb.model_performance(test) |
This file contains hidden or 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
ma.leader.predict(test) |
This file contains hidden or 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
ma = H2OAutoML(max_runtime_secs=150, nfolds=5) | |
ma.train(["sepal_len", "sepal_wid", "petal_len", "petal_wid"], "class", train) | |
ma.leaderboard # Выведем список наилучших по качеству моделей |
This file contains hidden or 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 h2o.automl import H2OAutoML |
This file contains hidden or 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
mdl.model_performance(test) |
This file contains hidden or 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
mdl.predict(test) |
This file contains hidden or 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
mdl.train(["sepal_len", "sepal_wid", "petal_len", "petal_wid"], "class", train) |