ghimiredhikura / Complex-YOLOv3

PyTorch implementation of Complex-YOLO paper with YoloV3
GNU General Public License v3.0
191 stars 69 forks source link

Python numpy function --> PyTorch CUDA conversion #1

Open ghimiredhikura opened 5 years ago

ghimiredhikura commented 5 years ago

In this project there are mainly three stages. 1. Preprocessing
read PC data and convert to BEV image 2. CNN
pass bev image through yolov3 network 3. Postprocessing decode yolo output, draw and display results.

The BEV conversion script is implemented using python numpy functions, to make it super real time we have to change this function into PyTorch CUDA. It will be great if anyone can do it.

Thanks.

sidml commented 5 years ago

I was trying to convert it to GPU but i came across the following issue..

  1. No return_counts in torch.unique. There are some hacky ways to solve this but it degrades the performance. https://github.com/pytorch/pytorch/issues/12598
  2. No lexsort function in pytorch.

I though of using cupy which seems to be a one line replacement for numpy, but it didn't work.. The main issue is the cupy.unique doesn't support axis yet.. https://docs-cupy.chainer.org/en/stable/reference/generated/cupy.unique.html

ghimiredhikura commented 5 years ago

Thanks for your efforts. Yes the functions you mentioned are not implemented in pytorch cuda. I think they need to be implemented ourself.