diff --git a/README.md b/README.md index ea86f3ce..0fc7c330 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ On the `ONNXRuntime` front you can use the [C++ example](deployment/onnxruntime) Now, `yolort` can draw the model graph directly, checkout our [model-graph-visualization](notebooks/model-graph-visualization.ipynb) notebook to see how to use and visualize the model graph. -YOLO model visualize +YOLO model visualize ## :mortar_board: Acknowledgement diff --git a/notebooks/assets/yolov5.detail.svg b/notebooks/assets/yolov5.detail.svg deleted file mode 100644 index e78744d8..00000000 --- a/notebooks/assets/yolov5.detail.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - -%3 - -YOLOModule - -cluster_.73 - -model (YOLO) - - -cluster_model..32 - -model.head (YOLOHead) - - - -inp_inp - -inp_inp - - - -.72 - -transform (YOLOTransform) - - - -inp_inp->.72 - - - - - -model.inp_1 - -model.inp_1 - - - -.72->model.inp_1 - - - - - -inp_out_0 - -div mul - - - -.72->inp_out_0 - - - - - -model..31 - -model.backbone (BackboneWithPAN) - - - -model.inp_1->model..31 - - - - - -model.head.inp_1 - -model.head.inp_1 - - - -model..31->model.head.inp_1 - - - - - -model.head.inp_2 - -model.head.inp_2 - - - -model..31->model.head.inp_2 - - - - - -model.head.inp_3 - -model.head.inp_3 - - - -model..31->model.head.inp_3 - - - - - -model..33 - -model.anchor_generator (AnchorGenerator) - - - -model..31->model..33 - - - - - -model.head..92 - -model.head.head.0 (Conv2d) - - - -model.head.inp_1->model.head..92 - - - - - -model.head..93 - -model.head.head.1 (Conv2d) - - - -model.head.inp_2->model.head..93 - - - - - -model.head..94 - -model.head.head.2 (Conv2d) - - - -model.head.inp_3->model.head..94 - - - - - -model.head.out_0 - -model.head.out_0 - - - -model.head..92->model.head.out_0 - - - - - -model.head..93->model.head.out_0 - - - - - -model.head..94->model.head.out_0 - - - - - -model..34 - -model.post_process (PostProcess) - - - -model.head.out_0->model..34 - - - - - -model..33->model..34 - - - - - -model.out_0 - -model.out_0 - - - -model..34->model.out_0 - - - - - -model.out_0->inp_out_0 - - - - - -out_0 - -out_0 - - - -inp_out_0->out_0 - - - - - diff --git a/notebooks/assets/yolov5_graph_visualize.png b/notebooks/assets/yolov5_graph_visualize.png new file mode 100644 index 00000000..64d228f6 Binary files /dev/null and b/notebooks/assets/yolov5_graph_visualize.png differ diff --git a/notebooks/assets/yolov5_graph_visualize.svg b/notebooks/assets/yolov5_graph_visualize.svg new file mode 100644 index 00000000..8a5ed075 --- /dev/null +++ b/notebooks/assets/yolov5_graph_visualize.svg @@ -0,0 +1,245 @@ + + + + + + + +YOLOv5 + +cluster_.73 + +model (YOLO) + + +cluster_model..32 + +model.head (YOLOHead) + + + +input_x.1 + +input_x.1 + + + +.72 + +transform (YOLOTransform) + + + +input_x.1->.72 + + + + + +model.input_1 + +model.input_1 + + + +.72->model.input_1 + + + + + +input_output_0 + +stack div mul + + + +.72->input_output_0 + + + + + +model..31 + +model.backbone (BackboneWithPAN) + + + +model.input_1->model..31 + + + + + +model.head.input_1 + +model.head.input_1 + + + +model..31->model.head.input_1 + + + + + +model.head.input_2 + +model.head.input_2 + + + +model..31->model.head.input_2 + + + + + +model.head.input_3 + +model.head.input_3 + + + +model..31->model.head.input_3 + + + + + +model..33 + +model.anchor_generator (AnchorGenerator) + + + +model..31->model..33 + + + + + +model.head..92 + +model.head.head.0 (Conv2d) + + + +model.head.input_1->model.head..92 + + + + + +model.head..93 + +model.head.head.1 (Conv2d) + + + +model.head.input_2->model.head..93 + + + + + +model.head..94 + +model.head.head.2 (Conv2d) + + + +model.head.input_3->model.head..94 + + + + + +input_model.head.output_0 + +permute view + + + +model.head..92->input_model.head.output_0 + + + + + +model.head..93->input_model.head.output_0 + + + + + +model.head..94->input_model.head.output_0 + + + + + +model.head.output_0 + +model.head.output_0 + + + +model..34 + +model.post_process (PostProcess) + + + +model.head.output_0->model..34 + + + + + +input_model.head.output_0->model.head.output_0 + + + + + +model..33->model..34 + + + + + +model.output_0 + +model.output_0 + + + +model..34->model.output_0 + + + + + +model.output_0->input_output_0 + + + + + +output_0 + +output_0 + + + +input_output_0->output_0 + + + + + diff --git a/notebooks/model-graph-visualization.ipynb b/notebooks/model-graph-visualization.ipynb index d2eb6a40..dc99e0ec 100644 --- a/notebooks/model-graph-visualization.ipynb +++ b/notebooks/model-graph-visualization.ipynb @@ -45,20 +45,28 @@ "name": "stderr", "output_type": "stream", "text": [ - "/usr/local/lib/python3.6/dist-packages/torch/tensor.py:593: RuntimeWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).\n", - " 'incorrect results).', category=RuntimeWarning)\n", - "/data/wangzq/yolov5-rt-stack/yolort/models/anchor_utils.py:31: TracerWarning: torch.as_tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/opt/homebrew/lib/python3.9/site-packages/pytorch_lightning/core/lightning.py:168: LightningDeprecationWarning: The `LightningModule.datamodule` property is deprecated in v1.3 and will be removed in v1.5. Access the datamodule through using `self.trainer.datamodule` instead.\n", + " rank_zero_deprecation(\n", + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/yolo_module.py:97: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).\n", + " for img in inputs:\n", + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/transform.py:79: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).\n", + " images = [img for img in images]\n", + "/opt/homebrew/lib/python3.9/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at ../c10/core/TensorImpl.h:1156.)\n", + " return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)\n", + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/anchor_utils.py:31: TracerWarning: torch.as_tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " stride = torch.as_tensor([stride], dtype=dtype, device=device)\n", - "/data/wangzq/yolov5-rt-stack/yolort/models/anchor_utils.py:50: TracerWarning: torch.as_tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/anchor_utils.py:50: TracerWarning: torch.as_tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " anchor_grid = torch.as_tensor(anchor_grid, dtype=dtype, device=device)\n", - "/data/wangzq/yolov5-rt-stack/yolort/models/anchor_utils.py:79: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/anchor_utils.py:79: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " shifts = shifts - torch.tensor(0.5, dtype=shifts.dtype, device=device)\n", - "/data/wangzq/yolov5-rt-stack/yolort/models/box_head.py:332: TracerWarning: Converting a tensor to a Python index might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", - " for idx in range(batch_size): # image idx, image inference\n", - "/data/wangzq/yolov5-rt-stack/yolort/models/transform.py:298: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", - " for s, s_orig in zip(new_size, original_size)\n", - "/data/wangzq/yolov5-rt-stack/yolort/models/transform.py:298: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n", - " for s, s_orig in zip(new_size, original_size)\n" + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/transform.py:312: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + " torch.tensor(s, dtype=torch.float32, device=boxes.device)\n", + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/transform.py:312: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n", + " torch.tensor(s, dtype=torch.float32, device=boxes.device)\n", + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/transform.py:313: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + " / torch.tensor(s_orig, dtype=torch.float32, device=boxes.device)\n", + "/Users/zhiqiang/Coding/yolov5-rt-stack/yolort/models/transform.py:313: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n", + " / torch.tensor(s_orig, dtype=torch.float32, device=boxes.device)\n" ] } ], @@ -77,8 +85,8 @@ "output_type": "stream", "text": [ "def forward(self,\n", - " images: Tensor) -> Tuple[Tensor, Tensor, Tensor]:\n", - " _0, _1, _2, = (self.model).forward(images, )\n", + " x: Tensor) -> Tuple[Tensor, Tensor, Tensor]:\n", + " _0, _1, _2, = (self.model).forward(x, )\n", " return (_0, _1, _2)\n", "\n" ] @@ -126,252 +134,251 @@ "\n", "\n", - "\n", - "\n", - "\n", - "\n", - "%3\n", - "\n", - "YOLOModule\n", + "\n", + "\n", + "\n", + "\n", + "YOLOv5\n", "\n", "cluster_.73\n", - "\n", - "model (YOLO)\n", + "\n", + "model (YOLO)\n", "\n", "\n", "cluster_model..32\n", - "\n", - "model.head (YOLOHead)\n", + "\n", + "model.head (YOLOHead)\n", "\n", - "\n", + "\n", "\n", - "input_images\n", - "\n", - "input_images\n", + "input_x.1\n", + "\n", + "input_x.1\n", "\n", "\n", "\n", ".72\n", - "\n", - "transform (YOLOTransform)\n", + "\n", + "transform (YOLOTransform)\n", "\n", - "\n", + "\n", "\n", - "input_images->.72\n", - "\n", - "\n", + "input_x.1->.72\n", + "\n", + "\n", "\n", "\n", "\n", "model.input_1\n", - "\n", - "model.input_1\n", + "\n", + "model.input_1\n", "\n", "\n", "\n", ".72->model.input_1\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "input_output_0\n", - "\n", - "mul div stack\n", + "\n", + "mul stack div\n", "\n", "\n", - "\n", + "\n", ".72->input_output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model..31\n", - "\n", - "model.backbone (BackboneWithPAN)\n", + "\n", + "model.backbone (BackboneWithPAN)\n", "\n", "\n", "\n", "model.input_1->model..31\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.head.input_1\n", - "\n", - "model.head.input_1\n", + "\n", + "model.head.input_1\n", "\n", "\n", "\n", "model..31->model.head.input_1\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.head.input_2\n", - "\n", - "model.head.input_2\n", + "\n", + "model.head.input_2\n", "\n", "\n", "\n", "model..31->model.head.input_2\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.head.input_3\n", - "\n", - "model.head.input_3\n", + "\n", + "model.head.input_3\n", "\n", "\n", "\n", "model..31->model.head.input_3\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model..33\n", - "\n", - "model.anchor_generator (AnchorGenerator)\n", + "\n", + "model.anchor_generator (AnchorGenerator)\n", "\n", "\n", "\n", "model..31->model..33\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.head..92\n", - "\n", - "model.head.head.0 (Conv2d)\n", + "\n", + "model.head.head.0 (Conv2d)\n", "\n", "\n", "\n", "model.head.input_1->model.head..92\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.head..93\n", - "\n", - "model.head.head.1 (Conv2d)\n", + "\n", + "model.head.head.1 (Conv2d)\n", "\n", "\n", "\n", "model.head.input_2->model.head..93\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.head..94\n", - "\n", - "model.head.head.2 (Conv2d)\n", + "\n", + "model.head.head.2 (Conv2d)\n", "\n", "\n", "\n", "model.head.input_3->model.head..94\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "input_model.head.output_0\n", - "\n", - "permute view\n", + "\n", + "view permute\n", "\n", "\n", - "\n", + "\n", "model.head..92->input_model.head.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.head..93->input_model.head.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.head..94->input_model.head.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.head.output_0\n", - "\n", - "model.head.output_0\n", + "\n", + "model.head.output_0\n", "\n", "\n", "\n", "model..34\n", - "\n", - "model.post_process (PostProcess)\n", + "\n", + "model.post_process (PostProcess)\n", "\n", "\n", "\n", "model.head.output_0->model..34\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "input_model.head.output_0->model.head.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model..33->model..34\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.output_0\n", - "\n", - "model.output_0\n", + "\n", + "model.output_0\n", "\n", "\n", "\n", "model..34->model.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.output_0->input_output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "output_0\n", - "\n", - "output_0\n", + "\n", + "output_0\n", "\n", "\n", "\n", "input_output_0->output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 8, @@ -403,390 +410,389 @@ "\n", "\n", - "\n", - "\n", - "\n", - "\n", - "%3\n", - "\n", - "YOLOModule\n", + "\n", + "\n", + "\n", + "\n", + "YOLOv5\n", "\n", "cluster_.73\n", - "\n", - "model (YOLO)\n", + "\n", + "model (YOLO)\n", "\n", "\n", "cluster_model..34\n", - "\n", - "model.post_process (PostProcess)\n", + "\n", + "model.post_process (PostProcess)\n", "\n", - "\n", + "\n", "\n", - "input_images\n", - "\n", - "input_images\n", + "input_x.1\n", + "\n", + "input_x.1\n", "\n", "\n", "\n", ".72\n", - "\n", - "transform (YOLOTransform)\n", + "\n", + "transform (YOLOTransform)\n", "\n", - "\n", + "\n", "\n", - "input_images->.72\n", - "\n", - "\n", + "input_x.1->.72\n", + "\n", + "\n", "\n", "\n", "\n", "model.input_1\n", - "\n", - "model.input_1\n", + "\n", + "model.input_1\n", "\n", "\n", "\n", ".72->model.input_1\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "input_output_0\n", - "\n", - "mul div stack\n", + "\n", + "mul stack div\n", "\n", "\n", - "\n", + "\n", ".72->input_output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model..31\n", - "\n", - "model.backbone (BackboneWithPAN)\n", + "\n", + "model.backbone (BackboneWithPAN)\n", "\n", "\n", "\n", "model.input_1->model..31\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model..32\n", - "\n", - "model.head (YOLOHead)\n", + "\n", + "model.head (YOLOHead)\n", "\n", "\n", "\n", "model..31->model..32\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model..33\n", - "\n", - "model.anchor_generator (AnchorGenerator)\n", + "\n", + "model.anchor_generator (AnchorGenerator)\n", "\n", "\n", "\n", "model..31->model..33\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_1\n", - "\n", - "model.post_process.input_1\n", + "\n", + "model.post_process.input_1\n", "\n", "\n", "\n", "model..32->model.post_process.input_1\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_2\n", - "\n", - "model.post_process.input_2\n", + "\n", + "model.post_process.input_2\n", "\n", "\n", "\n", "model..32->model.post_process.input_2\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_3\n", - "\n", - "model.post_process.input_3\n", + "\n", + "model.post_process.input_3\n", "\n", "\n", "\n", "model..32->model.post_process.input_3\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_4\n", - "\n", - "model.post_process.input_4\n", + "\n", + "model.post_process.input_4\n", "\n", "\n", "\n", "model..33->model.post_process.input_4\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_5\n", - "\n", - "model.post_process.input_5\n", + "\n", + "model.post_process.input_5\n", "\n", "\n", "\n", "model..33->model.post_process.input_5\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_6\n", - "\n", - "model.post_process.input_6\n", + "\n", + "model.post_process.input_6\n", "\n", "\n", "\n", "model..33->model.post_process.input_6\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "model.post_process.boxes.3\n", - "\n", - "where sigmoid reshape\n", - "cat add mul sub stack\n", - "gt pow\n", + "model.post_process.boxes.5\n", + "\n", + "pow sub where add cat\n", + "gt sigmoid reshape mul\n", + "stack\n", "\n", - "\n", + "\n", "\n", - "model.post_process.input_1->model.post_process.boxes.3\n", - "\n", - "\n", + "model.post_process.input_1->model.post_process.boxes.5\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.scores\n", - "\n", - "where sigmoid reshape\n", - "cat mul gt\n", + "\n", + "where cat gt sigmoid\n", + "reshape mul\n", "\n", "\n", - "\n", + "\n", "model.post_process.input_1->model.post_process.scores\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.labels\n", - "\n", - "where sigmoid mul reshape\n", - "gt cat\n", + "\n", + "sigmoid reshape mul\n", + "where cat gt\n", "\n", "\n", "\n", "model.post_process.input_1->model.post_process.labels\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "input_model.post_process.output_0\n", - "\n", - "where sigmoid reshape\n", - "cat add mul sub stack\n", - "gt pow\n", + "\n", + "pow sub where add cat\n", + "gt sigmoid reshape mul\n", + "stack\n", "\n", "\n", - "\n", + "\n", "model.post_process.input_1->input_model.post_process.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", - "\n", - "model.post_process.input_2->model.post_process.boxes.3\n", - "\n", - "\n", + "\n", + "\n", + "model.post_process.input_2->model.post_process.boxes.5\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.post_process.input_2->model.post_process.scores\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_2->model.post_process.labels\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.post_process.input_2->input_model.post_process.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", - "\n", - "model.post_process.input_3->model.post_process.boxes.3\n", - "\n", - "\n", + "\n", + "\n", + "model.post_process.input_3->model.post_process.boxes.5\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.post_process.input_3->model.post_process.scores\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_3->model.post_process.labels\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.post_process.input_3->input_model.post_process.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "model.post_process.input_4->model.post_process.boxes.3\n", - "\n", - "\n", + "model.post_process.input_4->model.post_process.boxes.5\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.post_process.input_4->input_model.post_process.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", - "\n", - "model.post_process.input_5->model.post_process.boxes.3\n", - "\n", - "\n", + "\n", + "\n", + "model.post_process.input_5->model.post_process.boxes.5\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.input_5->input_model.post_process.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", - "\n", - "model.post_process.input_6->model.post_process.boxes.3\n", - "\n", - "\n", + "\n", + "\n", + "model.post_process.input_6->model.post_process.boxes.5\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.post_process.input_6->input_model.post_process.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process..keep.1\n", - "\n", - "batched_nms\n", + "\n", + "_batched_nms_coordinate_trick\n", "\n", "\n", - "\n", + "\n", "model.post_process..keep.1->input_model.post_process.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "model.post_process.boxes.3->model.post_process..keep.1\n", - "\n", - "\n", + "model.post_process.boxes.5->model.post_process..keep.1\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.scores->model.post_process..keep.1\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.labels->model.post_process..keep.1\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "model.post_process.output_0\n", - "\n", - "model.post_process.output_0\n", + "\n", + "model.post_process.output_0\n", "\n", "\n", "\n", "model.output_0\n", - "\n", - "model.output_0\n", + "\n", + "model.output_0\n", "\n", "\n", "\n", "model.post_process.output_0->model.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "input_model.post_process.output_0->model.post_process.output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "model.output_0->input_output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n", "output_0\n", - "\n", - "output_0\n", + "\n", + "output_0\n", "\n", "\n", "\n", "input_output_0->output_0\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 10, @@ -801,7 +807,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -815,7 +821,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.9" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/setup.py b/setup.py index 2699ff86..1313c2a5 100644 --- a/setup.py +++ b/setup.py @@ -38,9 +38,10 @@ def get_long_description(): # Get the long description from the README file description = (PATH_ROOT / "README.md").read_text(encoding="utf-8") # replace relative repository path to absolute link to the release - static_url = f"https://raw.githubusercontent.com/zhiqwang/yolov5-rt-stack/release/v{VERSION}" + static_url = f"https://raw.githubusercontent.com/zhiqwang/yolov5-rt-stack/v{VERSION}" description = description.replace("docs/source/_static/", f"{static_url}/docs/source/_static/") description = description.replace("notebooks/assets/", f"{static_url}/notebooks/assets/") + description = description.replace("_graph_visualize.svg", "_graph_visualize.png") return description