E
E
Elnurhan2020-10-09 20:09:50
Qt
Elnurhan, 2020-10-09 20:09:50

How to integrate a neural network written in python into an application written in c++ qt?

There is a desktop application written in C++ (QT). There is a button on the form, when pressed, the neural network should identify the animal in the picture and display the result. I have attached a screenshot of the form. On the left is the original picture, when you click on the "Diagnosis" button, a picture with a cut should appear. 5f8098cc78dfd165723919.png

Is it possible to somehow integrate a neural network written in python into QT? If yes, with what technology?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-10-09
@Elnurhan

print the result in python using print and get it in the application like this:

QProcess process;
process.start("python", QStringList() << "путь_к_файлу.py");
process.waitForFinished();
QString result(process.readAllStandardOutput());
// или если текст на русском
// QString result = QString::fromLocal8Bit(process.readAllStandardOutput()));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question