Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving AJA operator to Holohub #664

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions applications/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ add_holohub_application(basic_networking_ping DEPENDS
add_holohub_application(body_pose_estimation DEPENDS
OPERATORS OPTIONAL dds_video_subscriber dds_video_publisher)

add_holohub_application(colonoscopy_segmentation)
add_holohub_application(colonoscopy_segmentation DEPENDS OPERATORS aja_source)

add_holohub_application(cvcuda_basic DEPENDS OPERATORS cvcuda_holoscan_interop)

Expand All @@ -42,11 +42,12 @@ add_subdirectory(distributed)

add_holohub_application(endoscopy_depth_estimation)

add_holohub_application(endoscopy_out_of_body_detection)
add_holohub_application(endoscopy_out_of_body_detection DEPENDS OPERATORS aja_source)

add_holohub_application(endoscopy_tool_tracking DEPENDS
OPERATORS lstm_tensor_rt_inference
tool_tracking_postprocessor
aja_source
OPTIONAL deltacast_videomaster yuan_qcap vtk_renderer)

add_subdirectory(h264)
Expand All @@ -62,15 +63,15 @@ add_holohub_application(hyperspectral_segmentation)

add_subdirectory(laser_detection_latency)

add_holohub_application(multiai_endoscopy)
add_holohub_application(multiai_endoscopy DEPENDS OPERATORS aja_source)

add_holohub_application(multiai_ultrasound)
add_holohub_application(multiai_ultrasound OPERATORS aja_source)

add_holohub_application(simple_radar_pipeline)
add_holohub_application(simple_pdw_pipeline DEPENDS
OPERATORS basic_network)

add_holohub_application(object_detection_torch)
add_holohub_application(object_detection_torch DEPENDS OPERATORS aja_source)

add_holohub_application(openigtlink_3dslicer DEPENDS OPERATORS openigtlink)

Expand All @@ -88,7 +89,7 @@ add_holohub_application(network_radar_pipeline DEPENDS
OPERATORS basic_network
advanced_network)

add_holohub_application(ultrasound_segmentation)
add_holohub_application(ultrasound_segmentation DEPENDS OPERATORS aja_source)

add_holohub_application(velodyne_lidar_app DEPENDS
OPERATORS velodyne_lidar
Expand Down
2 changes: 1 addition & 1 deletion applications/colonoscopy_segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ if(BUILD_TESTING)
--data "${HOLOHUB_DATA_DIR}/colonoscopy_segmentation"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_property(TEST colonoscopy_segmentation_python_test PROPERTY ENVIRONMENT
"PYTHONPATH=${GXF_LIB_DIR}/../python/lib")
"PYTHONPATH=${GXF_LIB_DIR}/../python/lib:${CMAKE_BINARY_DIR}/python/lib")

set_tests_properties(colonoscopy_segmentation_python_test
PROPERTIES PASS_REGULAR_EXPRESSION "Reach end of file or playback count reaches to the limit. Stop ticking.;"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from holoscan.core import Application
from holoscan.operators import (
AJASourceOp,
FormatConverterOp,
HolovizOp,
InferenceOp,
Expand All @@ -27,6 +26,8 @@
)
from holoscan.resources import BlockMemoryPool, CudaStreamPool, MemoryStorageType

from holohub.aja_source import AJASourceOp


class ColonoscopyApp(Application):
def __init__(self, data, source="replayer"):
Expand Down
5 changes: 4 additions & 1 deletion applications/endoscopy_out_of_body_detection/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
#include <getopt.h>

#include <holoscan/holoscan.hpp>
#include <holoscan/operators/aja_source/aja_source.hpp>
#include <holoscan/operators/video_stream_replayer/video_stream_replayer.hpp>
#include <holoscan/operators/format_converter/format_converter.hpp>
#include <holoscan/operators/inference/inference.hpp>
#include <holoscan/operators/inference_processor/inference_processor.hpp>

#ifdef AJA_SOURCE
#include <aja_source.hpp>
#endif

class App : public holoscan::Application {
public:
void set_source(const std::string& source) {
Expand Down
5 changes: 4 additions & 1 deletion applications/endoscopy_tool_tracking/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <getopt.h>

#include <holoscan/holoscan.hpp>
#include <holoscan/operators/aja_source/aja_source.hpp>
#include <holoscan/operators/format_converter/format_converter.hpp>
#include <holoscan/operators/holoviz/holoviz.hpp>
#include <holoscan/operators/video_stream_recorder/video_stream_recorder.hpp>
Expand All @@ -29,6 +28,10 @@
#include <vtk_renderer.hpp>
#endif

#ifdef AJA_SOURCE
#include <aja_source.hpp>
#endif

#ifdef DELTACAST_VIDEOMASTER
#include <videomaster_source.hpp>
#include <videomaster_transmitter.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

from holoscan.core import Application
from holoscan.operators import (
AJASourceOp,
FormatConverterOp,
HolovizOp,
VideoStreamRecorderOp,
VideoStreamReplayerOp,
)
from holoscan.resources import BlockMemoryPool, CudaStreamPool, MemoryStorageType

from holohub.aja_source import AJASourceOp
from holohub.lstm_tensor_rt_inference import LSTMTensorRTInferenceOp

# Enable this line for Yuam capture card
Expand Down
2 changes: 1 addition & 1 deletion applications/endoscopy_tool_tracking/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
]
},
"run": {
"command": "python3 <holohub_app_source>/endoscopy_tool_tracking.py --data <holohub_data_dir>/endoscopy",
"command": "python3 <holohub_app_source>/endoscopy_tool_tracking.py --source aja --data <holohub_data_dir>/endoscopy",
"workdir": "holohub_bin"
}
}
Expand Down
3 changes: 2 additions & 1 deletion applications/monai_endoscopic_tool_seg/tool_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from holoscan.core import Application
from holoscan.operators import (
AJASourceOp,
FormatConverterOp,
HolovizOp,
InferenceOp,
Expand All @@ -27,6 +26,8 @@
)
from holoscan.resources import BlockMemoryPool, CudaStreamPool, MemoryStorageType

from holohub.aja_source import AJASourceOp


class EndoToolSegApp(Application):
def __init__(self, data, source="replayer"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@

#include <cuda_runtime.h>
#include <holoscan/holoscan.hpp>
#include <holoscan/operators/aja_source/aja_source.hpp>
#include <holoscan/operators/video_stream_replayer/video_stream_replayer.hpp>
#include <holoscan/operators/format_converter/format_converter.hpp>
#include <holoscan/operators/inference/inference.hpp>
#include <holoscan/operators/segmentation_postprocessor/segmentation_postprocessor.hpp>
#include <holoscan/operators/holoviz/holoviz.hpp>
#include <gxf/std/tensor.hpp>

#ifdef AJA_SOURCE
#include <aja_source.hpp>
#endif

#if __has_include("gxf/std/dlpack_utils.hpp")
#define GXF_HAS_DLPACK_SUPPORT 1
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@

#include <cuda_runtime.h>
#include <holoscan/holoscan.hpp>
#include <holoscan/operators/aja_source/aja_source.hpp>
#include <holoscan/operators/video_stream_replayer/video_stream_replayer.hpp>
#include <holoscan/operators/format_converter/format_converter.hpp>
#include <holoscan/operators/inference/inference.hpp>
#include <holoscan/operators/segmentation_postprocessor/segmentation_postprocessor.hpp>
#include <holoscan/operators/holoviz/holoviz.hpp>

#ifdef AJA_SOURCE
#include <aja_source.hpp>
#endif

#include "gxf/std/tensor.hpp"
#include "matx.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ add_executable(multi_ai
target_link_libraries(multi_ai
PRIVATE
holoscan::core
holoscan::ops::aja
holoscan::ops::video_stream_replayer
holoscan::ops::format_converter
holoscan::ops::inference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <cuda_runtime.h>
#include <holoscan/holoscan.hpp>
#include <holoscan/operators/aja_source/aja_source.hpp>
#include <holoscan/operators/video_stream_replayer/video_stream_replayer.hpp>
#include <holoscan/operators/format_converter/format_converter.hpp>
#include <holoscan/operators/inference/inference.hpp>
Expand All @@ -27,6 +26,9 @@
#include "gxf/std/tensor.hpp"
#include "matx.h"

#ifdef AJA_SOURCE
#include <aja_source.hpp>
#endif

#define CUDA_TRY(stmt) \
{ \
Expand Down
3 changes: 2 additions & 1 deletion applications/multiai_endoscopy/python/multi_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import numpy as np
from holoscan.core import Application, Operator, OperatorSpec
from holoscan.operators import (
AJASourceOp,
FormatConverterOp,
HolovizOp,
InferenceOp,
Expand All @@ -30,6 +29,8 @@
)
from holoscan.resources import UnboundedAllocator

from holohub.aja_source import AJASourceOp


class DetectionPostprocessorOp(Operator):
"""Example of an operator post processing the tensor from inference component.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
--- applications/multiai_endoscopy/cpp/post-proc-cpu/multi_ai.cpp 2024-01-10 18:43:58.365526539 +0000
+++ applications/multiai_endoscopy/cpp/post-proc-cpu/multi_ai_test.cpp 2024-02-28 09:17:11.116207162 +0000
@@ -20,6 +20,7 @@
@@ -20,5 +20,6 @@
#include <holoscan/holoscan.hpp>
#include <holoscan/operators/aja_source/aja_source.hpp>
#include <holoscan/operators/video_stream_replayer/video_stream_replayer.hpp>
+#include <holoscan/operators/video_stream_recorder/video_stream_recorder.hpp>
#include <holoscan/operators/format_converter/format_converter.hpp>
#include <holoscan/operators/inference/inference.hpp>
#include <holoscan/operators/segmentation_postprocessor/segmentation_postprocessor.hpp>
@@ -344,6 +345,24 @@
@@ -367,6 +368,24 @@
add_flow(segmentation_preprocessor, inference, {{"", "receivers"}});
add_flow(inference, segmentation_postprocessor, {{"transmitter", ""}});
add_flow(segmentation_postprocessor, holoviz, {{"", "receivers"}});
Expand Down
5 changes: 4 additions & 1 deletion applications/multiai_ultrasound/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <getopt.h>

#include <holoscan/holoscan.hpp>
#include <holoscan/operators/aja_source/aja_source.hpp>
#include <holoscan/operators/format_converter/format_converter.hpp>
#include <holoscan/operators/holoviz/holoviz.hpp>
#include <holoscan/operators/inference/inference.hpp>
Expand All @@ -28,6 +27,10 @@

#include <holoscan/version_config.hpp>

#ifdef AJA_SOURCE
#include <aja_source.hpp>
#endif

#include <visualizer_icardio.hpp>

#define HOLOSCAN_VERSION \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from holoscan import __version__ as holoscan_version
from holoscan.core import Application
from holoscan.operators import (
AJASourceOp,
FormatConverterOp,
HolovizOp,
InferenceOp,
Expand All @@ -30,6 +29,7 @@
from holoscan.resources import BlockMemoryPool, CudaStreamPool, MemoryStorageType
from packaging.version import Version

from holohub.aja_source import AJASourceOp
from holohub.visualizer_icardio import VisualizerICardioOp


Expand Down
5 changes: 4 additions & 1 deletion applications/object_detection_torch/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@
#include <getopt.h>

#include <holoscan/holoscan.hpp>
#include <holoscan/operators/aja_source/aja_source.hpp>
#include <holoscan/operators/format_converter/format_converter.hpp>
#include <holoscan/operators/holoviz/holoviz.hpp>
#include <holoscan/operators/inference/inference.hpp>
#include <holoscan/operators/inference_processor/inference_processor.hpp>
#include <holoscan/operators/video_stream_replayer/video_stream_replayer.hpp>
#include <holoscan/operators/video_stream_recorder/video_stream_recorder.hpp>

#ifdef AJA_SOURCE
#include <aja_source.hpp>
#endif

class App : public holoscan::Application {
public:
void set_source(const std::string &source) {
Expand Down
1 change: 1 addition & 0 deletions applications/orsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ set(HOLOSCAN_OPERATORS
orsi_segmentation_postprocessor
orsi_segmentation_preprocessor
orsi_visualizer
aja_source
)

if(ORSI_VIDEO_MASTER_SDK_FOUND)
Expand Down
6 changes: 5 additions & 1 deletion applications/orsi/lib/orsi_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
#ifdef USE_VIDEOMASTER
#include <videomaster_source.hpp>
#endif
#include <holoscan/operators/aja_source/aja_source.hpp>

#ifdef AJA_SOURCE
#include <aja_source.hpp>
#endif

#include <holoscan/operators/video_stream_replayer/video_stream_replayer.hpp>

#include <getopt.h>
Expand Down
10 changes: 3 additions & 7 deletions applications/ssd_detection_endoscopy_tools/ssd_step1.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@
import torch.nn.functional as F
from holoscan.core import Application, Operator, OperatorSpec
from holoscan.gxf import Entity
from holoscan.operators import (
AJASourceOp,
FormatConverterOp,
HolovizOp,
InferenceOp,
VideoStreamReplayerOp,
)
from holoscan.operators import FormatConverterOp, HolovizOp, InferenceOp, VideoStreamReplayerOp
from holoscan.resources import BlockMemoryPool, MemoryStorageType, UnboundedAllocator

from holohub.aja_source import AJASourceOp

torch.cuda.set_device(torch.device("cuda:0"))

debug_tensor_values_preproc = False
Expand Down
10 changes: 3 additions & 7 deletions applications/ssd_detection_endoscopy_tools/ssd_step2_route1.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@
import torch.nn.functional as F
from holoscan.core import Application, Operator, OperatorSpec
from holoscan.gxf import Entity
from holoscan.operators import (
AJASourceOp,
FormatConverterOp,
HolovizOp,
InferenceOp,
VideoStreamReplayerOp,
)
from holoscan.operators import FormatConverterOp, HolovizOp, InferenceOp, VideoStreamReplayerOp
from holoscan.resources import BlockMemoryPool, MemoryStorageType, UnboundedAllocator

from holohub.aja_source import AJASourceOp

try:
import cupy as cp
except ImportError:
Expand Down
10 changes: 3 additions & 7 deletions applications/ssd_detection_endoscopy_tools/ssd_step2_route2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@

import numpy as np
from holoscan.core import Application, Operator, OperatorSpec
from holoscan.operators import (
AJASourceOp,
FormatConverterOp,
HolovizOp,
InferenceOp,
VideoStreamReplayerOp,
)
from holoscan.operators import FormatConverterOp, HolovizOp, InferenceOp, VideoStreamReplayerOp
from holoscan.resources import BlockMemoryPool, MemoryStorageType, UnboundedAllocator

from holohub.aja_source import AJASourceOp

try:
import cupy as cp
except ImportError:
Expand Down
Loading