axinc-ai / ailia-models-cpp Goto Github PK
View Code? Open in Web Editor NEWC++ version of ailia models repository
C++ version of ailia models repository
現状のtranspose関数は下記となっている。
void transpose(const cv::Mat& simg, cv::Mat& dimg, std::vector<int> swap = {2, 0, 1})
{
std::vector<int> size0;
if (simg.rows > 0) {
size0 = {simg.rows, simg.cols, simg.channels()};
}
else {
size0 = {simg.size[0], simg.size[1], simg.size[2]};
}
std::vector<int> size1 = {size0[swap[0]], size0[swap[1]], size0[swap[2]]};
dimg = cv::Mat(size1.size(), &size1[0], simg.type());
}
ここで、dimgのcv::Matにsimg.type()を引き継いでいるが、imreadした画像のMatはCV_32FC3であり、transpose後の値としては正しくない。下記のようにCV_32FC1にするのが正しい。
dimg = cv::Mat(size1.size(), &size1[0], CV_32FC1);
cv::imreadした直後は、CV_8UC3が入り、transform関数でCV_32FC3を設定している。その後、transposeもCV_32FC3を引き継ぐが、transposeではCV_32FC1が望ましい。
Implement fugumt with ailia.tokenizer.
日本語から英語への翻訳モデル。
en-jaは実装済みなのでja-enを追加する。
https://github.com/axinc-ai/ailia-models/tree/master/natural_language_processing/fugumt-ja-en
ailia SDKとailia Tokenizerを使用する。
ビルド方法は下記のREADME.mdの末尾を参照。
https://github.com/axinc-ai/ailia-models-cpp
テストを通す。
従来のyolov3-tinyのサンプルもcmake + utilに書き換える。
u2net_utils.cppとimage_utils.cppに同じload_image関数がある。
Add m2det and lw-human-pose
Implement bert japanese with ailia.tokenizer.
Implement sentence transformer using ailia.tokenizer.
StableDiffusionをailia.tokenizerを使ってC++実装する。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.