Is there a way to split a tif image into several images with their .geojson annotations? - geospatial

I have an orto tif image with their annotations in a geojson file, I would like to split this image into several images each image with their corresponding annotations in a separate file .
I will use it afterwards to convert each geojson file into a mask to train my model for construction detection (unet fastai).

Related

How to read data in a tfrecords file format?

I have a file in tfrecords format containing images as a dataset. Can anyone suggest a way to get actual images from the tfrecords file.
The above image shows the file properties.

Generate 3D data using 2D images

I have a folder of 2D jpg images. I would like to convert that images to 3D image so that i can generate Digital Radiograph using ITK.
I know that it is easy to convert the 2D images to DICOM format and by using vtkDICOMImageReader, an then to give the output of vtkDICOMImageReader to the itk's DRR.
But i don't want that because my 2D images have no information about series number, instance number, image position patient,etc.
Is there any way to give the folder of 2D jpg images to the input of ITK's DRR?
The series of 2D images does not have to be in DICOM format. ImageSeriesReadWrite example shows how to do it for PNGs. Changing the file name format to match your JPEGs should do the trick.

How to get satellite image of a location with latitude and longitude in Python

For my GeoSpatial project, I want to obtain a satellite image of an area.I have the latitude and longitude of that area,I want to get the satellite image (preferably in jpg or png format) in Python.
You can use sat-search library to find satellite images using lat/long coordinates. It'll give you the S3 link to download the image and you can download it using boto3 or awscli. (e.g. aws s3 cp s3://remote_url local_image.tif) After that, you can use rasterio to open the image and crop the area you want, if the original image is too big for your use case. The typical image format for geospatial imagery is GeoTiff (*.tif), which is similar to jpg or png with geocoordinate information. Good luck!

Reading xml and locating the rows in tiff file

I have RDCL 2015 dataset containing the ground truth and sample images with tiff extension. I want to take in ground truth from the xml files and images from the tiff.
The objective is to read the XML and locate the rows within the .tiff files
I am new to this field so I don't have any idea how it's done any suggestion will be helpful.
Thanks in advance

TensorFlow example for text classification - how to evaluate your own text?

Does any one have full steps and example for TensorFlow example for passing in your own text files and getting them evaluated against the existing model that comes with examples - using train.py as documented?
Also, if I wanted to train on different input set of say 1000 text files of my own samples, and then use that model for new text files? I know there is documentation but is terse for someone who is not familiar with text classification process.
I was able to run image example against my own images as that was only requiring to swap out one image .jpg file name for myh new image file, but for text it seems to be more involved.
Thanks
Here is an example: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/skflow/text_classification.py
You can set the flag test_with_fake_data to use the fake data in text_train.csv (training samples) and text_test.csv (testing samples) here. Next, you can modify these two files to include whatever data you'd like to have. You will need to do some preprocessing if your existing text files are in a different format.
You need to load the vocabulary file saved during training and process your new text with that. See the eval.py file here
Change the data parameters with your input text and proceed.

Resources