Comments (2)
Hi,
Right now, there is no command line option to do exactly what you want, but this is actually easy using the N2D2 C++ API. This is done in the n2d2_live executable for example.
The relevant piece of code is the following:
deepNet
->getStimuliProvider()
->streamStimulus(img, Database::Test);
deepNet->test(Database::Test);
std::shared_ptr<TargetScore> targetPicture
= deepNet->getTarget<TargetScore>();
const Tensor3d<int> estimatedLabel
= targetPicture->getEstimatedLabels()[0];
const Tensor3d<Float_T> estimatedLabelValue
= targetPicture->getEstimatedLabelsValue()[0];
Then, to display or save the labels estimated probabilities:
for (unsigned int i = 0, size = TOPN; i < size; ++i) {
std::string displayEstimatedName
= deepNet->getDatabase()->getLabelName(estimatedLabel(i));
double displayEstimatedValue = estimatedLabelValue(i);
std::cout << displayEstimatedName
<< ": "
<< displayEstimatedValue
<< "\n";
}
For the exports, only the CPP_cuDNN export is available in the open source N2D2 right now. Please refer to the manual (section "About N2D2-IP") to obtain more information on the availability of other export modules.
from n2d2.
Thanks a lot for your time and these informations - with a little bit of modifications here and there I was able to extract what I wanted.
from n2d2.
Related Issues (20)
- Do not insert Target in ONNX HOT 1
- Bug ONNX HOT 1
- N2D2 Cross Compilation HOT 2
- ONNX not available when using dockerized N2D2 HOT 2
- Feature maps HOT 1
- multiple common.config in .ini file HOT 1
- Import Onnx give a segfault HOT 20
- VGG on CIFAR HOT 2
- Compilation n2d2 : 'runtime_error' is not a member of 'std' HOT 2
- Issue while running MNIST HOT 4
- Reshape Quantization not supported? HOT 1
- Invalid registrar key "Transcode" HOT 2
- Could not find NVML during CMake on a Jetson Orin (iGPU) HOT 2
- Make fails during linking HOT 2
- Make fails to compile HOT 1
- Install Gnuplot but still giving this error "Could NOT find Gnuplot (missing: GNUPLOT_EXECUTABLE)" HOT 4
- Multiples issues on Windows HOT 1
- Adapt scripts to Python 3
- Loading ONNX models results in invalid path on Windows HOT 1
- Log labels mapping only 2 classes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from n2d2.