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

AssertionError: assert len(annot_file) == 1 #19

Open
TS-code-netizen opened this issue May 31, 2022 · 1 comment
Open

AssertionError: assert len(annot_file) == 1 #19

TS-code-netizen opened this issue May 31, 2022 · 1 comment

Comments

@TS-code-netizen
Copy link

TS-code-netizen commented May 31, 2022

I created a new python file using "./notebooks/example_data_loader_balloon.ipynb" and downloaded the balloon data and run on my anaconda virtual env using
python test_data.py
I get this error, can I know how should I solve it?

Traceback (most recent call last):
File "test_data.py", line 21, in
train_dataset = balloon.BalloonDataset(images_dir=train_dir, class_key='object', classes_dict=CONFIG['class_dict'], preprocess_transform=preprocess.get_input_preprocess(normalize=CONFIG['normalization']), augmentation=aug.get_training_augmentation(), json_annotation_key=None,**CONFIG)
File "C:\Users\Tiffany\Desktop\working_project\Mask_rcnn\mask_rcnn\alexander_pv\maskrcnn_tf2\src\preprocess\preprocess.py", line 46, in init
assert len(annot_file) == 1
AssertionError

I am using conda virtual environment based on this requirements_tf2.4.txt

my balloon dataset path
base_dir: C:\Users\Tiffany\Desktop\working_project\Mask_rcnn\mask_rcnn\alexander_pv\maskrcnn_tf2\balloon
train_dir: C:\Users\Tiffany\Desktop\working_project\Mask_rcnn\mask_rcnn\alexander_pv\maskrcnn_tf2\balloon\train
val_dir: C:\Users\Tiffany\Desktop\working_project\Mask_rcnn\mask_rcnn\alexander_pv\maskrcnn_tf2\balloon\val

@TS-code-netizen
Copy link
Author

TS-code-netizen commented May 31, 2022

Hi, I solve it, it is due to the missing "via_region_data" JSON file in the train datatset.

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

No branches or pull requests

1 participant