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

Merge NN (tf2.1) #330

Merged
merged 289 commits into from Mar 19, 2020
Merged

Merge NN (tf2.1) #330

merged 289 commits into from Mar 19, 2020

Conversation

ntabris
Copy link
Contributor

@ntabris ntabris commented Mar 19, 2020

No description provided.

- Agnostic to centroid calculation method.
- Propagates all frame example metadata to individual instance examples.
- Tests for coordinate transformations correctness, especially for
  tricky bounding box and cropping calculations.
- Low level confidence map generation functions
- Multi-instance confidence map generator
- Multi-instance centroid confidence map generator
- Instance-cropped center instance confidence map generator
- Instance-cropped all instance confidence map generator
- Tests
- Useful for downstream processing that affects shape.
- "Full" to indicate it refers to the input to the instance cropper,
  which may have been modified relative to the "raw" image, e.g., due to
  padding/scaling.
- Rename attribute `drop_full_image` to `keep_full_image`
- The general expectation is that points in individual examples are
  already on the image grid scale.
- The "scale" key can be used to track scaling operations, including
  aspect ratio changes. This information is sufficient to map points on
  example images/confidence maps to the raw images.
- Commented scaling behavior across pipeline modules.
- Changed behavior of `MultiConfidenceMaps` to compute confidence maps
  on the current image grid under the assumption that the "instances"
  key is at the same scale as the "image".
- Documented the normalization modes expected when using different
  pretrained models from tf.keras.applications.
- Still needs tests and a transformer block class.
- Implements edge confidence maps; equivalent of part confidence maps
  where scalar values are scaled by the distance of the sampling grid
  points to the line segment formed by edges.
- Implement part affinity fields as simple unit vectors weighted by the
  edge confidence maps for masking.
- Transformers that operate over multiple elements of the data:
    - Shuffler
    - Batcher (this one is tricky with variable length elements)
    - Prefetcher
ntabris and others added 29 commits March 16, 2020 14:19
If the tracking module wants the full image (i.e., flow shift),
then we need to save it and pass it along. This wasn't being done
correctly for the topdown pipeline.

Fixes issue #325.
The dialog allows for deleting user/predicted/all instances
in specified frames/videos/tracks.

The old "delete from clip" command has been modified to delete all
predicted instances in the clip, regardless of whether an instance
is selected. Previously it would only delete instances which
matched the track of the selected instance if there was one.
This was confusiong, so the current change helps address
issue #312.
- Allows for evaluation with a single model (e.g., just centroids) when
  ground truth data is available.
- Allows for exclusion of specific elements in a dataset given a
  callable that evaluates a conditional on each element.
- Fixes #314: bottom-up inference now properly excludes examples that
  when inference fails to find any local peaks.
- Fixes #322: properly handles case where no centroids are detected.
- Fixes image plotting when doing weird normalization like caffe-mode.
The default backend (Tk) is giving me errors related to multi-
processing.
Without a lock we were getting errors when using viz during
training. With a non-recursive lock I get a deadlock when starting
inference. It appears that everything works with a recursive lock.

I don't see any noticable performance cost but we should keep an
eye out for this.

Fixes issue #321.
- Lots of these will need to be rewritten for the new format, but should
  be easy enough to port them from the git history later.
- There's still a bit of legacy code in nn, but will refactor later.
- Commit 33339cd changed how UNet was built to ensure stride symmetry
  across encoder vs decoder branches, but this broke the tests.
- Inspecting the output shapes closely reveals a discrepancy between the
  reference and the CARE implementations, so added an attribute to
  switch off between these.
- Fixed pooling when using a stem such that stacked architectures can be
  correctly instantiated.
- Fixed and added more tests.
At least for MacOS X I was getting a "too many files open" error
on a dataset with very many videos even if we weren't reading
frames from any of the videos.
Types of vertical marks:
- thick dark blue line for **suggested** frame with **user** instance,
otherwise
- thick light blue line for **suggested** frame with **predicted**
instance, otherwise
- thick black line for frame with **user** instance (whether or not it
has track identity), otherwise
- *thin* black line for frame with **predicted** instance **without
track**, otherwise
- unfilled blue rectangle for **suggested** frame without any instances.

Plus horizontal bars for instances with track identities.

Resolves issue #311.
@ntabris ntabris merged commit 28a0031 into develop Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants