diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml new file mode 100644 index 000000000..215f59e5c --- /dev/null +++ b/.github/workflows/commitlint.yaml @@ -0,0 +1,11 @@ +name: Commit Lint + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + commitlint: + uses: KeepTruckin/github-workflows-catalog/.github/workflows/commitlint.yaml@master + with: + node_version: "20" diff --git a/.github/workflows/semantic-release.yaml b/.github/workflows/semantic-release.yaml new file mode 100644 index 000000000..0d43169d0 --- /dev/null +++ b/.github/workflows/semantic-release.yaml @@ -0,0 +1,15 @@ +name: Semantic Release + +on: + push: + branches: + - master + - main + - develop + - development + +jobs: + release: + uses: KeepTruckin/github-workflows-catalog/.github/workflows/semantic-release.yaml@master + secrets: + KTBOT_GH_PAT: ${{ secrets.KTBOT_GH_PAT }} diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..f362c48be --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,52 @@ +module.exports = { + extends: ["@commitlint/config-conventional"], + rules: { + // Type must be one of these + "type-enum": [ + 2, + "always", + [ + "feat", // New feature + "fix", // Bug fix + "docs", // Documentation only changes + "style", // Changes that don't affect code meaning (formatting, etc) + "refactor", // Code change that neither fixes a bug nor adds a feature + "perf", // Performance improvement + "test", // Adding or updating tests + "chore", // Changes to build process or auxiliary tools + "revert", // Revert a previous commit + "build", // Changes to build system or dependencies + "ci", // Changes to CI configuration + ], + ], + + // Scope is REQUIRED and should be the JIRA ticket (e.g., DEVPRD-3177) + "scope-empty": [2, "never"], + "scope-case": [2, "always", "upper-case"], + + // Subject must not be sentence-case, start-case, pascal-case, upper-case + "subject-case": [ + 2, + "never", + ["sentence-case", "start-case", "pascal-case", "upper-case"], + ], + + // Subject must not end with a period + "subject-full-stop": [2, "never", "."], + + // Subject must not be empty + "subject-empty": [2, "never"], + + // Type must not be empty + "type-empty": [2, "never"], + + // Header max length (100 characters) + "header-max-length": [2, "always", 100], + + // Body max line length (100 characters) + "body-max-line-length": [2, "always", 100], + + // Footer max line length (100 characters) + "footer-max-line-length": [2, "always", 100], + }, +}; diff --git a/efficientdet/hparams_config.py b/efficientdet/hparams_config.py index e81d6465b..d5b3a39e8 100644 --- a/efficientdet/hparams_config.py +++ b/efficientdet/hparams_config.py @@ -45,7 +45,10 @@ def __getattr__(self, k): return self.__dict__[k] def __getitem__(self, k): - return self.__dict__[k] + try: + return self.__dict__[k] + except: + raise AttributeError(k) def __repr__(self): return repr(self.as_dict()) @@ -191,11 +194,19 @@ def default_detection_configs(): # dataset specific parameters # TODO(tanmingxing): update this to be 91 for COCO, and 21 for pascal. h.num_classes = 90 # 1+ actual classes, 0 is reserved for background. + h.num_classification_classes = 3 # number of classes for image classification head + h.num_pose_kps = 7 # number of upper body pose keyponits + h.pose_mask_shape = [ 48, 65 ] # for input image shape 381x519. change if your input resolution is different h.seg_num_classes = 3 # segmentation classes - h.heads = ['object_detection'] # 'object_detection', 'segmentation' + # select one of these heads 'object_detection_image_classification_pose', 'object_detection_image_classification', 'object_detection', 'segmentation' + h.heads = ['object_detection_image_classification_pose'] + h.crop_offset = [0, 0] # image cropping offset h.skip_crowd_during_training = True h.label_map = None # a dict or a string of 'coco', 'voc', 'waymo'. + h.label_name_map = None + h.label_map_inference = None + h.ground_truth_label_map_dict = None h.max_instances_per_image = 100 # Default to 100 for COCO. h.regenerate_source_id = False