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

TFDSv4 carla_video_tracking upgrade. #1829

Closed
wants to merge 46 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1200bbc
fixing configs for new format
Nov 30, 2022
2d12b3c
adding preprocessing for carla_obj_det_dev
Nov 30, 2022
873442d
adding dataset dir for carla_obj_det_dev
Nov 30, 2022
b7bc58e
updating tf import
Nov 30, 2022
df90fbb
update cached_datasets.json
Dec 2, 2022
c0fbbe3
Merge branch 'tfdsv4' into tfdsv4-fix-carla-configs
davidslater Dec 6, 2022
216c4da
handling merge conflict
Dec 6, 2022
bd3621a
formatting
Dec 6, 2022
c9aec26
fix bug resulting from conflict handling
Dec 6, 2022
1787e0e
removing code that got duplicated in merge conflict
Dec 6, 2022
98caa12
renaming a function; fixing a docstring
Dec 6, 2022
c74e710
removing duplicate declaration
Dec 6, 2022
5e92bc3
Merge remote-tracking branch 'lc/tfdsv4-fix-carla-configs' into tfdsv…
jprokos26 Dec 13, 2022
52d9cde
Adding initial files, ArmoryDataGenerator needs updated to include co…
jprokos26 Dec 19, 2022
cda1beb
Merge branch 'tfdsv4' into tfdsv4-carla-video
jprokos26 Dec 19, 2022
80cfa6d
Adding context for Generators. Input shapes causing issue with metric…
jprokos26 Dec 20, 2022
41b1686
Adding unversioned files.
jprokos26 Dec 20, 2022
b7afdd0
Separating dataloader batches into List[Dict[ndarray: (frames, coords…
jprokos26 Dec 20, 2022
f552723
Migrating carla_video_tracking_test and implementing preprocessing.
jprokos26 Dec 20, 2022
69a6498
adding carla_video_tracking_test checksum
jprokos26 Dec 20, 2022
83ae25d
Adding carla_video_tracking_test cached dataset
jprokos26 Dec 20, 2022
3059170
removing carla_video_tracking_dev to readd as rename instead of new file
jprokos26 Dec 20, 2022
bc069bd
marking dev as rename
jprokos26 Dec 20, 2022
b35df54
removing extraneous code
jprokos26 Dec 20, 2022
09e2df3
removing testing changes
jprokos26 Dec 20, 2022
de621f6
user init feature
davidslater Nov 29, 2022
5b70cec
update docs
davidslater Nov 29, 2022
58bec8d
update docs and error
davidslater Dec 2, 2022
1ba2c28
better metrics
davidslater Nov 16, 2022
02834e4
Adding initial files, ArmoryDataGenerator needs updated to include co…
jprokos26 Dec 19, 2022
61a487f
found an easy change to add custom metrics without having to worry as…
ppark-twosixtech Dec 5, 2022
4d8ac63
reverting changes to test loading custom metrics
ppark-twosixtech Dec 6, 2022
f8bc198
Merge pytorch, tf2, and carla mot images (#1786)
Dec 9, 2022
0b7ffa0
fix image link (#1817)
Dec 9, 2022
014e1fc
Adding context for Generators. Input shapes causing issue with metric…
jprokos26 Dec 20, 2022
d718e69
Adding unversioned files.
jprokos26 Dec 20, 2022
ef3b1f7
Separating dataloader batches into List[Dict[ndarray: (frames, coords…
jprokos26 Dec 20, 2022
2577998
Migrating carla_video_tracking_test and implementing preprocessing.
jprokos26 Dec 20, 2022
07741c5
adding carla_video_tracking_test checksum
jprokos26 Dec 20, 2022
631e25b
Adding carla_video_tracking_test cached dataset
jprokos26 Dec 20, 2022
5943015
removing carla_video_tracking_dev to readd as rename instead of new file
jprokos26 Dec 20, 2022
4ca907b
marking dev as rename
jprokos26 Dec 20, 2022
204097e
removing extraneous code
jprokos26 Dec 20, 2022
5757f0b
removing testing changes
jprokos26 Dec 20, 2022
53708ef
removing extraneous code
jprokos26 Dec 21, 2022
e1668e0
Applying rebase from tfdsv4-carla-fix-configs to tfdsv4.
jprokos26 Dec 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions armory/datasets/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ def carla_over_obj_det_dev(element, modality="rgb"):
return x


# @register
# look at the dataset builder file
# @tf.function; then put a breakpoint in the preprocessing function
# tf.set_eagerly true (in slack channel)
# proper integration will be shown with good benign performance
@register
def carla_video_tracking_dev(element, max_frames=None):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am assuming max_frames gets passed in as a dataset_kwargs but this is untested as I cannot find an example of it being used previously.

return carla_video_tracking(
Expand Down Expand Up @@ -230,20 +225,6 @@ def canonical_variable_image_preprocess(context, batch):
"""
Preprocessing when images are of variable size
"""
# if batch.dtype == np.object:
# for x in batch:
# check_shapes(x.shape, context.x_shape)
# assert x.dtype == context.input_type
# assert x.min() >= context.input_min
# assert x.max() <= context.input_max

# quantized_batch = np.zeros_like(batch, dtype=np.object)
# for i in range(len(batch)):
# quantized_batch[i] = (
# batch[i].astype(context.output_type) / context.quantization
# )
# batch = quantized_batch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should the preprocessor handle pure python objects as done here?

if batch.dtype != context.input_type:
if batch.dtype == object:
raise NotImplementedError(
Expand All @@ -254,14 +235,6 @@ def canonical_variable_image_preprocess(context, batch):
)
check_shapes(tuple(batch.shape), context.x_shape)
assert batch.dtype == context.input_type
# assert tf.math.reduce_min(batch) >= context.input_min
# assert tf.math.reduce_max(batch) <= context.input_max

# for x in batch:
# assert x.dtype == context.output_type
# assert tf.math.reduce_min(x) >= context.output_min
# assert tf.math.reduce_max(x) <= context.output_max

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this is now passed into the dataloader as a function instead of operating on the actual tensor, should this still check the min & max values? TF was complaining about assert statements, but I can look for another way to implement this logic.

return batch


Expand All @@ -278,10 +251,6 @@ def __init__(self, max_frames):
self.max_frames = max_frames

def __call__(self, batch):
# if batch.dtype == np.object:
# clipped_batch = np.empty_like(batch, dtype=np.object)
# clipped_batch[:] = [x[: self.max_frames] for x in batch]
# return clipped_batch
return batch[:, : self.max_frames]


Expand Down