Skip to content

Commit

Permalink
Merge pull request #453 from roflcoopter/dev
Browse files Browse the repository at this point in the history
YOLOv7 default
  • Loading branch information
roflcoopter authored Dec 31, 2022
2 parents 9a8d095 + 8624683 commit ed55649
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
5 changes: 2 additions & 3 deletions docker/amd64/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
sha256sum -c ww15.sum && \
dpkg -i *.deb && \
rm -R /opencl && \
rm /detectors/models/darknet/yolov7* && \
ln -s /detectors/models/darknet/yolov3.weights /detectors/models/darknet/default.weights && \
ln -s /detectors/models/darknet/yolov3.cfg /detectors/models/darknet/default.cfg
ln -s /detectors/models/darknet/yolov7.weights /detectors/models/darknet/default.weights && \
ln -s /detectors/models/darknet/yolov7.cfg /detectors/models/darknet/default.cfg

# OpenVINO
COPY --from=opencv /usr/local/runtime /usr/local/runtime/
4 changes: 2 additions & 2 deletions docker/jetson-nano/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ RUN \
libegl1 \
libfreetype6 \
ffmpeg=${JETSON_NANO_FFMPEG_APT_VERSION} && \
ln -s /detectors/models/darknet/yolov4-tiny.weights /detectors/models/darknet/default.weights && \
ln -s /detectors/models/darknet/yolov4-tiny.cfg /detectors/models/darknet/default.cfg && \
ln -s /detectors/models/darknet/yolov7-tiny.weights /detectors/models/darknet/default.weights && \
ln -s /detectors/models/darknet/yolov7-tiny.cfg /detectors/models/darknet/default.cfg && \
# Minimal cuda install does not create symlink so we do it manually
ln -s /usr/local/cuda-10.2 /usr/local/cuda && \
echo "/usr/lib/aarch64-linux-gnu/tegra" >> /etc/ld.so.conf.d/nvidia-tegra.conf && \
Expand Down
20 changes: 4 additions & 16 deletions docs/src/pages/components-explorer/components/darknet/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ import config from "./config.json";
Darknet is a state-of-the-art object detector that uses the YOLO (You Only Look Once) framework.
It is built on a singel-stage algorithm to achieve both speed and accuracy.

YOLOv7 is currently the most accurate and fastest model.
YOLOv7 is currently the most accurate and fastest model and has hardware acceleration support on both GPUs and CPUs.

If CUDA is available on your system, `darknet` will run on your GPU.

:::note

`darknet` component uses the official [Darknet](https://github.com/AlexeyAB/darknet) implementation when running on a GPU.
When running on a CPU, it uses OpenCV's implementation of Darknet, which has some limitations in what models can be used.
When running on a CPU, it uses OpenCV's implementation of Darknet.

:::

:::warning YOLOv7
:::info

YOLOv7 is only available if you run the `roflcoopter/amd64-cuda-viseron` image.
YOLOv7 is the default model used by `darknet` in all images.

:::

Expand Down Expand Up @@ -122,18 +122,6 @@ It will help you find the perfect trade-off between accuracy and latency.

</details>

The default model differs a bit per container:

| Image | Model |
| --------------------------------- | --------------------- |
| `roflcoopter/viseron` | `yolov3.weights` |
| `roflcoopter/amd64-viseron` | `yolov3.weights` |
| `roflcoopter/amd64-cuda-viseron` | `yolov7.weights` |
| `roflcoopter/jetson-nano-viseron` | `yolov4-tiny.weights` |

YOLOv4/YOLOv7 does not currently work in OpenCV which is why YOLOv3 is the default for some images.
As soon as this is fixed for the versions of OpenCV that Viseron is using, YOLOv7 will be the standard for all.

<Admonition type="tip">
The containers also has <code>*-tiny.weights</code> model included in the image.
The tiny-models can be used to reduce CPU and RAM usage.
Expand Down

0 comments on commit ed55649

Please sign in to comment.