I am Charmie

メモとログ

2017-01-01から1年間の記事一覧

Mesh data of 3D model: I/O and handling in Python 3

pyntcloud is a package to work with 3D point cloud in Python 3. You can install using anaconda as: pip install -i https://pypi.anaconda.org/pypi/simple laspy pip install git+https://github.com/daavoo/pyntcloud

tensorflow-gpu 1.4.0 + keras 2.1.1 on Ubuntu 16.04

Tensorflow 1.4.0 binary with CUDA 8 and cuDNN 6 Tensorflow 1.5.0 binary will be with CUDA 9 and cuDNN 7 The following procedure assumes that you use anaconda for python package manager. prepare for driver install Delete installed drivers b…

LimeSurvey: kcfinder not working

change disable = true to disable = false, at line 24 of LIMESURVEY_ROOT/third_party/kcfinder/conf/config.php.

Keras install error with Anaconda 5.0.0 for Python 3.5.4

"pip install keras" returns the following TypeError. The solution found at StackOverflow says to 1. install html5lib by conda install --force html5lib 2. install keras by pip install keras

Keras: MNIST classification

Keras implementation for MNIST classification with batch normalization and leaky ReLU. [code lang="python"] import numpy as np import time import pandas as pd import matplotlib.pyplot as plt from keras.datasets import mnist from keras.mode…

Keras: error at the beginning of fit with Dropout

When Keras' model contains Dropout component in it, we must tell the model whether we are training or test mode because the network behaves differently. The solution is mentioned in github issue and Keras docs. [code lang="python"] from ke…

Keras: plot_model returns pydot and graphviz related error on Windows

plot_model of Keras installed on Windows may return pydot and graphviz related error like "Graphviz's executables are not found'. The error cause is that the computer does not know the path of Graphviz's executable exactly mentioned as the…

Decompose a textured ply file into geometry and texture

Filter > Texture > Parametrization: Trivial Per-Triangle Filter > Texture > Transfer: Transfer Vertex Attributes to Texture (1 or 2 meshes) File > Export Mesh As (save as .obj) objファイルは頂点情報とテクスチャ座標の情報を持っている. obj…

obj file

Obj file 1. 頂点の座標 頂点の座標(x, y, z[, w]))は以下のように記述される(wはオプション.デフォルト値は1.0. ). v x y z v x y z w 以下の記述だと,3次元点(0.123, 0.234, 0.345)を表すことになる. v 0.123 0.234 0.345 1.0 テクスチャ座標 テクス…

Reduce the file size of a ply file by MeshLab

Use simplification filtering by Filters > Remeshing, Simplification and Reconstruction > Simplification: Quadratic Edge Collapse Detection Then, MeshLab pops out the following GUI. Via the GUI shown below, I set - target number of faces: s…

How to handle cyclical continuous data

The detailed explanation is available here. The point is to express cyclical data on a circle. [code lang="python"] import numpy as np import matplotlib.pyplot as plt num_data = 12 months_as_radian = np.linspace(0.0, 2.0*np.pi, num_data, F…

TensorFlow's DLL import error on windows

We need the appropriate cuDNN and this kind of import error occurred by missing the right version. See this release note. TensorFlow 1.3.0 (and other prebuilt binaries) have been built with cuDNN 6 and TensorFlow 1.4 with cuDNN 7. cuDNN in…

find a layer by name in Keras

[code lang="python"] for layer in model.layers layer_name = layer.get_config()['name'] print(layer_name) if layer_name is 'foo': print('foo') else: print('bar') [/code]

customize a model in Keras

Here's a note to customize a pre-defined model in Keras. This official information and stackoverflow post gave me how to do it. A Model is a list of layers (or layer instances) such as [code lang="python"] model = Sequential([ Dense(32, in…

セイレーンの懺悔

セイレーンの懺悔 中山七里 小学館 女子高生誘拐殺人事件を追いかけるテレビ局報道記者の話. マスコミってクソだねって臭いがプンプンする作品だけど,話自体はすごく面白い.マスコミに限った話ではなく,人間は自分の都合の良いように解釈する性質が起こ…

追憶の夜想曲

追憶の夜想曲 中山七里 講談社 今作は夫殺しの容疑で逮捕された主婦の弁護.本人も犯行を認めている.何となく隠された真実が読めるんだけど,それでも面白い.あらためてスゴイなと思ってしまった. この主婦は,御子柴が14歳の頃に殺害した女の子のお姉さ…

贖罪の奏鳴曲

贖罪の奏鳴曲 中山七里 講談社 弁護士御子柴礼司シリーズ.くそ面白かった. 御子柴は14歳の頃に近所の少女を殺害し,切断した遺体を近所に捨てるという事件を起こす.死体配達人という名前がついた. 少年院で出会った教官稲見,や友人となった嘘崎ともう一…

ドクター・デスの遺産

ドクター・デスの遺産 中山七里 角川書店 国境なき医師団に看護師として参加した女性の犯行. 充分な医療活動を行うには不十分な物資.国境なき医師団の医師ブライアンは,手の施しようのない患者の苦痛を和らげるために積極的安楽死を行う.ブライアンに惚…

ハーメルンの誘拐魔

ハーメルンの誘拐魔 中山七里 角川文庫 少女連続誘拐事件.何となく犯人と動機が読めちゃう. 1人目の被害者は子宮頸がんワクチン接種の副作用により記憶障害を患った中3の女の子.母親が目を離した数分の間にいなくなる.最後に目撃された場所の近くに,彼…

七色の毒

七色の毒 中山七里 角川文庫 刑事犬養隼人シリーズ第2弾.7話の短編が掲載されている.短編シリーズだけと,7話目と別の話が関係していた李して面白い. 内容: 中央自動車道を岐阜から新宿に向かっていた高速バスが防護柵に激突。1名が死亡、重軽傷者8名の大…

切り裂きジャックの告白

切り裂きジャックの告白 中山七里 角川文庫 今作も大どんでん返しが面白かった. 内臓をごっそり取り除かれた絞殺体が見つかり,ジャックを名乗る犯人からの犯行声明文がテレビ局に届き,犯行が続く.一見何の関係もないように見えた被害者達だが,臓器移植…

TensorFlow

TensorFlowのお勉強は「TensorFlowで学ぶディープラーニング入門」 Neural Networkの構成 出力データ = f(入力データ)を満たす関数fを設計するのと等価 誤差関数の定義 出力データの真値と推定値の誤差を評価するための関数 Networkのパラメータの精度を表す…

pytorch

pytorchを使った方が良いかもしれないと思ったので,色々調査. Tensor 任意オーダーのtensorを定義する型 Tutorialではオーダーが1,2のtensor(つまり,ベクトルと行列)のみを例として扱っている NumPyのArray型と互換性を持つ Autograd Tensorのあらゆる計…

アジャイルサムライ−達人開発者への道−

アジャイルサムライ−達人開発者への道− 著: Jonathan Rasmusson オーム社 アジャイル開発のイロハを分かりやすく解説してくれている書籍.開発に限った話ではなく,一般的に重要と思える内容が学べる珠玉の一冊.超絶おすすめ. 内容紹介: マスターセンセイ…

時系列データに対するDeep Neural Networks

今後必要になってくるはずなのでまとめてみる. Recurrent Neural Network (回帰結合ニューラルネットワーク): 時系列データを扱うNN. 隠れ層の出力が2種類: 次の層へつながる出力,自身につながる出力 Back Propagation Through Time (BPTT): 自身につなが…

PyGTK for Python 3.5 installation on Ubuntu 16.04 with anaconda

see here conda install -c ska pygtk

VRエンジニア養成読本 (Software Design plus)

ハンティング 上・下 カリン・スローター ハーパー・コリンズ ジャパン 主人公っぽいGBI捜査官ペアのやり取りとかいらんなーって感じ.猟奇殺人犯の深層心理に迫ってないし.失読症の捜査官と良い感じの仲になりそうだった女性医師は同一著者の作品の主人公…

Implementation: CycleGAN and Pix2pix

The implementation of CycleGAN and Pix2pix based on pytorch is published on github. Here's a todo procedure with anaconda. The CPU mode installation is under test right now... pytorch installation see the repository For a machine with GPU …

ARの開発環境構築

Unity + Vuforia

Keras: multiple inputs & outputs

[code lang="python"] from keras.models import Model from keras.layers import Input, Dense input_1 = Input(..., name='input_1') x = Dense(...)(input_1) x = Dense(...)(x) ... output_1 = Dense(dim_output_1, ..., name='output_1') input_2 = Inp…