Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CFAR and CCL feeders #494

Merged
merged 9 commits into from
May 6, 2022
Merged

Added CFAR and CCL feeders #494

merged 9 commits into from
May 6, 2022

Conversation

kjy000329
Copy link
Contributor

@kjy000329 kjy000329 commented Sep 8, 2021

Added Constant False Alarm Rate (CFAR) and Connected Component Labeling (CCL) feeders, that perform post processing of frames generated by frame readers.

Note: This PR depends on #492 and will be re-based.

@kjy000329 kjy000329 requested a review from a team as a code owner September 8, 2021 00:52
@kjy000329 kjy000329 requested review from jswright-dstl and svidal-dstl and removed request for a team September 8, 2021 00:52
@kjy000329 kjy000329 changed the title Added test_image Added CFAR and CCL feeders Sep 9, 2021
@codecov
Copy link

codecov bot commented Sep 9, 2021

Codecov Report

Merging #494 (e9cf259) into main (30addea) will decrease coverage by 0.55%.
The diff coverage is 10.20%.

❗ Current head e9cf259 differs from pull request most recent head 4e7781b. Consider uploading reports for the commit 4e7781b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #494      +/-   ##
==========================================
- Coverage   94.34%   93.79%   -0.56%     
==========================================
  Files         154      155       +1     
  Lines        7344     7393      +49     
  Branches     1397     1406       +9     
==========================================
+ Hits         6929     6934       +5     
- Misses        313      357      +44     
  Partials      102      102              
Flag Coverage Δ
integration 68.15% <0.00%> (-0.49%) ⬇️
unittests 91.15% <10.20%> (-0.55%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
stonesoup/feeder/image.py 10.20% <10.20%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30addea...4e7781b. Read the comment docs.

Copy link
Member

@sdhiscocks sdhiscocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change needed for dependencies, but otherwise looks good 👍

setup.py Outdated
@@ -27,7 +27,7 @@
use_scm_version=True,
install_requires=[
'ruamel.yaml>=0.15.45', 'numpy>=1.17', 'scipy', 'matplotlib', 'utm', 'pymap3d', 'ordered-set',
'setuptools>=42', 'rtree',
'setuptools>=42', 'rtree', 'opencv-python'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may be better in extra_requires. There are examples for this for video/tensorflow.
You can raise a warning on the relevant imports, like the tensorflow notebooks.

try:
import tensorflow as tf
from object_detection.utils import label_map_util as lm_util
except ImportError as error:
raise ImportError(
"Usage of the TensorFlow detectors requires that TensorFlow and the TensorFlow Object "
"Detection API are installed. A quick guide on how to set these up can be found here: "
"https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html")\
from error

Copy link
Collaborator

@sglvladi sglvladi Sep 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sdhiscocks Thanks for the comment. I'll be picking up this PR, since Charlotte has now finished her internship. Do you think this should go under the video extras?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either video or many a new group. video may be best, so we don't have too many, and it makes sense for opencv

@sdhiscocks
Copy link
Member

Just spotted that the pickle files are fairly large. Wonder if there is an alternative? numpy.savez? Or maybe check properties of the resultant array (sum of array or diagonal matches expects)?

@sdhiscocks
Copy link
Member

numpy.savez?

Compressed option numpy.savez_compressed

@sglvladi
Copy link
Collaborator

sglvladi commented Jan 6, 2022

Just spotted that the pickle files are fairly large. Wonder if there is an alternative? numpy.savez? Or maybe check properties of the resultant array (sum of array or diagonal matches expects)?

@sdhiscocks Good spot! I have cropped the test image, which leads to reduced size of the image file and replaced the pickle files with the actual expected images, which are much smaller. Hope this does the trick. I also noticed that there was no documentation for the introduced classes, so I've added that as well.

@sdhiscocks sdhiscocks removed the request for review from svidal-dstl May 6, 2022 10:12
@sdhiscocks sdhiscocks merged commit 8772a08 into dstl:main May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants