cfzd / Ultra-Fast-Lane-Detection

Ultra Fast Structure-aware Deep Lane Detection (ECCV 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

So many mistakes in cpp inference code

Gwencong opened this issue · comments

When I inferred with the same image of culane with python and cpp, python result was correct but cpp result was wrong, then I read the cpp inference code and find there were so many mistakes in the cpp inference code with libtorch,such as:

  1. image process: python code was normalized with imagenet mean and std, but cpp was not;
  2. the arange idx in here was inconsistent with python;
  3. the axis of sum op here after softmax and multiply with arange idx was wrong;
  4. the decode of xy coordinate was wrong here: it should be loc instead of outputTensor, loc was the correct result but outputTensor is just the result of argmax;

Perhaps there are other errors in the cpp code.