-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from NVIDIA-ISAAC-ROS/release-dp
Isaac ROS 0.10.0 (DP)
- Loading branch information
Showing
20 changed files
with
431 additions
and
502 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Ignore all pycache files | ||
**/__pycache__/** | ||
build/ | ||
install/ | ||
install_aarch64/ | ||
log/ | ||
|
||
# Ignore TensorRT plan files | ||
*.plan | ||
*.engine |
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,54 @@ | ||
## Training a model using simulation | ||
|
||
There are multiple ways to train your own `Detectnet_v2` base model. Note that you will need to update parameters, launch files, and more to match your specific trained model. | ||
|
||
### Use the TAO toolkit launcher | ||
The `Train and Optimize` tookit from NVIDIA has all the tools you need to prepare a dataset and re-train a detector with an easy to follow Jupyter notebook tutorial. | ||
|
||
1. Install the `tao` command line utilities | ||
```bash | ||
pip3 install jupyterlab nvidia-pyindex nvidia-tao | ||
``` | ||
2. Obtain an [NGC API key](https://ngc.nvidia.com/setup/api-key). | ||
3. Install and configure `ngc cli` from [NVIDIA NGC CLI Setup](https://ngc.nvidia.com/setup/installers/cli). | ||
```bash | ||
wget -O ngccli_linux.zip https://ngc.nvidia.com/downloads/ngccli_linux.zip && unzip -o ngccli_linux.zip && chmod u+x ngc && \ | ||
md5sum -c ngc.md5 && \ | ||
echo "export PATH=\"\$PATH:$(pwd)\"" >> ~/.bash_profile && source ~/.bash_profile && \ | ||
ngc config set | ||
``` | ||
4. Download the TAO cv examples to a local folder | ||
```bash | ||
ngc registry resource download-version "nvidia/tao/cv_samples:v1.3.0" | ||
``` | ||
5. Run the `DetectNet_v2` Jupyter notebook server. | ||
```bash | ||
cd cv_samples_vv1.3.0 && jupyter-notebook --ip 0.0.0.0 --port 8888 --allow-root | ||
``` | ||
6. Navigate to the DetectNet v2 notebook in `detectnet_v2/detectnet_v2.ipynb` or go to | ||
``` | ||
http://0.0.0.0:8888/notebooks/detectnet_v2/detectnet_v2.ipynb | ||
``` | ||
And follow the instructions on the tutorial. | ||
|
||
### Training object detection in simulation | ||
|
||
If you wish to generate training data from simulation using 3D models of the object classes you would like to detect, consider following the tutorial [Training Object detection from Simulation](https://docs.nvidia.com/isaac/doc/tutorials/training_in_docker.html). | ||
|
||
The tutorial will use simulation to create a dataset that can then be used to train a `DetectNet_v2` based model. It's an easy to use tool with full access to customize training parameters in a Jupyter notebook. | ||
Once you follow through the tutorial, you should have an `ETLT` file in `~/isaac-experiments/tlt-experiments/experiment_dir_final/resnet18_detector.etlt`. | ||
Consult the spec file in `~/isaac-experiments/specs/isaac_detect_net_inference.json` for the values to use in the following section when preparing the model for usage with this package. | ||
### Using the included dummy model for testing | ||
In this package, you will find a pre-trained DetectNet model that was trained solely for detecting tennis balls using the described simulation method. Please use this model only for verification or exploring the pipeline. | ||
> **Note**: Do not use this tennis ball detection model in a production environment. | ||
You can find the `ETLT` file in `isaac_ros_detectnet/test/dummy_model/detectnet/1/resnet18_detector.etlt` and use the ETLT key `"object-detection-from-sim-pipeline"`, including the double quotes. | ||
```bash | ||
export PRETRAINED_MODEL_ETLT_KEY=\"object-detection-from-sim-pipeline\" | ||
``` |
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
File renamed without changes.
Git LFS file not shown
3 changes: 0 additions & 3 deletions
3
isaac_ros_detectnet/dbscan/x86_64_cuda_11_4/libnvds_dbscan.so
This file was deleted.
Oops, something went wrong.
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
41 changes: 41 additions & 0 deletions
41
isaac_ros_detectnet/launch/isaac_ros_detectnet_demo.launch.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,41 @@ | ||
# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
# NVIDIA CORPORATION and its licensors retain all intellectual property | ||
# and proprietary rights in and to this software, related documentation | ||
# and any modifications thereto. Any use, reproduction, disclosure or | ||
# distribution of this software and related documentation without an express | ||
# license agreement from NVIDIA CORPORATION is strictly prohibited. | ||
|
||
import os | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
from launch import actions, LaunchDescription | ||
from launch.actions import IncludeLaunchDescription | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
my_package_dir = get_package_share_directory('isaac_ros_detectnet') | ||
return LaunchDescription([ | ||
actions.ExecuteProcess( | ||
cmd=['ros2', 'bag', 'play', '-l', | ||
os.path.join(my_package_dir, 'detectnet_rosbag')] | ||
), | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource([os.path.join( | ||
my_package_dir, 'launch'), | ||
'/isaac_ros_detectnet.launch.py']) | ||
), | ||
Node( | ||
package='isaac_ros_detectnet', | ||
executable='isaac_ros_detectnet_visualizer.py', | ||
name='detectnet_visualizer' | ||
), | ||
Node( | ||
package='rqt_image_view', | ||
executable='rqt_image_view', | ||
name='image_view', | ||
arguments=['/detectnet_processed_image'] | ||
) | ||
]) |
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
30 changes: 30 additions & 0 deletions
30
isaac_ros_detectnet/resources/detectnet_sample_config.pbtxt
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,30 @@ | ||
name: "detectnet" | ||
platform: "tensorrt_plan" | ||
max_batch_size: 16 | ||
input [ | ||
{ | ||
name: "input_1" | ||
data_type: TYPE_FP32 | ||
format: FORMAT_NCHW | ||
dims: [ 3, 368, 640 ] | ||
} | ||
] | ||
output [ | ||
{ | ||
name: "output_bbox/BiasAdd" | ||
data_type: TYPE_FP32 | ||
dims: [ 8, 23, 40 ] | ||
}, | ||
{ | ||
name: "output_cov/Sigmoid" | ||
data_type: TYPE_FP32 | ||
dims: [ 2, 23, 40 ] | ||
} | ||
] | ||
dynamic_batching { } | ||
version_policy: { | ||
specific { | ||
versions: [ 1 ] | ||
} | ||
} | ||
|
3 changes: 3 additions & 0 deletions
3
isaac_ros_detectnet/resources/rosbags/detectnet_rosbag/detectnet_rosbag_0.db3
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
isaac_ros_detectnet/resources/rosbags/detectnet_rosbag/metadata.yaml
Git LFS file not shown
Oops, something went wrong.