Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Extend support to Python3 and PyTorch 0.4.1 #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SergioRAgostinho
Copy link

@SergioRAgostinho SergioRAgostinho commented Aug 6, 2018

Hi,

I just made some modifications in order to be able to run valid.py and train.py using Python3 and the most recent versions of PyTorch. I believe all changes proposed are backwards compatible with the original targeted versions of Python and PyTorch, mentioned in README.md.

With the changes proposed, running

python3 valid.py cfg/ape.data cfg/yolo-pose.cfg backup/ape/model_backup.weights

with the original data provided, produced the following output.

layer     filters    size              input                output
    0 conv     32  3 x 3 / 1   416 x 416 x   3   ->   416 x 416 x  32
    1 max          2 x 2 / 2   416 x 416 x  32   ->   208 x 208 x  32
    2 conv     64  3 x 3 / 1   208 x 208 x  32   ->   208 x 208 x  64
    3 max          2 x 2 / 2   208 x 208 x  64   ->   104 x 104 x  64
    4 conv    128  3 x 3 / 1   104 x 104 x  64   ->   104 x 104 x 128
    5 conv     64  1 x 1 / 1   104 x 104 x 128   ->   104 x 104 x  64
    6 conv    128  3 x 3 / 1   104 x 104 x  64   ->   104 x 104 x 128
    7 max          2 x 2 / 2   104 x 104 x 128   ->    52 x  52 x 128
    8 conv    256  3 x 3 / 1    52 x  52 x 128   ->    52 x  52 x 256
    9 conv    128  1 x 1 / 1    52 x  52 x 256   ->    52 x  52 x 128
   10 conv    256  3 x 3 / 1    52 x  52 x 128   ->    52 x  52 x 256
   11 max          2 x 2 / 2    52 x  52 x 256   ->    26 x  26 x 256
   12 conv    512  3 x 3 / 1    26 x  26 x 256   ->    26 x  26 x 512
   13 conv    256  1 x 1 / 1    26 x  26 x 512   ->    26 x  26 x 256
   14 conv    512  3 x 3 / 1    26 x  26 x 256   ->    26 x  26 x 512
   15 conv    256  1 x 1 / 1    26 x  26 x 512   ->    26 x  26 x 256
   16 conv    512  3 x 3 / 1    26 x  26 x 256   ->    26 x  26 x 512
   17 max          2 x 2 / 2    26 x  26 x 512   ->    13 x  13 x 512
   18 conv   1024  3 x 3 / 1    13 x  13 x 512   ->    13 x  13 x1024
   19 conv    512  1 x 1 / 1    13 x  13 x1024   ->    13 x  13 x 512
   20 conv   1024  3 x 3 / 1    13 x  13 x 512   ->    13 x  13 x1024
   21 conv    512  1 x 1 / 1    13 x  13 x1024   ->    13 x  13 x 512
   22 conv   1024  3 x 3 / 1    13 x  13 x 512   ->    13 x  13 x1024
   23 conv   1024  3 x 3 / 1    13 x  13 x1024   ->    13 x  13 x1024
   24 conv   1024  3 x 3 / 1    13 x  13 x1024   ->    13 x  13 x1024
   25 route  16
   26 conv     64  1 x 1 / 1    26 x  26 x 512   ->    26 x  26 x  64
   27 reorg              / 2    26 x  26 x  64   ->    13 x  13 x 256
   28 route  27 24
   29 conv   1024  3 x 3 / 1    13 x  13 x1280   ->    13 x  13 x1024
   30 conv     20  1 x 1 / 1    13 x  13 x1024   ->    13 x  13 x  20
   31 detection
2018-08-06 15:33:48    Testing ape...
2018-08-06 15:33:48    Number of test samples: 1050
-----------------------------------
  tensor to cuda : 0.000332
         predict : 0.002955
get_region_boxes : 0.051849
            eval : 0.014257
           total : 0.069392
-----------------------------------
2018-08-06 15:35:02 Results of ape
2018-08-06 15:35:02    Acc using 5 px 2D Projection = 94.48%
2018-08-06 15:35:02    Acc using 10% threshold - 0.0103 vx 3D Transformation = 28.00%
2018-08-06 15:35:02    Acc using 5 cm 5 degree metric = 51.90%
2018-08-06 15:35:02    Mean 2D pixel error is 2.833865, Mean vertex error is 0.029564, mean corner error is 4.058189
2018-08-06 15:35:02    Translation error: 0.029320 m, angle error: 5.689846 degree, pixel error:  2.833865 pix

I looks ok-ish, but I would be good to have some confirmation from your side that was no deterioration in performance. I will be performing the porting to the training routine later on.

@msftclas
Copy link

msftclas commented Aug 6, 2018

CLA assistant check
All CLA requirements met.

@juanmed
Copy link

juanmed commented Feb 12, 2020

Making these changes for the multi object pose estimation task seem to work as well.

@CVUsers
Copy link

CVUsers commented Feb 14, 2021

@SergioRAgostinho

Hello, how to use it on the latest Python?

In addition, I always report this error: output = model (data). Data: runtimeerror: cudnn error: cudnn_ STATUS_ MAPPING_ ERROR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants