Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
2 changes: 2 additions & 0 deletions pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MAIN]
source-roots = python/gstgva
2 changes: 2 additions & 0 deletions python/gstgva/audio/audio_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
gi.require_version('GstAudio', '1.0')
gi.require_version('GLib', '2.0')
gi.require_version('Gst', '1.0')
# pylint: disable=no-name-in-module
from gi.repository import GstAudio, GLib, GObject, Gst
# pylint: enable=no-name-in-module

Segment = namedtuple("Segment", "start_time end_time")

Expand Down
2 changes: 2 additions & 0 deletions python/gstgva/audio/audio_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
gi.require_version("GstAudio", "1.0")
gi.require_version('GObject', '2.0')

# pylint: disable=no-name-in-module
from gi.repository import GObject, Gst, GstAudio
# pylint: enable=no-name-in-module
from .audio_event_meta import AudioEventMeta
from .audio_event import AudioEvent
from ..util import GVATensorMeta
Expand Down
2 changes: 2 additions & 0 deletions python/gstgva/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
gi.require_version("GstAnalytics", "1.0")

from enum import Enum
# pylint: disable=no-name-in-module
from gi.repository import GObject, GstAnalytics, GLib
# pylint: enable=no-name-in-module
from .util import (
libgst,
libgobject,
Expand Down
2 changes: 2 additions & 0 deletions python/gstgva/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
gi.require_version('GstVideo', '1.0')
gi.require_version('GstAudio', '1.0')
gi.require_version('Gst', '1.0')
# pylint: disable=no-name-in-module
from gi.repository import GstVideo, GstAudio, GObject, Gst
# pylint: enable=no-name-in-module

# libgstreamer
if platform.system() == 'Windows':
Expand Down
2 changes: 2 additions & 0 deletions python/gstgva/video_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
gi.require_version("GstAnalytics", "1.0")
gi.require_version("GLib", "2.0")

# pylint: disable=no-name-in-module
from gi.repository import Gst, GstVideo, GstAnalytics, GLib
# pylint: enable=no-name-in-module
from .util import VideoRegionOfInterestMeta
from .util import GVATensorMeta
from .util import GVAJSONMeta
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests/tests_gstgva/pipeline_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
gi.require_version("GLib", "2.0")
gi.require_version('GstApp', '1.0')
gi.require_version("GstVideo", "1.0")
# pylint: disable=no-name-in-module
from gi.repository import GLib, Gst, GstApp, GstVideo # noqa
# pylint: enable=no-name-in-module
import gstgva as va # noqa

Gst.init(None)
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests/tests_gstgva/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import unittest

# pylint: disable=import-error
import test_tensor
import test_region_of_interest
import test_video_frame
Expand All @@ -30,6 +31,7 @@
import test_pipeline_optimizer
import test_pipeline_gvafpsthrottle
import test_pipeline_g3dradarprocess
# pylint: enable=import-error

if __name__ == '__main__':
loader = unittest.TestLoader()
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests/tests_gstgva/test_audio_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
gi.require_version('Gst', '1.0')
gi.require_version('GstAudio', '1.0')

# pylint: disable=no-name-in-module
from gi.repository import Gst, GstAudio
# pylint: enable=no-name-in-module
from gstgva.audio.audio_frame import AudioFrame
from gstgva.audio.audio_event_meta import AudioEventMeta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import *
from utils import BBox, get_model_path, get_model_proc_path
Comment thread
mholowni marked this conversation as resolved.
Outdated
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "dog_bike_car.jpg")
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests/tests_gstgva/test_pipeline_custom_preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import BBox, get_model_path
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "cup.jpg")
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests/tests_gstgva/test_pipeline_detection_atss.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import get_model_path, get_model_proc_path, BBox
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "car_detection.png")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import *
from utils import get_model_path, get_model_proc_path, BBox
Comment thread
mholowni marked this conversation as resolved.
Outdated
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "dog_bike_car.jpg")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import *
from utils import BBox, get_model_path, get_model_proc_path
Comment thread
mholowni marked this conversation as resolved.
Outdated
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "dog_bike_car.jpg")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import os
import unittest

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import BBox, get_model_path, get_model_proc_path
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "face_detection.png")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import *
from utils import BBox, get_model_path, get_model_proc_path
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "face_detection.png")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
gi.require_version("Gst", "1.0")
from gi.repository import Gst

# pylint: disable=import-error
from pipeline_runner import TestGenericPipelineRunner
from utils import *
from utils import BBox, get_model_path, get_model_proc_path
Comment thread
mholowni marked this conversation as resolved.
Outdated
Comment thread
mholowni marked this conversation as resolved.
Outdated
Comment thread
mholowni marked this conversation as resolved.
Outdated
Comment thread
mholowni marked this conversation as resolved.
Outdated
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestGenericPipelineRunner
from utils import *
from utils import BBox, get_model_path, get_model_proc_path
Comment thread
mholowni marked this conversation as resolved.
Outdated
Comment thread
mholowni marked this conversation as resolved.
Outdated
Comment thread
mholowni marked this conversation as resolved.
Outdated
# pylint: enable=import-error

import gi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import *
from utils import BBox, get_model_path, get_model_proc_path
Comment thread
mholowni marked this conversation as resolved.
Outdated
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "dog_bike_car.jpg")
Expand Down
4 changes: 3 additions & 1 deletion tests/unit_tests/tests_gstgva/test_pipeline_gvapython.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import unittest
import os

# pylint: disable=import-error
from pipeline_runner import TestGenericPipelineRunner
from utils import *
from utils import BBox, get_model_path, get_model_proc_path
Comment thread
mholowni marked this conversation as resolved.
Outdated
Comment thread
mholowni marked this conversation as resolved.
Outdated
Comment thread
mholowni marked this conversation as resolved.
Outdated
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "dog_bike_car.jpg")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
# SPDX-License-Identifier: MIT
# ==============================================================================

# pylint: disable=import-error
from pipeline_runner import TestGenericPipelineRunner
# pylint: enable=import-error
import os
import unittest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import os
import unittest

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import BBox, get_model_path, get_model_proc_path
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "people_detection.png")
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests/tests_gstgva/test_pipeline_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
# ==============================================================================

import unittest
# pylint: disable=import-error
from optimizer import get_optimized_pipeline
from utils import get_model_path
# pylint: enable=import-error

class TestOptimizer(unittest.TestCase):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import os
import unittest

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import BBox, get_model_path, get_model_proc_path
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGE_PATH = os.path.join(SCRIPT_DIR, "test_files", "people_detection.png")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import os
import unittest

# pylint: disable=import-error
from pipeline_runner import TestPipelineRunner
from utils import BBox, get_model_path, get_model_proc_path
# pylint: enable=import-error

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
PEOPLE_IMAGE_PATH = os.path.join(
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests/tests_gstgva/test_video_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
gi.require_version('Gst', '1.0')
gi.require_version("GstVideo", "1.0")
gi.require_version("GLib", "2.0")
# pylint: disable=no-name-in-module
from gi.repository import Gst, GstVideo, GLib
# pylint: enable=no-name-in-module

import gstgva as va

Expand Down
Loading