Got it

Unsatisfied result with Yolov3 sample on 200DK, looking for help

Latest reply: Apr 29, 2020 07:24:26 572 6 0 0 0
  1. we followed steps from Huawei forum https://bbs.huaweicloud.com/forum/thread-45383-1-1.html to perform .ckpt -> .pb -> .om conversion

  2. our script, that is attached to this message (yolo_main.txt) is slightly modified code from https://gitee.com/Atlas200DK/sample-fasterrcnndetection-python. Main changes are listed below:

    - we changed width and height everywhere its needed to 416

    - we removed infoTensor from datalist, and pass [inputImageTensor] to inference

    - to parse net output, we used code from last code snippet available here:         https://machinelearningmastery.com/how-to-perform-object-detection-with-yolov3-in-keras/

    - we changed cv2.cvtColor(src_image, cv2.COLOR_BGR2RGB) to cv2.cvtColor(src_image, cv2.     COLOR_BGR2YUV_I420)

    - we added possibility to feed model with photos

 

TEST IMAGE

 

original picture


 

Results of inference with class threshold = 0.6, and nms threshold = 0.5 (same as in PC script):


There were 520 detections with min. 60% confidence and at least one detection for each class.

unsatisfied result


At the same time we tried to run .pb model at PC. This script  is also attached to email (yolo_v3_pb.txt) – and results were perfect – 4 detections with correctly matched bounding boxes.


 

good result

Do you have any idea, why results are so different?

 

We managed to successfully convert and test simple digits classifier trained on MNIST dataset. Model was built utilizing TensorFlow 1.12 API. The obtained accuracy on Atlas was above 90%, as expected based upon training results. This model was trained utilizing RGB images (BW channel was repeated 3 times along channels axis).

 

How to convert yolov3 model to make it work as good as on PC?

We tried dozens conversion settings, color space conversions and input files, but each time inference’s output didn’t meet PC results.


hi,
thank you for feedback, please be patient while we solve your question^^
View more
  • x
  • convention:

Hi,could you upload your *.pb file ? We have a try to convert it to om and test it 。 Thank you!
View more
  • x
  • convention:

I guess, maybe something is wrong with conversion settings。 The conversion setting must be match with the test code。Can you upload the coversion picture ?
View more
  • x
  • convention:

There is a reference:
https://gitee.com/Atlas200DK/learningAtlas200DK/blob/develop/samples_python/yolov3.py
https://gitee.com/Atlas200DK/learningAtlas200DK/blob/develop/samples_python/yolov3模型转换.png
View more
  • x
  • convention:

Could you please provide your pb model? Here is a yolov3 detection sample I write. Maybe the way you convert model does not match your preprocess or your post process is not correct. By the way, the output of python api is not consistent with actual memory layout: https://www.huaweicloud.com/intl/en-us/ascend/doc/Atlas200DK/1.32.0.0(beta)/en/en-us_topic_0204323817.html
View more
  • x
  • convention:

Is your problem solved?
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.