Skip to content

Commit

Permalink
Add coco-80 labelmap and update FFmpeg for Rockchip (#11695)
Browse files Browse the repository at this point in the history
* add coco-80 labelmap and update ffmpeg

* Update docs/docs/configuration/object_detectors.md

---------

Co-authored-by: Blake Blackshear <[email protected]>
  • Loading branch information
MarcA711 and blakeblackshear committed Jun 3, 2024
1 parent 1e80342 commit 7a4eb0b
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 7 deletions.
80 changes: 80 additions & 0 deletions docker/main/rootfs/labelmap/coco-80.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
0 person
1 bicycle
2 car
3 motorcycle
4 airplane
5 car
6 train
7 car
8 boat
9 traffic light
10 fire hydrant
11 stop sign
12 parking meter
13 bench
14 bird
15 cat
16 dog
17 horse
18 sheep
19 cow
20 elephant
21 bear
22 zebra
23 giraffe
24 backpack
25 umbrella
26 handbag
27 tie
28 suitcase
29 frisbee
30 skis
31 snowboard
32 sports ball
33 kite
34 baseball bat
35 baseball glove
36 skateboard
37 surfboard
38 tennis racket
39 bottle
40 wine glass
41 cup
42 fork
43 knife
44 spoon
45 bowl
46 banana
47 apple
48 sandwich
49 orange
50 broccoli
51 carrot
52 hot dog
53 pizza
54 donut
55 cake
56 chair
57 couch
58 potted plant
59 bed
60 dining table
61 toilet
62 tv
63 laptop
64 mouse
65 remote
66 keyboard
67 cell phone
68 microwave
69 oven
70 toaster
71 sink
72 refrigerator
73 book
74 clock
75 vase
76 scissors
77 teddy bear
78 hair drier
79 toothbrush
4 changes: 2 additions & 2 deletions docker/rockchip/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ ADD https://github.com/MarcA711/rknn-toolkit2/releases/download/v2.0.0/librknnrt

RUN rm -rf /usr/lib/btbn-ffmpeg/bin/ffmpeg
RUN rm -rf /usr/lib/btbn-ffmpeg/bin/ffprobe
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-3/ffmpeg /usr/lib/btbn-ffmpeg/bin/
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-3/ffprobe /usr/lib/btbn-ffmpeg/bin/
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-4/ffmpeg /usr/lib/btbn-ffmpeg/bin/
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-4/ffprobe /usr/lib/btbn-ffmpeg/bin/
8 changes: 8 additions & 0 deletions docs/docs/configuration/object_detectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,16 @@ model: # required
input_pixel_format: bgr # required
# shape of detection frame
input_tensor: nhwc
# needs to be adjusted to model, see below
labelmap_path: /labelmap.txt # required
```

The correct labelmap must be loaded for each model. If you use a custom model (see notes below), you must make sure to provide the correct labelmap. The table below lists the correct paths for the bundled models:

| `path` | `labelmap_path` |
| ------------------- | --------------------- |
| deci-fp16-yolonas_* | /labelmap/coco-80.txt |

### Choosing a model

:::warning
Expand Down
10 changes: 5 additions & 5 deletions frigate/detectors/plugins/rknn.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ def __init__(self, config: RknnDetectorConfig):
config.model.model_type = model_props["model_type"]

if model_props["model_type"] == ModelTypeEnum.yolonas:
logger.info("""
You are using yolo-nas with weights from DeciAI.
These weights are subject to their license and can't be used commercially.
For more information, see: https://docs.deci.ai/super-gradients/latest/LICENSE.YOLONAS.html
""")
logger.info(
"You are using yolo-nas with weights from DeciAI. "
"These weights are subject to their license and can't be used commercially. "
"For more information, see: https://docs.deci.ai/super-gradients/latest/LICENSE.YOLONAS.html"
)

from rknnlite.api import RKNNLite

Expand Down

0 comments on commit 7a4eb0b

Please sign in to comment.