


機械学習 マスク写真判定
画像から人間の顔を検出して、顔画像を保存するプログラムimport cv2, dlib, sys, glob, pprint# 入力ディレクトリの指定indir = "./capture"# 出力ディレクトリの指定outdir = "./f...

機械学習 業務 写真判定
FlickrAPIで写真をダウンロード# Flickrで写真を検索して、ダウンロードするfrom flickrapi import FlickrAPIfrom urllib.request import urlretrievefrom pp...

機械学習 身長体重DB
import sqlite3dbpath = "./hw.sqlite3"sql = '''CREATE TABLE IF NOT EXISTS person ( id INTEGER PRIMARY KEY, height NUMBER,...

インフラゼロハウス

機械学習 業務
#データの保存from sklearn import datasets, svmimport pickle#アヤメのサンプルデータ読み込むiris = datasets.load_iris()#データを学習clf = svm.SVC()cl...

ディープラーニング カタカナ判定 CNNは画像に強い
ETL文字データベースは日本語の手書きデータを多く収録データベースに画像を変換#ETL1ファイルを読み込むimport structfrom PIL import Image, ImageEnhanceimport glob, os#出力デ...

やってくるこれからの時代
AIが登場して、ホワイトカラー業務を行うようになり、メタルカラー業務が生まれる。多くの人間は労働集約型のブルーカラー業務を担うようになる。やがてロボットが登場して、ブルーカラー業務を担うようになり、メタルカラー業務が増える。人間にしかできな...

ディープラーニング 物体認識
from keras.datasets import cifar10(X_train, y_train), (X_test, y_test) = cifar10.load_data()import matplotlib.pyplotfrom...

ディープラーニング CNNアルゴリズム
# CNNでMNISTの分類問題に挑戦import kerasfrom keras.models import Sequentialfrom keras.layers import Dense, Dropout, Flattenfrom k...

whisper kotoba-shisper-v1.0
import torchfrom transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline# configmodel_id = "kotoba-tech/k...

ディープラーニング ニューラルネットワーク MNIST
#最低限のニューラルネットワークimport kerasfrom keras.datasets import mnistfrom matplotlib import pyplot# #MINSTデータ読み込み(X_train, y_trai...

アヤメの分類 tensorflow
import tensorflow as tfimport tensorflow.keras as kerasfrom sklearn.model_selection import train_test_splitimport pandas...

python music

ディープラーニング tensorflow
import tensorflow as tfprint(tf.__version__)#じゃんけんデータを作成するimport pickleimport numpy as np#ジャン絵の手と結果を定義hands = {'グー': 0, ...

機械学習 スパム
#単語のデータベースを作成するimport os, globimport MeCabimport numpy as npimport pickle#保存ファイル名savefile = "./ok-spam.pikcle"#MeCabの準備t...

機械学習 マルコフ連鎖
import MeCabimport os,json,randomdict_file = "markov_dict.json"dic = {}# 辞書への登録 --- (*1)def regist_dic(wordlist): global...

機械学習 文章の分類 Doc2Vec
import zipfileimport os.pathimport urllib.request as reqimport MeCabfrom gensim import modelsfrom gensim.models.doc2vec ...

機械学習 コーパス MeCab
import MeCab# MeCabの初期化時にmecabrcのパスを明示的に指定するtagger = MeCab.Tagger("-r /etc/mecabrc")# 形態素解析を実行result = tagger.parse("メイが...

ja_wiki コーパス作成 docker ruby2.3
# dockerの作成docker pull ruby:2.3docker run -it ruby:2.3 /bin/bashgem install parallel -v 1.19.2gem install racc -v 1.5.2g...