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 os.path.isfile(model_path), f"model file {model_path} not existed"
        # assert model data is empty
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 max_retry != 0, f"fail to get range dynamically: {stable_num_limit}"
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 model_path.is_file(), f"file {model_path} not existed"
Severity: Info
Found in stagesepx/api.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 len(stable_num_limit) == 2, "num_limit should be something like [1, 3]"
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 classify_result.contain(to_stage), f"no stage {to_stage} found in result"
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 (
                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

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

        assert config_path.as_posix().endswith(
            ".json"
        ), "config file should be json format"
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 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 p.is_dir(), f"{p} is not a valid directory"
            # validate: at least two classes
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 self._model, "model 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 (
            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 os.path.isfile(img_path), f"file {img_path} is 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 not os.path.isfile(json_path), f"{json_path} already existed"
Severity: Info
Found in stagesepx/classifier/base.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 ret, f"read frame failed, frame id: {frame_id}"

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 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 self.data, "load_frames() first"
Severity: Info
Found in stagesepx/video.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/keras.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
Severity
Category
Status
Source
Language