Commit Graph
151 Commits
Author SHA1 Message Date
Onuralp SEZER bb4d741aff feat(color.py): ✨ add color constants
This commit adds the WHITE, BLACK, RED, GREEN, and BLUE color constants
to the Color class in color.py. These constants represent
the corresponding colors in the RGB color space.

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2024-01-19 00:42:59 +03:00
pre-commit-ci[bot] 6128576ea1 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-01-18 16:06:10 +00:00
SkalskiP 5f04836917 calculate_region_of_interest_limits and is_point_in_limits methods added. 2024-01-18 13:36:47 +01:00
SkalskiP 616fc96ca8 Adding ability to calculate vector magnitude. 2024-01-18 12:46:09 +01:00
rev dca7fb43e5 Revert "Fixed cross_product() funtion test"
This reverts commit 353865e017.
2024-01-18 13:50:03 +03:00
SkalskiP 3a608eeb93 Merge remote-tracking branch 'origin/add-center-point-crossed-condition-to-line-counter' into add-center-point-crossed-condition-to-line-counter 2024-01-18 11:29:18 +01:00
SkalskiP 008b0bd984 Formatting updates. 2024-01-18 11:29:01 +01:00
rev 353865e017 Fixed cross_product() funtion test 2024-01-18 13:26:01 +03:00
SkalskiP da4ee62298 Fixing cross_product tests. 2024-01-18 11:18:18 +01:00
rev 1f640980ad Increased line counter flexibility and replaced vector cross product function 2024-01-18 01:21:45 +03:00
SkalskiP f4d2f2a900 use CLASS_NAME_DATA_FIELD data constant over 'class_name' string 2024-01-03 07:22:48 +01:00
pre-commit-ci[bot] d35f1888f9 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-01-02 20:02:04 +00:00
SkalskiP 706ff0fd46 initial update of process_roboflow_result function 2024-01-02 21:00:17 +01:00
pre-commit-ci[bot] 51694819e3 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-01-02 14:05:34 +00:00
SkalskiP ced9f35b6e initial Detections.__getitem__ implementation 2024-01-02 15:05:20 +01:00
pre-commit-ci[bot] e75e527925 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-29 17:24:37 +00:00
SkalskiP 5984d3374c better Detections.merge validation 2023-12-29 18:24:24 +01:00
SkalskiP 099d36011d better Detections.merge docs + more Detections.merge tests 2023-12-29 16:53:41 +01:00
pre-commit-ci[bot] ea21a75135 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-29 15:37:49 +00:00
SkalskiP 95e2ad6d52 refactor of core.py; moving utils to utils.py 2023-12-29 16:36:54 +01:00
SkalskiP 9be71da888 handle one more edge case in Detections.merge logic 2023-12-29 16:15:36 +01:00
SkalskiP c2412379c4 Merge remote-tracking branch 'origin/feature/extend-detections-with-data-field-to-support-custom-payload' into feature/extend-detections-with-data-field-to-support-custom-payload 2023-12-29 15:16:46 +01:00
pre-commit-ci[bot] 63ccc98d0b fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-29 14:15:59 +00:00
SkalskiP 14761cb20a fix test_detections_from_xml_obj 2023-12-29 15:15:57 +01:00
SkalskiP 5dfc2e61e7 Merge remote-tracking branch 'origin/feature/extend-detections-with-data-field-to-support-custom-payload' into feature/extend-detections-with-data-field-to-support-custom-payload 2023-12-29 15:15:49 +01:00
SkalskiP 701b0c0b97 fix test_detections_from_xml_obj 2023-12-29 15:15:38 +01:00
pre-commit-ci[bot] 27eb823809 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-29 14:05:21 +00:00
SkalskiP efed23f64e Detections.merge updated and tested 2023-12-29 15:05:07 +01:00
pre-commit-ci[bot] b2d98fe457 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-28 16:52:43 +00:00
SkalskiP ea6439b8fd Detections.__eq__ updated and tested 2023-12-28 17:52:25 +01:00
pre-commit-ci[bot] f2031d53d6 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-28 15:03:47 +00:00
SkalskiP f3f545d893 simplifying Detections.__eq__ method 2023-12-28 15:58:51 +01:00
Onuralp SEZER daf4046fd2 feat(xml-parsing): 🔐 enhance security with defusedxml and bandit rules
fix bandit rule B318: (xml-attribute-parsing) defusedxml package should be used to parse untrusted XML data
fix bandit rule B314: (xml-entity-expansion) XML entity expansion should be disabled
fix bandit rule B413: (xml-etree-parse) XML parsing library should be secure
fix bandit rule B412: (xml-lib-exploits) XML libraries should be vetted for defusedxml or lxml.vulns
fix bandit rule B410: (xml-minidom-xxe) XML minidom can be vulnerable to XML eXternal Entity attacks

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2023-12-10 13:57:51 +03:00
pre-commit-ci[bot] a530b2ba5e fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-06 11:20:43 +00:00
SkalskiP 7cbf16be8a Add scale_boxes function to detection utils
Added a new function scale_boxes to the detection utilities in order to scale the dimensions of bounding boxes. This function accepts bounding boxes and a scaling factor as input and returns the scaled bounding boxes. It can enlarge or shrink the input bounding boxes based on the value of the passed factor. The function was also documented in the utils.md file and necessary tests were added to assure its correctness.
2023-12-06 12:16:22 +01:00
pre-commit-ci[bot] 242ac5f7db fix(pre_commit): 🎨 auto format pre-commit hooks 2023-11-26 10:27:43 +00:00
SkalskiP e6f0ae8514 Add 'as_hex' method and corresponding test to Color class. 2023-11-26 11:25:59 +01:00
SkalskiP 7750856c18 Fix method names and improve code formatting
Renamed methods to improve clarity. `get_anchor_coordinates` changed to `get_anchors_coordinates` and `calculate_centroids` changed to `calculate_masks_centroids`. Indentation for method arguments was adjusted in `core.py` and other files for better readability. Functionality remains the same, these changes are meant to improve code maintainability and readability.
2023-11-16 15:23:55 +01:00
pre-commit-ci[bot] 72ab46687f fix(pre_commit): 🎨 auto format pre-commit hooks 2023-11-16 12:59:16 +00:00
SkalskiP 50e561a4fb Add centroid calculation for binary masks
Added `calculate_centroids` function to compute center of mass for binary mask representations. Method added to `utils.py` and method import added to `core.py`. `Position` enumeration updated with `CENTER_OF_MASS` constant. Test function is added with test cases covering different mask scenarios. Update allows for masks to carry center of mass information too, useful in object detection.
2023-11-16 13:52:32 +01:00
Onuralp SEZER b9573605c7 fix(test): 🧪 pre-commit's whitespace exclude and test case fix for whiespace
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2023-11-15 17:01:57 +03:00
pre-commit-ci[bot] 8025b468a2 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-11-15 13:42:25 +00:00
SkalskiP d3fb4ad932 Ignoring W291 for test_file.py 2023-11-15 14:41:38 +01:00
pre-commit-ci[bot] fcfb57612f fix(pre_commit): 🎨 auto format pre-commit hooks 2023-11-15 13:37:51 +00:00
SkalskiP c28aa5aebd Updated tests to reflect changes in file content handling 2023-11-15 14:37:02 +01:00
Onuralp SEZER e8f0ceab71 fix: 🐞 test fix
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2023-11-10 22:07:47 +03:00
pre-commit-ci[bot] 08a48a4f5d fix(pre_commit): 🎨 auto format pre-commit hooks 2023-11-10 18:26:26 +00:00
SkalskiP 95f4b5c0b8 Add linting rule exceptions for test_file.py
Added linting rule exceptions for 'test/utils/test_file.py' in 'pyproject.toml'. Specifically, the 'W291' error which checks for trailing whitespace is ignored for this test file. This is necessary to test whether 'read_txt_file' function in 'test_utils.py' correctly ignores trailing whitespaces in varies test scenarios.
2023-11-10 10:25:59 -08:00
pre-commit-ci[bot] 6211139201 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-11-10 18:15:39 +00:00
SkalskiP e416ef4c0e Refactor import paths and improve text file reading
Refactored import paths for test utility methods across multiple test files to align with a recent package restructure. Enriched 'read_txt_file' functionality in 'file.py' allowing to optionally skip empty lines, enhancing flexibility for various use-cases. Added tests for the new 'read_txt_file' behavior in a new 'test_file.py'. Renamed 'utils.py' in test package to 'test_utils.py' for better differentiation from the util package in the source code.
2023-11-10 10:15:08 -08:00