Skip to content

Instantly share code, notes, and snippets.

View hewumars's full-sized avatar

Mars hewumars

View GitHub Profile
  1. [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Div node GPU版时出现,CPU版正常
  2. INVALID_ARGUMENT : Unexpected input data type. 关注输入数据类型
@hewumars
hewumars / 1.md
Last active September 24, 2020 10:37

项目实施

项目启动前准备

项目概述

项目需求清单

@hewumars
hewumars / 1.md
Last active September 23, 2020 02:37

TensorRT版本性能差异测试ResNet50.onnx

模型-耗时ms/张 TRT7.1.3.4 TRT5.1.5.0 版本性能提升
ResNet50-b1-fp32-Nvidia2080Ti 2.0444 2.3022 11.20%
ResNet50-b4-fp32 0.6491 1.1063 41.32%
ResNet50-b8-fp32 0.3533 0.8849 60.07%
ResNet50-b16-fp32 0.2037 0.7502 72.85%
ResNet50-b1-int8 0.72
@hewumars
hewumars / 1.md
Last active September 22, 2020 10:34

需要:

  1. 批判性思维
  2. 跨学科见识
  3. 擅长处理人际关系

项目管理是什么

  1. 达成目标的能力
  2. 目标落地的方法

知识knowledge---记忆、技能skill---练习、态度attitude---用心,感悟

We couldn’t find that file to show.
@hewumars
hewumars / 1.md
Last active September 18, 2020 01:43

通用目标

一级检测ObjectDetectStageG3x320x384

行人

  • 行人二级检测ObjectDetectStageP3x160x96
    1. 行人头部
      • 骑行人/行人头部属性PedestrainHead3x128x128
        • 眼镜
          1. 无眼镜
          2. 戴眼镜
  1. 戴墨镜
@hewumars
hewumars / 1.py
Last active September 16, 2020 03:57
import matplotlib
# Needed before pyplot import for matplotlib to work properly.
# matplotlib.use('Agg')
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
from matplotlib.widgets import RectangleSelector
from matplotlib.patches import Circle,Rectangle
fig = plt.figure() # make a new plotting range
@hewumars
hewumars / 1.md
Last active June 21, 2022 12:26
1. 以图搜图2.0版本方案

以图搜图2.0版本方案

1.以图搜图2.0架构图

先通过 Milvus 进行特征值搜索,返回 top 2048条最相似的记录,然后根据特征值ID从Redis 查出相关联结构化信息,如900记录ID+特征值ID+时间+地点等<120字节,进行二次条件过滤,达到10亿级数据 10秒内返回。

2.以图搜图2.0性能

TRT7.1.3支持到Opset 11 TensorFlow2.0使用tf.saved_model.save自定义保存模型 python3 -m tf2onnx.convert

错误问题

  1. Use tf.compat.v1.graph_util.extract_sub_graph AssertionError: unknown_317 is not in graph
  2. trt不支持Round,改用tf.floor或者tf.ceil解决
  3. trt不支持NonZero,由于tf.where(condition, x=None, y=None, name=None)的x,y没有赋值导致,补全xy解决 indices = tf.reshape(tf.where(attention_prob >= abs_thres,tf.ones_like(attention_prob,dtype=tf.int64),tf.zeros_like(attention_prob,dtype=tf.int64)), [-1])
  4. Opset10时trt报错ERROR: builtin_op_importers.cpp:2549 In function importResize: Assertion failed: scales.is_weights() && "Resize scales must be an initializer!" ,使用Opset12转换
索引方法 latency time mean average precision 0.65 false alarm rate
FLAT
IVF_FLAT
IVF_SQ8
IVF_SQ8H
IVF_PQ
RNSG
HNSW
ANNOY