Skip to content

Commit e2f5c25

Browse files
committed
新增yolov8_obb
1 parent a70793c commit e2f5c25

51 files changed

Lines changed: 2130 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Use Python 3.11 slim image as base (matching the wheel requirement)
2+
FROM python:3.11-slim
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Install system dependencies for OpenCV and others
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
libgl1 \
10+
libglib2.0-0 \
11+
libgomp1 \
12+
libsm6 \
13+
libxext6 \
14+
libxrender1 \
15+
libxcb-cursor0 \
16+
libxcb-xinerama0 \
17+
libxcb-keysyms1 \
18+
libxcb-image0 \
19+
libxcb-shm0 \
20+
libxcb-icccm4 \
21+
libxcb-sync1 \
22+
libxcb-xfixes0 \
23+
libxcb-shape0 \
24+
libxcb-randr0 \
25+
libxcb-render-util0 \
26+
libxkbcommon-x11-0 \
27+
&& rm -rf /var/lib/apt/lists/*
28+
29+
# Copy requirements file
30+
COPY requirements.txt .
31+
32+
# Install Python dependencies
33+
RUN pip install --no-cache-dir -r requirements.txt
34+
35+
# Copy the RKNN Toolkit Lite2 wheel
36+
COPY rknn-toolkit-lite2-packages/rknn_toolkit_lite2-2.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl .
37+
38+
# Install the local wheel
39+
RUN pip install --no-cache-dir rknn_toolkit_lite2-2.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
40+
41+
# Copy librknnrt.so to /usr/lib/
42+
COPY lib/librknnrt.so /usr/lib/
43+
RUN chmod 755 /usr/lib/librknnrt.so
44+
45+
# Copy the rest of the application code
46+
COPY . .
47+
48+
# Expose port for Web Preview
49+
EXPOSE 8000
50+
51+
# Set the default command to run the detection script
52+
# This script now supports both GUI (if DISPLAY is available) and Web Preview (on port 8000)
53+
CMD ["python", "realtime_detection.py", "--model_path", "model/yolov8n_obb.rknn", "--video_path", "video/test.mp4"]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Use Python 3.11 slim image as base (matching the wheel requirement)
2+
FROM python:3.11-slim
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Install system dependencies for OpenCV and others
8+
# libgl1: replacement for libgl1-mesa-glx in Debian 12 (Bookworm)
9+
# libglib2.0-0: for cv2
10+
# libgomp1: for OpenMP support if needed
11+
# libsm6, libxext6, libxrender1: common OpenCV dependencies
12+
# libxcb-*: dependencies for Qt (bundled in opencv-python) to fix "Could not load the Qt platform plugin 'xcb'"
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
14+
libgl1 \
15+
libglib2.0-0 \
16+
libgomp1 \
17+
libsm6 \
18+
libxext6 \
19+
libxrender1 \
20+
libxcb-cursor0 \
21+
libxcb-xinerama0 \
22+
libxcb-keysyms1 \
23+
libxcb-image0 \
24+
libxcb-shm0 \
25+
libxcb-icccm4 \
26+
libxcb-sync1 \
27+
libxcb-xfixes0 \
28+
libxcb-shape0 \
29+
libxcb-randr0 \
30+
libxcb-render-util0 \
31+
libxkbcommon-x11-0 \
32+
&& rm -rf /var/lib/apt/lists/*
33+
34+
# Copy requirements file
35+
COPY requirements.txt .
36+
37+
# Install Python dependencies
38+
# Use --no-cache-dir to keep image small
39+
RUN pip install --no-cache-dir -r requirements.txt
40+
41+
# Copy the RKNN Toolkit Lite2 wheel
42+
COPY rknn-toolkit-lite2-packages/rknn_toolkit_lite2-2.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl .
43+
44+
# Install the local wheel
45+
RUN pip install --no-cache-dir rknn_toolkit_lite2-2.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
46+
47+
# Copy librknnrt.so to /usr/lib/
48+
COPY lib/librknnrt.so /usr/lib/
49+
RUN chmod 755 /usr/lib/librknnrt.so
50+
51+
# Copy the rest of the application code
52+
COPY . .
53+
54+
# Expose port for Web Preview
55+
EXPOSE 8000
56+
57+
# Set the default command to run the detection script
58+
# This script now supports both GUI (if DISPLAY is available) and Web Preview (on port 8000)
59+
CMD ["python", "realtime_detection.py", "--model_path", "model/yolov8n_obb.rknn", "--video_path", "video/test.mp4"]
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)