figure image bounding box annotation for single document (#389)
* enable debug logging for tests * added cli scaffolding * extract images from pdf * fixed type hint * added bounding box to_list * converted bounding box to named tuple * added tests for validate * implemented bounding box intersection * implemented finding bounding boxes of single image * added test for smaller partial image * added libgl1 for open cv * linting: use with statement for Popen * added support for multiple image files * added support for xml files * join graphic href with xml dirname * renamed cv2 to cv * using ObjectDetectorMatcher * moved funtions to image object matching module * added TestGetObjectMatch * added ImageObjectMarchResult * added test_should_match_smaller_image * added test_should_match_smaller_rotated_90_image * fixed typo ImageObjectMatchResult * moved object_detector_matcher parameter down * added get_image_list_object_match * added support for gzipped files * indent output json * added annotation file_name * using sample image as fixture * reduce size of sample image * added save_images_as_pdf * added test using multiple images * prefer better match based on keyword match count * added --debug cli arg * handle case where no homography can be found * use category based on parent element * added formula type * added related_element_id * added logging tqdm * added info * resize larger image to make finding bounding boxes faster * convert to gray scale to make finding boxes even faster * made max width height configurable * cache image features * increased default max width height * added tests for get_image_array_with_max_resolution * allow max width height to be zero * make grayscale conversion optional * disabled max resolution by default
Showing
- .pylintrc 1 addition, 0 deletions.pylintrc
- Dockerfile 1 addition, 0 deletionsDockerfile
- doc/tools.md 30 additions, 0 deletionsdoc/tools.md
- requirements.txt 3 additions, 0 deletionsrequirements.txt
- sciencebeam_gym/pdf/pdf_to_lxml_wrapper.py 4 additions, 4 deletionssciencebeam_gym/pdf/pdf_to_lxml_wrapper.py
- sciencebeam_gym/pdf/pdf_to_png.py 16 additions, 16 deletionssciencebeam_gym/pdf/pdf_to_png.py
- sciencebeam_gym/tools/image_annotation/__init__.py 0 additions, 0 deletionssciencebeam_gym/tools/image_annotation/__init__.py
- sciencebeam_gym/tools/image_annotation/find_bounding_boxes.py 278 additions, 0 deletions...ncebeam_gym/tools/image_annotation/find_bounding_boxes.py
- sciencebeam_gym/utils/bounding_box.py 57 additions, 34 deletionssciencebeam_gym/utils/bounding_box.py
- sciencebeam_gym/utils/cv.py 36 additions, 0 deletionssciencebeam_gym/utils/cv.py
- sciencebeam_gym/utils/image_object_matching.py 297 additions, 0 deletionssciencebeam_gym/utils/image_object_matching.py
- sciencebeam_gym/utils/io.py 10 additions, 0 deletionssciencebeam_gym/utils/io.py
- tests/conftest.py 1 addition, 1 deletiontests/conftest.py
- tests/pdf/pdf_to_png_test.py 1 addition, 0 deletionstests/pdf/pdf_to_png_test.py
- tests/tools/image_annotation/__init__.py 0 additions, 0 deletionstests/tools/image_annotation/__init__.py
- tests/tools/image_annotation/find_bounding_boxes_test.py 325 additions, 0 deletionstests/tools/image_annotation/find_bounding_boxes_test.py
- tests/utils/bounding_box_test.py 51 additions, 1 deletiontests/utils/bounding_box_test.py
- tests/utils/image_object_matching_test.py 268 additions, 0 deletionstests/utils/image_object_matching_test.py
Please register or sign in to comment