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

Unified Detector, Error Message during Inference #5

Closed
Bozcomlekci opened this issue Aug 2, 2022 · 2 comments
Closed

Unified Detector, Error Message during Inference #5

Bozcomlekci opened this issue Aug 2, 2022 · 2 comments

Comments

@Bozcomlekci
Copy link

Greetings,

I'm trying to perform inference on the HierText dataset with Unified Detector. When I ran the inference script, I got the error message in the image.

The script I ran was:

python3 -m official.projects.unified_detector.run_inference \
--gin_file=official/projects/unified_detector/configs/gin_files/unified_detector_model.gin \
--ckpt_path=vision_unified_detector_unified_detector_ckpt \
--img_dir=<the-directory-containing-validation-images> \
--output_path=<some-directory>/validation_output.jsonl

The error message:
error_message

I'm utilizing an anaconda environment with Python3.7.13. Initially, I ran the scripts under the sections, "Set up TensorFlow Models" and "Set up DeepLab2". I installed protoc with conda. Finally, I downloaded the Unified-Detector-Line checkpoint file, decompressed the file with gzip, moved it to the "models" folder and ran the script above.

Could you help with the error message? I suspect that there is a mismatch in the packages installed, or the checkpoint file is broken.

Could you also specify which python version you are using the Unified Detector with?

Thanks in advance.

@Jyouhou
Copy link
Collaborator

Jyouhou commented Aug 2, 2022

You need to specify the checkpoint up to the prefix of the files:

--ckpt_path=vision_unified_detector_unified_detector_ckpt/ckpt

@Bozcomlekci
Copy link
Author

Bozcomlekci commented Aug 3, 2022

Thanks, the problem was the extension of the downloaded checkpoint file is .gz but it has to be .tar.gz to extract it. I had to manually change it to .tar.gz, then extract it. Although it is a small issue, it is confusing.

@Jyouhou Jyouhou closed this as completed Aug 3, 2022
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

2 participants