facebookresearch / facebookresearch/co-tracker

Error in running annotation generation

Open
#162 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
5.1k
Forks
389
PR merge metrics
No merged PRs in 30d

Description

> Hi @nikitakaraevv,
>
>
>
> I simply downloaded the dataset.py script and updated the main function with the modifications you suggested.
>
>
>
> When I tried running dataset.py, I got the following error:
>
>
>
> ```
>
> tensorflow.python.framework.errors_impl.InvalidArgumentError:
>
> {{function_node__wrapped__IteratorGetNext_output_types_4_device_/
>
> job:localhost/replica:0/task:0/device:CPU:0}}
>
> Incompatible shapes at component 0: expected [2048,24] but got [924,24].
>
> [Op:IteratorGetNext] name:
>
> ```
>
>
>
> Then I changed `tracks_to_sample=2048` to `tracks_to_sample=924` when calling `create_point_tracking_dataset`. With that, it ran for 11 iterations of the loop, but eventually failed with the following error:
>
>
>
> ```
>
> tensorflow.python.framework.errors_impl.InvalidArgumentError:
>
> {{function_node__wrapped__IteratorGetNext_output_types_4_device_/
>
> job:localhost/replica:0/task:0/device:CPU:0}}
>
> Incompatible shapes at component 0: expected [924,24] but got [810,24].
>
> [Op:IteratorGetNext] name:
>
> ```
>
>
>
> Do you have any suggestions on what I should do or what I might have done wrong?
>
>
>
> Also, the file structure that was being generated seemed wrong for the `train.py` script, since no `kubric_movi_f/movi_f/frames` directory was being created, but a bunch of `kubric_movi_f/0000/frames`, `kubric_movi_f/0001/frames`, `kubric_movi_f/0002/frames`, etc, one per iteration of the loop. This behavior seems expected from `dataset.py` since you do:
>
>
>
> ```
>
> os.makedirs(os.path.join(dataset_dir, seq_num, "frames"), exist_ok=True)
>
> for i_frame, frame in enumerate(data["video"]):
>
> Image.fromarray((((frame + 1) / 2.0) * 255.0).astype("uint8")).save(
>
> os.path.join(dataset_dir, seq_num, "frames", f"{i_frame:03d}.png")
>
> )
>
> ```
>
>
>
> but I just wanted to check that this is the correct file structure, seemed off.
>
>
>
> Thank you!

_Originally posted by @rogerioagjr in [#8](https://github.com/facebookresearch/co-tracker/issues/8#issuecomment-1817302977)_

Hi, I am running into the same issue when running dataset.py with the modifications proposed in the referenced issue
I get this error as in the referenced comment "Incompatible shapes at component 0: expected [2048,24] but got [1376,24]"
can you please help?

thanks

Contributor guide

Open the contributing guide

Research direction

Start with dataset.py and the create_point_tracking_dataset call, reproducing the IteratorGetNext shape errors for tracks_to_sample values such as 2048, 924, and 1376. Compare the generated kubric_movi_f//frames paths with what train.py expects; done means annotation generation completes without incompatible shapes and the output structure is confirmed or corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
computer-vision, data, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.