mirror of https://github.com/open-mmlab/mmyolo.git
[Fix] Fix YOLOv8 graph and a lint issue (#459)
* add missing bg frame * fix easydeploy lintpull/469/head
parent
8e39252259
commit
e66991fc6e
|
@ -7,7 +7,7 @@
|
|||
Ultralytics YOLOv8, developed by Ultralytics, is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection, image segmentation and image classification tasks.
|
||||
|
||||
<div align=center>
|
||||
<img src="https://user-images.githubusercontent.com/27466624/211810400-a12a01f5-39fc-414f-85a7-8dead9f0c232.jpg"/>
|
||||
<img src="https://user-images.githubusercontent.com/27466624/211974251-8de633c8-090c-47c9-ba52-4941dc9e3a48.jpg"/>
|
||||
YOLOv8-P5 model structure
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import torch
|
|||
import torch.nn as nn
|
||||
from torch import Tensor
|
||||
|
||||
|
||||
class DeployC2f(nn.Module):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -9,7 +10,7 @@ class DeployC2f(nn.Module):
|
|||
|
||||
def forward(self, x: Tensor) -> Tensor:
|
||||
x_main = self.main_conv(x)
|
||||
x_main = [x_main, x_main[:,self.mid_channels:,...]]
|
||||
x_main = [x_main, x_main[:, self.mid_channels:, ...]]
|
||||
x_main.extend(blocks(x_main[-1]) for blocks in self.blocks)
|
||||
x_main.pop(1)
|
||||
return self.final_conv(torch.cat(x_main, 1))
|
||||
|
|
Loading…
Reference in New Issue