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

如何理解分发间隔 #16

Open
fygroup opened this issue Mar 8, 2024 · 5 comments
Open

如何理解分发间隔 #16

fygroup opened this issue Mar 8, 2024 · 5 comments

Comments

@fygroup
Copy link

fygroup commented Mar 8, 2024

如题:

{
    "configure": {
        "default_port": 0,
        "rules" : [
            {
                "time_interval": 1,
                "routes": [
                    {
                        "classes":["car"],
                        "port": 1
                    },
                    {
                        "classes":["person"],
                        "port" : 2
                    }
                ]
            },
            {
                "frame_interval": 10,
                "routes": [
                    {
                        "classes":["cat"],
                        "port": 3
                    },
                    {
                        "classes":[],
                        "port" : 4
                    }
                ]
            }
        ],
        "class_names_file" : "../data/coco.names"
      },
      "shared_object": "../../../build/lib/libdistributor.so",
      "name": "distributor",
      "side": "sophgo",
      "thread_number": 1
}

如上配置,几个问题:
1、两个rule,分发的时候走那个规则呢?
2、分发间隔可以理解为积累一批之后再去分发吗?
3、如果class没有在上面配置的路由中,他会怎么走?

@yizhou-xu
Copy link
Collaborator

  1. 多个rules会合并,例如两个rules的间隔分别为三秒和五秒,则在3,5,6,9,10,12,15秒时会触发分发动作。
  2. 分发间隔意味着隔一段时间/帧数进行一次分发,未触发分发动作的帧直接向后传递,不做任何处理。例如:每5帧分发一次;每秒钟分发一次。一次即一帧。
  3. 如果class没有配置在routes中,则意味着不需要对这个类别进行分发。

@yizhou-xu
Copy link
Collaborator

分发插件的功能是:每隔一段时间/帧数,对路由中配置的类别进行crop和分发。
例如:每隔五帧,对输入的图片中“car”这个类别做裁剪,分发给后面的resnet做颜色识别。

@fygroup
Copy link
Author

fygroup commented Mar 9, 2024

分发插件的功能是:每隔一段时间/帧数,对路由中配置的类别进行crop和分发。 例如:每隔五帧,对输入的图片中“car”这个类别做裁剪,分发给后面的resnet做颜色识别。

那么另外四帧不做颜色识别码?

@yizhou-xu
Copy link
Collaborator

不做。如果需要做,可以把分发间隔设为1帧。不过实际上应该不需要这么频繁地识别,或者说检测也不需要很频繁地做,可以从输入上就控制抽帧。

@fygroup
Copy link
Author

fygroup commented Mar 9, 2024

好的明白,谢谢

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

2 participants