Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I produce profiling for the "yolo_nano" that is finding the time taken by each layer in this? #9

Open
jaskiratsingh2000 opened this issue Jun 4, 2021 · 5 comments

Comments

@jaskiratsingh2000
Copy link

Hey, @ardeal I want to produce similar profiling as you could see below that tells that how much time is taken by each layer in the yolov5. The ultralytics/yolo5 repo has a prebuilt profiling tool inside yolo.py itself which on running creates this type of profiling but I couldn't find any similar thing in yolo_nano. Can you please tell me how would that be possible in this case?

The thing to produce for yolo_nano?

/content/yolov5
YOLOv5 :rocket: v5.0-44-g5afe783 torch 1.8.1+cu101 CPU
                 from  n    params  module                                  arguments                     
  0                -1  1      3520  models.common.Focus                     [3, 32, 3]                    
  1                -1  1     18560  models.common.Conv                      [32, 64, 3, 2]                
  2                -1  1     18816  models.common.C3                        [64, 64, 1]                   
  3                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]               
  4                -1  1    156928  models.common.C3                        [128, 128, 3]                 
  5                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]              
  6                -1  1    625152  models.common.C3                        [256, 256, 3]                 
  7                -1  1   1180672  models.common.Conv                      [256, 512, 3, 2]              
  8                -1  1    656896  models.common.SPP                       [512, 512, [5, 9, 13]]        
  9                -1  1   1182720  models.common.C3                        [512, 512, 1, False]          
 10                -1  1    131584  models.common.Conv                      [512, 256, 1, 1]              
 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          
 12           [-1, 6]  1         0  models.common.Concat                    [1]                           
 13                -1  1    361984  models.common.C3                        [512, 256, 1, False]          
 14                -1  1     33024  models.common.Conv                      [256, 128, 1, 1]              
 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          
 16           [-1, 4]  1         0  models.common.Concat                    [1]                           
 17                -1  1     90880  models.common.C3                        [256, 128, 1, False]          
 18                -1  1    147712  models.common.Conv                      [128, 128, 3, 2]              
 19          [-1, 14]  1         0  models.common.Concat                    [1]                           
 20                -1  1    296448  models.common.C3                        [256, 256, 1, False]          
 21                -1  1    590336  models.common.Conv                      [256, 256, 3, 2]              
 22          [-1, 10]  1         0  models.common.Concat                    [1]                           
 23                -1  1   1182720  models.common.C3                        [512, 512, 1, False]          
 24      [17, 20, 23]  1    229245  Detect                                  [80, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512]]
Model Summary: 283 layers, 7276605 parameters, 7276605 gradients, 17.1 GFLOPS
 time (ms)     GFLOPS     params  module
     11.90       0.18       3520  models.common.Focus
      8.65       0.24      18560  models.common.Conv
     15.68       0.24      18816  models.common.C3
      6.20       0.24      73984  models.common.Conv
     20.03       0.50     156928  models.common.C3
      5.97       0.24     295424  models.common.Conv
     17.69       0.50     625152  models.common.C3
      8.36       0.24    1180672  models.common.Conv
     15.80       0.13     656896  models.common.SPP
     10.73       0.24    1182720  models.common.C3
      1.35       0.03     131584  models.common.Conv
      0.70       0.00          0  torch.nn.modules.upsampling.Upsample
      0.16       0.00          0  models.common.Concat
     11.79       0.29     361984  models.common.C3
      1.22       0.03      33024  models.common.Conv
      1.33       0.00          0  torch.nn.modules.upsampling.Upsample
      0.29       0.00          0  models.common.Concat
     11.75       0.29      90880  models.common.C3
      3.47       0.12     147712  models.common.Conv
      0.10       0.00          0  models.common.Concat
      8.68       0.24     296448  models.common.C3
      3.87       0.12     590336  models.common.Conv
      0.04       0.00          0  models.common.Concat
     10.87       0.24    1182720  models.common.C3
      5.37       0.18     229245  Detect
182.0ms total

So @ardeal can you please help me know that how it can be possible in this case? Looking forward to hearing from you.

@jaskiratsingh2000
Copy link
Author

Even if that is not possible Is there a way to find the total time taken? @ardeal Please let me know that would be of great help
I am looking forward to hearing your response. Thanks!

@jaskiratsingh2000
Copy link
Author

@ardeal did you get a chance to check on above? Can you please let me know?

@jaskiratsingh2000
Copy link
Author

@ardeal Can you please let me know that how can I achieve the profiling thing for the yolo_nano?

@jaskiratsingh2000
Copy link
Author

@ardeal It's been a while. haven't heard anything from you. please let me know @ardeal that would be helpful

1 similar comment
@jaskiratsingh2000
Copy link
Author

@ardeal It's been a while. haven't heard anything from you. please let me know @ardeal that would be helpful

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

No branches or pull requests

1 participant