Skip to content

Commit 167d056

Browse files
committed
Integrate Changes from kadu-v: webonnx#214
Add: initial slice operator wip Update: the implementation of slice operator to move the fixed inputs to attributes Update: concat operator to set an axis attribute Update: Concat.wgsl to adapt any axis WIP: yolox nano sample Update: the post processing of yolox_ nano sample Cleanup: the example code for yolox_nano Cleanup Update: README.md Remove: unnecessary images
1 parent dc1b3ac commit 167d056

File tree

12 files changed

+2013
-20
lines changed

12 files changed

+2013
-20
lines changed

Cargo.lock

+497-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ fn test_matmul_square_matrix() {
346346
|<a href="https://github.com/onnx/onnx/blob/main/docs/Operators.md#Sin">Sin</a>|<a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Sin-7">7</a>|||
347347
|<a href="https://github.com/onnx/onnx/blob/main/docs/Operators.md#Sinh">Sinh</a>|<a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Sinh-9">9</a>|||
348348
|<a href="https://github.com/onnx/onnx/blob/main/docs/Operators.md#Size">Size</a>|<a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Size-13">13</a>, <a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Size-1">1</a>|||
349-
|<a href="https://github.com/onnx/onnx/blob/main/docs/Operators.md#Slice">Slice</a>|<a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Slice-13">13</a>, <a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Slice-11">11</a>, <a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Slice-10">10</a>, <a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Slice-1">1</a>|||
349+
|<a href="https://github.com/onnx/onnx/blob/main/docs/Operators.md#Slice">Slice</a>|<a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Slice-13">13</a>, <a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Slice-11">11</a>, <a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Slice-10">10</a>, <a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Slice-1">1</a>|||
350350
|<a href="https://github.com/onnx/onnx/blob/main/docs/Operators.md#Softplus">Softplus</a>|<a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Softplus-1">1</a>||
351351
|<a href="https://github.com/onnx/onnx/blob/main/docs/Operators.md#Softsign">Softsign</a>|<a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Softsign-1">1</a>||
352352
|<a href="https://github.com/onnx/onnx/blob/main/docs/Operators.md#SpaceToDepth">SpaceToDepth</a>|<a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#SpaceToDepth-13">13</a>, <a href="https://github.com/onnx/onnx/blob/main/docs/Changelog.md#SpaceToDepth-1">1</a>|
@@ -398,6 +398,8 @@ fn test_matmul_square_matrix() {
398398
* For `MatMul` and `Gemm`, the matrix dimensions must be divisible by 2, or the output matrix must be of size (1, N). Matrix
399399
multiplication only supports floats, not integers (this is a WebGPU/WGSL limitation).
400400

401+
* The Slice operator can only be computed for axes of length one. (i.e., there must always be exactly one axis.)
402+
401403
### Shape inference
402404

403405
WONNX needs to know the shape of input and output tensors for each operation in order to generate shader code for executing

data/models/coco-classes.txt

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
person
2+
bicycle
3+
car
4+
motorbike
5+
aeroplane
6+
bus
7+
train
8+
truck
9+
boat
10+
traffic light
11+
fire hydrant
12+
stop sign
13+
parking meter
14+
bench
15+
bird
16+
cat
17+
dog
18+
horse
19+
sheep
20+
cow
21+
elephant
22+
bear
23+
zebra
24+
giraffe
25+
backpack
26+
umbrella
27+
handbag
28+
tie
29+
suitcase
30+
frisbee
31+
skis
32+
snowboard
33+
sports ball
34+
kite
35+
baseball bat
36+
baseball glove
37+
skateboard
38+
surfboard
39+
tennis racket
40+
bottle
41+
wine glass
42+
cup
43+
fork
44+
knife
45+
spoon
46+
bowl
47+
banana
48+
apple
49+
sandwich
50+
orange
51+
broccoli
52+
carrot
53+
hot dog
54+
pizza
55+
donut
56+
cake
57+
chair
58+
sofa
59+
pottedplant
60+
bed
61+
diningtable
62+
toilet
63+
tvmonitor
64+
laptop
65+
mouse
66+
remote
67+
keyboard
68+
cell phone
69+
microwave
70+
oven
71+
toaster
72+
sink
73+
refrigerator
74+
book
75+
clock
76+
vase
77+
scissors
78+
teddy bear
79+
hair drier
80+
toothbrush

data/models/yolox_nano.onnx

3.49 MB
Binary file not shown.

wonnx/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ futures = "^0.3.26"
4444
parking_lot = { version = "0.11.1", features = ["wasm-bindgen"] }
4545

4646
[dev-dependencies]
47-
image = "0.24.2"
47+
image = "0.25.1"
48+
imageproc = "0.24.0"
4849
ndarray = "0.15.4"
4950
approx = "0.5.1"
5051
pollster = "0.3.0"

0 commit comments

Comments
 (0)