feat(perception): evaluate fixed-class detector candidates
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
FROM nvcr.io/nvidia/tritonserver:26.06-py3
|
||||
|
||||
ARG DFINE_REVISION=956d1709314c2c6a4df6f34de232054578a7449f
|
||||
|
||||
RUN python3 -m pip install --no-cache-dir \
|
||||
--index-url https://download.pytorch.org/whl/cu130 \
|
||||
"torch==2.9.1+cu130" \
|
||||
"torchvision==0.24.1+cu130"
|
||||
|
||||
RUN git clone https://github.com/Peterande/D-FINE.git /opt/dfine \
|
||||
&& git -C /opt/dfine checkout --detach "${DFINE_REVISION}" \
|
||||
&& test "$(git -C /opt/dfine rev-parse HEAD)" = "${DFINE_REVISION}"
|
||||
|
||||
RUN python3 -m pip install --no-cache-dir \
|
||||
"rfdetr[onnx]==1.9.4" \
|
||||
"numpy==1.26.4" \
|
||||
"ml_dtypes==0.5.4" \
|
||||
"onnxconverter-common==1.16.0" \
|
||||
"tritonclient[http]==2.71.0" \
|
||||
"faster-coco-eval>=1.6.6" \
|
||||
"PyYAML>=6.0" \
|
||||
"scipy>=1.10" \
|
||||
"calflops>=0.3" \
|
||||
"loguru>=0.7" \
|
||||
"tensorboard>=2.17"
|
||||
|
||||
LABEL com.nodedc.product="mission-core" \
|
||||
com.nodedc.stack="ndc-mission-core-compute" \
|
||||
com.nodedc.role="bounded-detector-qualification" \
|
||||
com.nodedc.managed-by="codex-bounded-experiment"
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
readonly DFINE_REVISION="956d1709314c2c6a4df6f34de232054578a7449f"
|
||||
|
||||
python3 -m pip install --no-cache-dir \
|
||||
--index-url https://download.pytorch.org/whl/cu130 \
|
||||
"torch==2.9.1+cu130" \
|
||||
"torchvision==0.24.1+cu130"
|
||||
|
||||
git clone https://github.com/Peterande/D-FINE.git /opt/dfine
|
||||
git -C /opt/dfine checkout --detach "${DFINE_REVISION}"
|
||||
test "$(git -C /opt/dfine rev-parse HEAD)" = "${DFINE_REVISION}"
|
||||
|
||||
python3 -m pip install --no-cache-dir \
|
||||
"rfdetr[onnx]==1.9.4" \
|
||||
"numpy==1.26.4" \
|
||||
"ml_dtypes==0.5.4" \
|
||||
"onnxconverter-common==1.16.0" \
|
||||
"tritonclient[http]==2.71.0" \
|
||||
"faster-coco-eval>=1.6.6" \
|
||||
"PyYAML>=6.0" \
|
||||
"scipy>=1.10" \
|
||||
"calflops>=0.3" \
|
||||
"loguru>=0.7" \
|
||||
"tensorboard>=2.17"
|
||||
|
||||
python3 -c "import importlib.metadata, rfdetr, torch, torchvision; print(torch.__version__, torchvision.__version__, importlib.metadata.version('rfdetr'))"
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ "$#" -ne 3 ]]; then
|
||||
echo "usage: $0 ONNX_PATH ENGINE_PATH LOG_PATH" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
readonly onnx_path="$1"
|
||||
readonly engine_path="$2"
|
||||
readonly log_path="$3"
|
||||
readonly timing_cache="${engine_path}.timing-cache"
|
||||
|
||||
test -f "${onnx_path}"
|
||||
test ! -e "${engine_path}"
|
||||
test ! -e "${log_path}"
|
||||
mkdir -p "$(dirname "${engine_path}")" "$(dirname "${log_path}")"
|
||||
|
||||
/usr/bin/trtexec \
|
||||
--onnx="${onnx_path}" \
|
||||
--saveEngine="${engine_path}" \
|
||||
--timingCacheFile="${timing_cache}" \
|
||||
--memPoolSize=workspace:4096 \
|
||||
--warmUp=1000 \
|
||||
--duration=5 \
|
||||
--avgRuns=100 \
|
||||
2>&1 | tee "${log_path}"
|
||||
|
||||
test -s "${engine_path}"
|
||||
sha256sum "${onnx_path}" "${engine_path}" "${log_path}"
|
||||
@@ -0,0 +1,47 @@
|
||||
name: "rf_detr_large"
|
||||
platform: "tensorrt_plan"
|
||||
max_batch_size: 0
|
||||
|
||||
input [
|
||||
{
|
||||
name: "input"
|
||||
data_type: TYPE_FP32
|
||||
dims: [ 1, 3, 704, 704 ]
|
||||
}
|
||||
]
|
||||
|
||||
output [
|
||||
{
|
||||
name: "dets"
|
||||
data_type: TYPE_FP16
|
||||
dims: [ 1, 300, 4 ]
|
||||
},
|
||||
{
|
||||
name: "labels"
|
||||
data_type: TYPE_FP16
|
||||
dims: [ 1, 300, 91 ]
|
||||
}
|
||||
]
|
||||
|
||||
instance_group [
|
||||
{
|
||||
count: 1
|
||||
kind: KIND_GPU
|
||||
gpus: [ 0 ]
|
||||
}
|
||||
]
|
||||
|
||||
model_warmup [
|
||||
{
|
||||
name: "rf_detr_large_zero"
|
||||
batch_size: 0
|
||||
inputs: {
|
||||
key: "input"
|
||||
value: {
|
||||
data_type: TYPE_FP32
|
||||
dims: [ 1, 3, 704, 704 ]
|
||||
zero_data: true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user