Skip to content

模型难以作为实时视频,有没有什么办法做图片编码预处理或者设置? #1110

@waka19910909

Description

@waka19910909

A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.USER: <media><media><media><media><media>查看这组图片序列中行人的活动变化,分析是否发生事件(如:人员摔倒,人员聚集在电梯口等);结果使用一句话回答,不超过30个字ASSISTANT:
encoding image slice...
image slice encoded in 443 ms
decoding image batch 1/1, n_tokens_batch = 256
image decoded (batch 1/1) in 113 ms
encoding image slice...
image slice encoded in 402 ms
decoding image batch 1/1, n_tokens_batch = 256
image decoded (batch 1/1) in 123 ms
encoding image slice...
image slice encoded in 402 ms
decoding image batch 1/1, n_tokens_batch = 256
image decoded (batch 1/1) in 155 ms
encoding image slice...
image slice encoded in 358 ms
decoding image batch 1/1, n_tokens_batch = 256
image decoded (batch 1/1) in 165 ms
encoding image slice...
image slice encoded in 361 ms
decoding image batch 1/1, n_tokens_batch = 256
image decoded (batch 1/1) in 179 ms
Llama.generate: 1363 prefix-match hit, remaining 1 prompt tokens to eval
llama_perf_context_print: load time = 26.42 ms
llama_perf_context_print: prompt eval time = 3458.26 ms / 1365 tokens ( 2.53 ms per token, 394.71 tokens per second)
llama_perf_context_print: eval time = 931.93 ms / 36 runs ( 25.89 ms per token, 38.63 tokens per second)
llama_perf_context_print: total time = 1046.71 ms / 1401 tokens
分析结果: 从图片中可以看到,有几个人正在移动。其中一个人正在从电梯口出来,其他人则在周围行走。没有看到人员摔倒或聚集在电梯口等事件。
批处理时间: 5.04秒, 帧率: 0.99帧/秒
使用边缘计算盒子部署模型推理时,发现每一张图片在推理时都需要编码并耗费大量的时间(可以说是主要时间)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions