williamfzc/stagesepx

View on GitHub

Showing 212 of 220 total issues

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert (
            len(train_label) > 1
        ), f"seems only one class in the training dataset, at least two classes are required: {train_label}"
Severity: Info
Found in stagesepx/classifier/svm.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert image_path or (
            image_object is not None
        ), "should fill image_path or image_object"

Severity: Info
Found in stagesepx/video.py by bandit

Consider possible security implications associated with subprocess module.
Open

import subprocess
Severity: Info
Found in stagesepx/toolbox.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert max_retry != 0, f"fail to get range dynamically: {stable_num_limit}"
Severity: Info
Found in stagesepx/cutter/cut_result.py by bandit

Consider possible security implications associated with pickle module.
Open

import pickle
Severity: Info
Found in stagesepx/classifier/svm.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert os.path.isfile(model_path), f"model file {model_path} not existed"
        # assert model data is empty
Severity: Info
Found in stagesepx/classifier/svm.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert self._model, "model is empty"
Severity: Info
Found in stagesepx/classifier/svm.py by bandit

Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
Open

            self._model = pickle.load(f)
Severity: Minor
Found in stagesepx/classifier/svm.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert (boost_mode and valid_range) or (
            not (boost_mode or valid_range)
        ), "boost_mode required valid_range"

Severity: Info
Found in stagesepx/classifier/base.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert os.path.isfile(template), f"image {template} not existed"
Severity: Info
Found in stagesepx/toolbox.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert ret, f"read frame failed, frame id: {frame_id}"

Severity: Info
Found in stagesepx/toolbox.py by bandit

Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Open

    salt = random.randint(10, 99)
Severity: Info
Found in stagesepx/toolbox.py by bandit

subprocess call - check for execution of untrusted input.
Open

    return subprocess.check_call(command)
Severity: Info
Found in stagesepx/toolbox.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert config_path.is_file(), f"no config file found in {config_path}"

        # todo: support different types in the future
Severity: Info
Found in stagesepx/api.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert self.can_merge(another, **kwargs)
Severity: Info
Found in stagesepx/cutter/cut_range.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert not os.path.exists(json_path), f"{json_path} already existed"
Severity: Info
Found in stagesepx/cutter/cut_result.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

            assert number_of_dir <= self.MODEL_DENSE, (
                f"dataset has {number_of_dir} classes (more than " + str(self.MODEL_DENSE) + "), please see "
Severity: Info
Found in stagesepx/classifier/keras.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert 0.0 < threshold < 1.0, "threshold out of range"

Severity: Info
Found in stagesepx/cutter/cut_result.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert os.path.isfile(from_file), f"file {from_file} not existed"
Severity: Info
Found in stagesepx/classifier/base.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

            assert (
                number_of_dir > 1
            ), f"dataset only contains one class. maybe some path errors happened: {p}?"

            # more than 6 classes?
Severity: Info
Found in stagesepx/classifier/keras.py by bandit
Severity
Category
Status
Source
Language