File size: 1,446 Bytes
4b2cef0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
license: mit
library_name: onnx
pipeline_tag: video-classification
tags:
  - transnetv2
  - shot-boundary-detection
  - scene-detection
  - video
  - onnx
---

# TransNetV2 (ONNX)

`transnetv2.onnx` — an ONNX export of **TransNetV2** for shot boundary
detection (finding the hard cuts and gradual transitions between the shots of
a video). Runs client-side with onnxruntime-web.

## Inputs / outputs

- **Input:** `input` float32 `[1, 100, 27, 48, 3]` — a window of 100 frames,
  each resized to 48x27, RGB, values 0..255 (the graph divides by 255 itself).
- **Outputs:** two float32 `[1, 100, 1]` per-frame **probabilities** (the
  sigmoid is already applied):
  - single-frame — the frame a cut lands on (the last frame of the outgoing shot);
  - many-hot — every frame inside a transition (dissolve, fade, …).
- Upstream inference slides the window by 50 frames with 25 frames of context
  either side and keeps the middle 50 predictions of each window.

## Provenance & license

- **Model:** TransNetV2 — *TransNet V2: An effective deep network architecture
  for fast shot transition detection* (Souček & Lokoč, 2020),
  [soCzech/TransNetV2](https://github.com/soCzech/TransNetV2). Code and model
  weights are released under the **MIT license**
  (`Copyright (c) 2020 Tomáš Souček`), included here as `LICENSE`.
- **ONNX export:** [elya5/transnetv2](https://huggingface.co/elya5/transnetv2)
  (MIT), mirrored verbatim.