fix(trt): drop explicit shapes for static TransNetV2; gallery over-fetch + dedup
trtexec rejects --minShapes/--optShapes/--maxShapes for a fully static model
("Static model does not take explicit shapes"). TransNetV2's input is fixed at
1x100x27x48x3, so the shape comes from the model itself.
Gallery build now over-fetches TMDB/Wikidata candidates by a configurable
factor: near-duplicate stills (the same photo at different crops or
resolutions) are discarded after embedding, so downloading exactly
images_per_actor left actors short of that many *distinct* embeddings.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,14 +76,14 @@ if [[ -f "$SCENE_MODEL" ]]; then
|
||||
echo "== TransNetV2 (scene detector) =="
|
||||
# Fixed 1x100x27x48x3 window. The raw-TRT scene detector backend loads this
|
||||
# engine directly via --scene-detector-engine; the ORT-TRT EP builds its own.
|
||||
SCENE_IN="$(input_name "$SCENE_MODEL")"
|
||||
echo " (input tensor: $SCENE_IN)"
|
||||
# No --*Shapes here: TransNetV2's input is fully static (1x100x27x48x3
|
||||
# with no dynamic dimensions), and TensorRT rejects explicit shape
|
||||
# profiles for such a model — "Static model does not take explicit shapes
|
||||
# since the shape of inference tensors will be determined by the model
|
||||
# itself". The shape comes from the model.
|
||||
run trtexec \
|
||||
--onnx="$SCENE_MODEL" \
|
||||
--fp16 \
|
||||
--minShapes="$SCENE_IN":1x100x27x48x3 \
|
||||
--optShapes="$SCENE_IN":1x100x27x48x3 \
|
||||
--maxShapes="$SCENE_IN":1x100x27x48x3 \
|
||||
--saveEngine="$OUT/transnetv2.100x27x48.fp16.engine" \
|
||||
--useCudaGraph
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user