UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor laky
Visitor
3,557 Views
Registered: ‎01-08-2018

xfDNN questions please...

Jump to solution

Hello !!

now I am running xfDNN on ZCU102.

download demos from:

https://www.xilinx.com/applications/megatrends/machine-learning.html

and when I run ssd.elf,I get output: out1.txt and out2.txt .But all datas are 0.000000 in out1.txt or out2.txt .

who can tell me what happened?why is this result? what should I do?

 

best regards!! thanks !!

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
5,076 Views
Registered: ‎10-24-2008

Re: xfDNN questions please...

Jump to solution

@laky It turns out that I have another customer who is seeing similar behavior on this side as well.  For the moment, I don't have an answer as to why this is behaving this way.  It was mentioned that if you run the SSD implementation contained within the original public version of the demos that you will see the correct behavior.

 

https://www.xilinx.com/member/forms/download/xef.html?filename=xfDNN_2017_06_20_Public.zip&akdm=1

 

Here is an example out.txt file from the Public archive implementation.

 

I will see if I can find someone who can provide us with more information as to what the problem is in this case.

 

 

0 Kudos
19 Replies
Visitor laky
Visitor
3,524 Views
Registered: ‎01-08-2018

Re: xfDNN questions please...

Jump to solution

anyone can help me ?

0 Kudos
Xilinx Employee
Xilinx Employee
3,517 Views
Registered: ‎09-22-2015

Re: xfDNN questions please...

Jump to solution

Hi Can you post your text files out1 and out2? You need to provide it an image input which is inside the loadable bootimage. Do you have a camel.jpg file in your SD card?

There will be a lot of zeros since each value represents the probability of the Imagenet class being present in the provided image. If the NN algorithm you implemented has identified the object in the image, you should ideally only see one index have an almost .9999... number.

Here's an imagenet class index:

https://gist.github.com/yrevar/942d3a0ac09ec9e5eb3a

 

------------------------------------------------------------------------------------------------------------------------
Please mark an answer "Accept as solution" if a post has the solution to your issue.
------------------------------------------------------------------------------------------------------------------------
0 Kudos
Visitor laky
Visitor
3,507 Views
Registered: ‎01-08-2018

Re: xfDNN questions please...

Jump to solution

yes I have camel.jpg file in my SD card ,and I can get correct result from other network ,such as:vgg.elf ,googlenet.elf, resnet50,alexnet,alexnetFCN.But can't get correct result  only from  ssd.elf  network,it's results are out1.txt and out2.txt  (posted as follows)  so ,what should I do ?

 

best regards!!

0 Kudos
Visitor laky
Visitor
3,473 Views
Registered: ‎01-08-2018

Re: xfDNN questions please...

Jump to solution

anyone help me???

0 Kudos
Explorer
Explorer
3,456 Views
Registered: ‎10-24-2008

Re: xfDNN questions please...

Jump to solution

@laky  When you run_ssd.sh, I believe that you need to point the script to the directory associated with the input images (ie ./run_ssd.sh input_imgs_ssd/myimage.jpg).  This is mentioned in the PDF document, though you have to look at the screen captures from the terminal window in order to see it.

 

Another potential problem in this case may relate to assumptions made regarding the number of output classes and whether the network has been trained to classify a given category of image.  Xilinx mentions in their documentation that this SSD implementation supports 21 output classes (I am not a prototxt expert, but looking at the provided prototxt located in SD_Card\models\SSD it would appear that the classification layer is a 21-element softmax....meaning that it can classify an object into one of 21 classes where the last class indicates "other"). 

 

The original SSD-300 paper discussed 20 Pascal VOC classes:

 

aero bike bird boat bottle bus car cat chair cow table dog horse mbike person plant sheep sofa train tv

 

The Xilinx network appears to have been trained to support those 20 VOC 2012 classes.  I would thus do some testing with sample images specific to one or more of those 20 classes. 

 

Finally, for the SSD model, the out1.txt and out2.txt are the outputs of the NMS layers, indicating the box count.  Take a look at xfDNN-SDx-2017.2-Lounge-2017-09-07\example\ssd_ex.cpp

 

I am curious to know how you make out, so please if you can post your results here. 

0 Kudos
Visitor laky
Visitor
3,441 Views
Registered: ‎01-08-2018

Re: xfDNN questions please...

Jump to solution

First,thanks for your patient and useful answer.And from the document(API_Details_README.txt) provided by xilinx ,we know:

# 2. Detection Networks :
For these kind of networks, the last layer will most probably be NMS layer. The output of the NMS layer is box ID,
class ID, score (probability), co-ordinates.

# How to Interpret output data for Detection networks :
1. First entry of the output buffer is number of output boxes generated by the network for an Image.
Example:
int nOutBoxes1 = ((int*)outptr1)[0];
int nOutBoxes2 = ((int*)outptr2)[0];

2. From second entry onwards the output is arranged in the below format. Each Box will have the following 7 values.
Box-ID,
ClaasID,
Score(Prob),
Coordinates(Xmin, Ymin, Xmax, Ymax)

This order will be followed for all the output boxes.

3. With number of output boxes, user can read all the output boxes generated by SSD.
4. Xmin, Ymin, Xmax, Ymax are floating point values. To get the correct pixel positions or co-ordinates of the boxes
in the image, user has to multiply these values with input height/width (in case of SSD : 300 x 300).

Interestingly,I can get correct results from other networks,such as :AlexNet,GoogleNet and VGG16(provided in SD_Card/models ).

Its dataset is imagenet.Yes ,the last layer of SSD is  NMS layer,and I can get output boxes ,such as 6 and 4(diffrent output boxes if diffrent images).I have tested many diffrent classes images,from imagenet or  20 Pascal VOC classes.The SSD can detect the output boxes but the 7 values(in out1.txt,out2.txt):Box-ID, ClaasID, Score(Prob), Coordinates(Xmin, Ymin, Xmax, Ymax) always 0.000000,no anty other values.It confused me so much.

It is worth mentioning that I excute ssd.elf in xfDNN-SDx-2017.2-Lounge-2017-09-07 not ssd.sh .

Thank you !!  Best wishes for you ..

Explorer
Explorer
5,077 Views
Registered: ‎10-24-2008

Re: xfDNN questions please...

Jump to solution

@laky It turns out that I have another customer who is seeing similar behavior on this side as well.  For the moment, I don't have an answer as to why this is behaving this way.  It was mentioned that if you run the SSD implementation contained within the original public version of the demos that you will see the correct behavior.

 

https://www.xilinx.com/member/forms/download/xef.html?filename=xfDNN_2017_06_20_Public.zip&akdm=1

 

Here is an example out.txt file from the Public archive implementation.

 

I will see if I can find someone who can provide us with more information as to what the problem is in this case.

 

 

0 Kudos
Visitor laky
Visitor
3,376 Views
Registered: ‎01-08-2018

Re: xfDNN questions please...

Jump to solution

@qhall  thanks very much !!

I got some useful result from public version of the demos .

If possible,when you know more information about my question,give me reply.

Best regards!!

0 Kudos
Visitor luo_zhaohui
Visitor
3,345 Views
Registered: ‎09-01-2017

Re: xfDNN questions please...

Jump to solution

why all the Box-id is 0.000000???

0 Kudos
Explorer
Explorer
2,936 Views
Registered: ‎10-24-2008

Re: xfDNN questions please...

Jump to solution

@luo_zhaohui

 

At this time I am still working with the factory to determine the source of this problem.  In the meantime, you may leverage the public version of the demos mentioned earlier in this thread.  We have determined that the Public SSD demo does produce the expected results on the ZCU102.

 

As soon as I can, I will update this thread with further details regarding this problem.

 

--Quenton

0 Kudos
Visitor m.walz
Visitor
2,904 Views
Registered: ‎02-08-2018

Re: xfDNN questions please...

Jump to solution

I can confirm this problem:

SSD works fine for xfDNN_2017_06_17_Public and xfDNN_2017_06_20_Public.
But these demos "only" provide xfDNN.elf, which is called from SSD.sh, GoogleNet.sh etc....

But xfDNN-SDx-2017.2-Lounge-2017-09-07 does not work with SSD. It provides a C-API ( xfDNNInit, xfDNNExec), which I can use to compile my own elf file. But all output data except the first field (number of bounding boxes) are just zero, even with the example SSD application.

It would be great if there was a solution for this. xfDNN.elf is a good thing, but as it always re-quantizes the hole net. It is not suitable for a demo.

0 Kudos
Explorer
Explorer
2,862 Views
Registered: ‎10-24-2008

Re: xfDNN questions please...

Jump to solution

@luo_zhaohui@m.walz@laky   I have confirmed that the SSD problem is corrected in subsequent factory builds, but those builds have not yet been released.  You will see updates next week that I believe you will be pleased with.  Your local Xilinx contacts can also update you as to the strategy for xfDNN, provided that you have a Xilinx NDA in place.

 

--Quenton

0 Kudos
Explorer
Explorer
2,718 Views
Registered: ‎10-24-2008

Re: xfDNN questions please...

Jump to solution

@luo_zhaohui@m.walz@laky

 

Good news.....the Lounge version of xfDNN has been open-sourced as a project which is now known as "CHaiDNN".  All sources and scripts required to completely rebuild these designs and modify the project for your own purposes are now provided on Github:

 

https://github.com/Xilinx/CHaiDNN

 

Enjoy!

 

--Quenton

 

 

Highlighted
Visitor m.walz
Visitor
2,692 Views
Registered: ‎02-08-2018

Re: xfDNN questions please...

Jump to solution
Wow, that looks great. I will have a look at it ASAP
0 Kudos
Visitor laky
Visitor
2,641 Views
Registered: ‎01-08-2018

Re: xfDNN questions please...

Jump to solution

wow!!that's great! thank you for your information!I will try。

0 Kudos
Visitor venturezhao
Visitor
2,633 Views
Registered: ‎03-14-2018

Re: xfDNN questions please...

Jump to solution
the result seems not correct. my result is much longer than this. The correct result is only one line is '1' or '0.9999', the other lines are '0'.
0 Kudos
Visitor eensafi
Visitor
2,581 Views
Registered: ‎04-10-2018

Re: xfDNN questions please...

Jump to solution

Are you supposed to be able to build xfDNN for the ZC706?  According to page 6 of the reVISION Stack Overview, the ZC706 is a supported platform, but all available examples seem to be designed for ZCU102.

 

0 Kudos
Visitor minglili
Visitor
2,460 Views
Registered: ‎04-20-2018

Re: xfDNN questions please...

Jump to solution
Hi, I am building the project "CHaiDNN" accroding the instructions:
https://github.com/Xilinx/CHaiDNN/blob/master/BUILD_USING_SDX_GUI.md

,but the console shows :
"ERROR: Linking globals named 'clock_start': symbol multiply defined!
F:\sdsoc_example\workspace\CHaiDNN\Debug>exit /b 1
ERROR: [SdsCompiler 83-5019] Exiting sds++ : Error when calling 'D:/SDx/SDx/2017.4/bin/llvm-link -o F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/sds_all.o F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/xtract/caffe.pb.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/xtract/caffe_network_parser.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/xtract/hw_settings.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/xtract/xgraph.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/xtract/xi_funcs.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/xtract/xtract_opt.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/swkernels/xi_crop.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/swkernels/xi_nms_top.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/swkernels/xi_norm_top.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/swkernels/xi_permute_top.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/swkernels/xi_swsoftmax_top.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/scheduler/xi_scheduler.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/scheduler/xi_thread_routines.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/scheduler/xi_utils.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/interface/xi_interface.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/init/xi_init.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/include/xchange_structs.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/imageread/xi_input_image.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/example/advanced_resnet50_ex.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/example/alexnet_ex.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/example/alexnetfcn_ex.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/example/googlenet_ex.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/example/ssd_ex.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/example/vgg_ex.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/common/xi_kernels.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/checkers/checkers.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/software/bufmgmt/xi_buf_mgmt.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/design/utils/common/dnn_wrapper.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/design/src/pool/example/pooling_layer_dp_2xio_top.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/design/src/gemv/example/xi_sgemv_top.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/design/src/deconv/example/xi_deconv_top.s F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/.llvm/./src/design/src/conv/example/xi_convolution_top.s'
sds++ log file saved as F:/sdsoc_example/workspace/CHaiDNN/Debug/_sds/reports/sds.log
ERROR: [SdsCompiler 83-5004] Build failed

make: *** [CHaiDNN.elf] 错误 1

19:24:28 Build Finished (took 1m:18s.350ms)"

Do you know what happened? what should I do?

best regards!! thanks !!
0 Kudos
Adventurer
Adventurer
2,067 Views
Registered: ‎04-24-2012

Re: xfDNN questions please...

Jump to solution

Hi @minglili,

Are you trying to compile the sources in the SDx GUI?, if so, please select only one *.cpp file from the src > software > example folder, that warning is in the gtihub page.

By doing this, you'll be able to move forward.

/* Don't forget to give kudos and/or accept as a solution */
0 Kudos