mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-04 13:47:37 +02:00
commit
1c62667720
@ -10,36 +10,29 @@ detectors:
|
||||
# model_type: yolov9
|
||||
# width: 640
|
||||
# height: 640
|
||||
# path: /config/model_cache/memryx_cache/YOLO_v9_small_640_640_3_onnx.dfp
|
||||
# labelmap_path: /config/model_cache/memryx_cache/labelmap.txt
|
||||
|
||||
# model:
|
||||
# model_type: yolov8
|
||||
# width: 640
|
||||
# height: 640
|
||||
# path: /config/model_cache/memryx_cache/YOLO_v8_small_640_640_3_onnx.dfp
|
||||
# labelmap_path: /config/model_cache/memryx_cache/labelmap.txt
|
||||
# path: /memryx_models/yolov9/YOLO_v9_small_640_640_3_onnx.dfp
|
||||
# labelmap_path: /memryx_models/yolov9/labelmap.txt
|
||||
|
||||
# model:
|
||||
# model_type: yolonas
|
||||
# width: 320
|
||||
# height: 320
|
||||
# path: /config/model_cache/memryx_cache/yolo_nas_s.dfp
|
||||
# labelmap_path: /config/model_cache/memryx_cache/labelmap.txt
|
||||
|
||||
model:
|
||||
model_type: yolox
|
||||
width: 640
|
||||
height: 640
|
||||
path: /config/model_cache/memryx_cache/YOLOX_640_640_3_onnx.dfp
|
||||
labelmap_path: /config/model_cache/memryx_cache/labelmap.txt
|
||||
# path: /memryx_models/yolo_nas/yolo_nas_s.dfp
|
||||
# labelmap_path: /memryx_models/yolo_nas/labelmap.txt
|
||||
|
||||
# model:
|
||||
# model_type: ssd
|
||||
# width: 320
|
||||
# height: 320
|
||||
# path: /config/model_cache/memryx_cache/SSDlite_MobileNet_v2_320_320_3_onnx.dfp
|
||||
# labelmap_path: /config/model_cache/memryx_cache/labelmap.txt
|
||||
# model_type: yolox
|
||||
# width: 640
|
||||
# height: 640
|
||||
# path: /memryx_models/yolox/YOLOX_640_640_3_onnx.dfp
|
||||
# labelmap_path: /memryx_models/yolox/labelmap.txt
|
||||
|
||||
model:
|
||||
model_type: ssd
|
||||
width: 320
|
||||
height: 320
|
||||
path: /memryx_models/ssdlite/SSDlite_MobileNet_v2_320_320_3_onnx.dfp
|
||||
labelmap_path: /memryx_models/ssdlite/labelmap.txt
|
||||
|
||||
cameras:
|
||||
Cam1:
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,80 +0,0 @@
|
||||
0 person
|
||||
1 bicycle
|
||||
2 car
|
||||
3 motorcycle
|
||||
4 airplane
|
||||
5 bus
|
||||
6 train
|
||||
7 truck
|
||||
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
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -279,6 +279,18 @@ RUN apt-get install -y --no-install-recommends memx-accl
|
||||
# Debug messages
|
||||
RUN echo "Hello from inside MemryX Docker image!"
|
||||
|
||||
# Set the working directory for model files
|
||||
WORKDIR /memryx_models
|
||||
|
||||
# Download and extract MemryX model files
|
||||
RUN wget -O yolox.zip https://developer.memryx.com/example_files/1p2_frigate/yolox.zip && unzip yolox.zip && \
|
||||
wget -O ssdlite.zip https://developer.memryx.com/example_files/1p2_frigate/ssdlite.zip && unzip ssdlite.zip && \
|
||||
wget -O yolo_nas.zip https://developer.memryx.com/example_files/1p2_frigate/yolo_nas.zip && unzip yolo_nas.zip && \
|
||||
wget -O yolov9.zip https://developer.memryx.com/example_files/1p2_frigate/yolov9.zip && unzip yolov9.zip
|
||||
|
||||
# Set permissions for the models directory
|
||||
RUN chmod -R 755 /memryx_models
|
||||
|
||||
RUN ldconfig
|
||||
|
||||
EXPOSE 5000
|
||||
@ -354,4 +366,4 @@ COPY --from=web-build /work/dist/ web/
|
||||
FROM deps AS frigate
|
||||
|
||||
WORKDIR /opt/frigate/
|
||||
COPY --from=rootfs / /
|
||||
COPY --from=rootfs / /
|
@ -57,18 +57,18 @@ class MemryXDetector(DetectionApi):
|
||||
self.memx_model_width = detector_config.model.width
|
||||
self.memx_model_type = detector_config.model.model_type
|
||||
|
||||
self.cache_dir = "/config/model_cache/memryx_cache"
|
||||
self.cache_dir = "/memryx_models"
|
||||
|
||||
if self.memx_model_type == ModelTypeEnum.yolov9:
|
||||
self.model_url = "https://developer.memryx.com/model_explorer/1p2/YOLO_v9_small_640_640_3_onnx.zip"
|
||||
# self.expected_post_model = "YOLO_v9_small_640_640_3_onnx_post.onnx"
|
||||
self.const_A = np.load("/config/model_cache/memryx_cache/_model_22_Constant_9_output_0.npy")
|
||||
self.const_B = np.load("/config/model_cache/memryx_cache/_model_22_Constant_10_output_0.npy")
|
||||
self.const_C = np.load("/config/model_cache/memryx_cache/_model_22_Constant_12_output_0.npy")
|
||||
self.const_A = np.load("/memryx_models/yolov9/_model_22_Constant_9_output_0.npy")
|
||||
self.const_B = np.load("/memryx_models/yolov9/_model_22_Constant_10_output_0.npy")
|
||||
self.const_C = np.load("/memryx_models/yolov9/_model_22_Constant_12_output_0.npy")
|
||||
|
||||
elif self.memx_model_type == ModelTypeEnum.yolonas:
|
||||
self.model_url = ""
|
||||
self.expected_post_model = "yolo_nas_s_post.onnx"
|
||||
self.expected_post_model = "yolo_nas/yolo_nas_s_post.onnx"
|
||||
|
||||
elif self.memx_model_type == ModelTypeEnum.yolox:
|
||||
self.model_url = "https://developer.memryx.com/model_explorer/1p2/YOLOX_640_640_3_onnx.zip"
|
||||
@ -77,7 +77,7 @@ class MemryXDetector(DetectionApi):
|
||||
|
||||
elif self.memx_model_type == ModelTypeEnum.ssd:
|
||||
self.model_url = "https://developer.memryx.com/model_explorer/1p2/SSDlite_MobileNet_v2_320_320_3_onnx.zip"
|
||||
self.expected_post_model = "SSDlite_MobileNet_v2_320_320_3_onnx_post.onnx"
|
||||
self.expected_post_model = "ssdlite/SSDlite_MobileNet_v2_320_320_3_onnx_post.onnx"
|
||||
|
||||
self.check_and_prepare_model()
|
||||
logger.info(f"Initializing MemryX with model: {self.memx_model_path} on device {self.memx_device_path}")
|
||||
@ -110,6 +110,7 @@ class MemryXDetector(DetectionApi):
|
||||
|
||||
else:
|
||||
post_model_file_path = os.path.join(self.cache_dir, self.expected_post_model)
|
||||
|
||||
# model_file_path_tflite = os.path.join(self.cache_dir, self.expected_model_filename_tflite)
|
||||
|
||||
# Check if both required model files exist
|
||||
|
Loading…
Reference in New Issue
Block a user