ohsome2label icon indicating copy to clipboard operation
ohsome2label copied to clipboard

Don't know how to proceed with "adding tf_record_from_coco.py to the ./ohsome2label/ directory"

Open iboates opened this issue 4 years ago • 1 comments

I am finding the walkthrough for satellite image building detection quite confusing.

I am using a Google Colab instace to test it out.

I have installed the package and then downloaded the tanzania dataset

!pip install ohsome2label
!rm -r tanzania
!ohsome2label --config config.yaml --schema schema.yaml vector
!ohsome2label --config config.yaml --schema schema.yaml label
!ohsome2label --config config.yaml --schema schema.yaml image
!ohsome2label --config config.yaml --schema schema.yaml visualize -t overlay

This works, I have the data downloaded & visualized properly.

But now the walkthrough says that I have to "Copy tf_record_from_coco.py from this repo to the ./ohsome2label/ directory". How can I do this? The package is installed somewhere in the system's native Python directory. Do I really have to go searching for where this package was installed in site-packages to add this file?

iboates avatar Jun 13 '21 17:06 iboates

sorry for this late reply @iboates .

But now the walkthrough says that I have to "Copy tf_record_from_coco.py from this repo to the ./ohsome2label/ directory". How can I do this? The package is installed somewhere in the system's native Python directory. Do I really have to go searching for where this package was installed in site-packages to add this file?

No, in principle, you can run this "tf_record_from_coco.py" anywhere. Importantly, you will also need to copy this file "dataset_util.py" together, it was needed by "tf_record_from_coco.py". I just uploaded it with commit cd7426ae156dcd011e41f02199b9937ef270fbff.

Then you just have to specify the relative path to the data folder when running the "tf_record_from_coco.py"

$ python tf_record_from_coco.py
--label_input=#path-to-folder-tanzania --train_rd_path=#output-file: train.record --valid_rd_path=#output-file: valid.record

Hope this helps!

ps: Actually, the original text refers to the situation when you clone the Github repo and install it locally with "pip install --editable ."

bobleegogogo avatar Jul 06 '21 14:07 bobleegogogo