-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5733519
commit 927e097
Showing
9 changed files
with
144 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "jetson-examples" | ||
version = "0.1.1" | ||
version = "0.1.2" | ||
authors = [{ name = "luozhixin", email = "[email protected]" }] | ||
description = "Running Gen AI models and applications on NVIDIA Jetson devices with one-line command" | ||
readme = "README.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.1.1" | ||
__version__ = "0.1.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM dustynv/l4t-pytorch:r35.3.1 | ||
WORKDIR /opt | ||
|
||
RUN pip3 install --no-cache-dir --verbose gradio==4.31.5 | ||
|
||
RUN git clone https://github.com/THU-MIG/yolov10.git && \ | ||
cd yolov10 && \ | ||
sed -i '/opencv-python>=4.6.0/ s/^/# /' pyproject.toml && \ | ||
sed -i '/torch>=1.8.0/ s/^/# /' pyproject.toml && \ | ||
sed -i '/torchvision>=0.9.0/ s/^/# /' pyproject.toml && \ | ||
pip3 install -e . && \ | ||
mkdir weights | ||
|
||
CMD cd /opt/yolov10 && ls weights && python3 app.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# AudioCraft Deployment on Jetson in One Line | ||
|
||
## Hello | ||
|
||
💡 Here's an example of quickly deploying YOLOv10 on a Jetson device. | ||
|
||
🔥 Hightlights: | ||
- **Yolov10** is a state-of-the-art real-time object detection model. 🚀🔍 | ||
- **Jetson-examples** is a toolkit designed to deploy containerized applications on NVIDIA Jetson devices. ✨ | ||
- **Jetson** is powerful AI hardware platform for edge computing.💻 | ||
|
||
🛠️ Follow the tutorial below to quickly experience the performance of YOLOv10 on edge computing devices. | ||
|
||
<div align="center"> | ||
<img alt="yolov10" width="1200px" src="./assets/webui.png"> | ||
</div> | ||
|
||
## Getting Started | ||
|
||
- install **jetson-examples** by pip: | ||
```sh | ||
pip3 install jetson-examples | ||
``` | ||
- restart reComputer | ||
```sh | ||
sudo restart | ||
``` | ||
- run audiocraft on jetson in one line: | ||
```sh | ||
reComputer run yolov10 | ||
``` | ||
- Please visit http:https://127.0.0.1:7860 | ||
|
||
## Change Model | ||
|
||
This example will automatically download the YOLOv10s model at startup. If you want to try different models, please use the following command to download the model and then select the appropriate model through the WebUI. | ||
|
||
|
||
> **Note:** You can also download the model via a browser and copy the model to `/home/$USER/reComputer/yolov10/weights`. | ||
| Model | Download Command | | ||
|:-----:|:----:| | ||
| [YOLOv10-N](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10n.pt) | `sudo wget -P /home/$USER/reComputer/yolov10/weights https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10n.pt` | | ||
| [YOLOv10-S](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10s.pt) | `sudo wget -P /home/$USER/reComputer/yolov10/weights https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10s.pt` | | ||
| [YOLOv10-M](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10m.pt) | `sudo wget -P /home/$USER/reComputer/yolov10/weights https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10m.pt` | | ||
| [YOLOv10-B](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10b.pt) | `sudo wget -P /home/$USER/reComputer/yolov10/weights https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10b.pt` | | ||
| [YOLOv10-L](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10l.pt) | `sudo wget -P /home/$USER/reComputer/yolov10/weights https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10l.pt` | | ||
| [YOLOv10-X](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10x.pt) | `sudo wget -P /home/$USER/reComputer/yolov10/weights https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10x.pt` | | ||
|
||
|
||
## Build Docker Image | ||
Our provided container is built based on the `jetson-container`. This example provide a Dockerfile, allowing you to build a more suitable container according to your needs. | ||
|
||
```sh | ||
sudo docker build -t yolov10-jetson . | ||
``` | ||
|
||
> **Note:** Additionally, you can train models, test models, and export models within the Docker container environment. For detailed information, please refer to here. | ||
## Reference | ||
- https://github.com/THU-MIG/yolov10 | ||
- https://github.com/dusty-nv/jetson-containers | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
sudo docker rmi youjiang9977/yolov10-jetson:5.1.1 | ||
sudo rm -rf /home/$USER/reComputer/yolov10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
|
||
# check L4T_VERSION | ||
# reference https://github.com/dusty-nv/jetson-containers/blob/master/jetson_containers/l4t_version.sh | ||
ALLOWED_L4T_VERSIONS=("35.3.1") | ||
|
||
ARCH=$(uname -i) | ||
if [ $ARCH = "aarch64" ]; then | ||
L4T_VERSION_STRING=$(head -n 1 /etc/nv_tegra_release) | ||
|
||
if [ -z "$L4T_VERSION_STRING" ]; then | ||
L4T_VERSION_STRING=$(dpkg-query --showformat='${Version}' --show nvidia-l4t-core) | ||
L4T_VERSION_ARRAY=(${L4T_VERSION_STRING//./ }) | ||
L4T_RELEASE=${L4T_VERSION_ARRAY[0]} | ||
L4T_REVISION=${L4T_VERSION_ARRAY[1]} | ||
else | ||
L4T_RELEASE=$(echo $L4T_VERSION_STRING | cut -f 2 -d ' ' | grep -Po '(?<=R)[^;]+') | ||
L4T_REVISION=$(echo $L4T_VERSION_STRING | cut -f 2 -d ',' | grep -Po '(?<=REVISION: )[^;]+') | ||
fi | ||
|
||
L4T_REVISION_MAJOR=${L4T_REVISION:0:1} | ||
L4T_REVISION_MINOR=${L4T_REVISION:2:1} | ||
|
||
L4T_VERSION="$L4T_RELEASE.$L4T_REVISION" | ||
echo $L4T_VERSION | ||
elif [ $ARCH != "x86_64" ]; then | ||
echo "unsupported architecture: $ARCH" | ||
exit 1 | ||
fi | ||
|
||
echo "L4T_VERSION: $L4T_VERSION" | ||
if [[ ! " ${ALLOWED_L4T_VERSIONS[@]} " =~ " ${L4T_VERSION} " ]]; then | ||
echo "L4T_VERSION is not in the allowed versions list. Exiting." | ||
exit 1 | ||
fi | ||
|
||
# make dirs | ||
BASE_PATH=/home/$USER/reComputer | ||
sudo mkdir -p $BASE_PATH/yolov10/weights | ||
sudo mkdir -p $BASE_PATH/yolov10/run | ||
echo "create workspace at $BASE_PATH/yolov10" | ||
|
||
# download models | ||
echo "download yolov10 models" | ||
WEIGHTS_FILE=$BASE_PATH/yolov10/weights/yolov10s.pt | ||
if [ ! -f $WEIGHTS_FILE ]; then | ||
sudo wget -P $BASE_PATH/yolov10/weights https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10s.pt | ||
else | ||
echo "Weights file already exists: $WEIGHTS_FILE" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
sudo docker run -it --rm --net=host --runtime nvidia \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v /home/$USER/reComputer/yolov10/weights:/opt/yolov10/weights \ | ||
-v /home/$USER/reComputer/yolov10/runs:/opt/yolov10/runs \ | ||
youjiang9977/yolov10-jetson:5.1.1 |