This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pystac.errors.STACValidationError: Validation failed for Feature at /home/rave/mlm-form/item.json with ID item against schema at https://crim-ca.github.io/mlm-extension/v1.2.0/schema.json | |
{'type': 'Feature', 'stac_version': '1.0.0', 'id': 'item', 'properties': {'start_datetime': '1900-01-01T00:00:00Z', 'end_datetime': '9999-01-01T00:00:00Z', 'description': 'An Item with Machine Learning Model Extension metadata.', 'datetime': None, 'mlm:framework': 'Pytorch', 'mlm:framework_version': '2.3.0', 'mlm:memory_size': 1, 'mlm:batch_size_suggestion': 3300, 'mlm:accelerator': 'cuda', 'mlm:accelerator_constrained': True, 'mlm:accelerator_summary': '', 'mlm:accelerator_count': 1, 'mlm:name': 'Eurosat classifier', 'mlm:architecture': 'Resnet-18', 'mlm:tasks': ['scene-classification'], 'mlm:input': [{'name': 'Sentinel-2 13 band input', 'bands': ['"B01"', '"B02"', '"B03"', '"B04"', '"B05"', '"B06"', '"B07"', '"B08"', '"B8A"', '"B09"', '"B10"', '"B11"', '"B12"'], 'input': {'shape': [-1, 13, 64, 64], 'dim_order': ['batch', ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fasthtml.common import * | |
import json | |
app, rt = fast_app(hdrs=(picolink)) | |
main_element_style = "padding-left: 25px;" | |
control_container_style = "display: flex; flex-direction: column; align-items: flex-start;" | |
text_input_style = "width: 400px; text-align: center;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# export pl api key if porder doesn't work after using planet init. you can use porder quota to check if it is authenticated | |
export PL_API_KEY=###################### | |
# create an idlist from an aoi and date range. there are other filters in the porder docs for more complicated orders | |
porder idlist --input "full path to .geojson" --start "2018-02-01" --end "2020-09-28" --item "PSScene4Band" --asset "analytic_sr" --outfile "full path to idlist.csv" --cmax ".10" --overlap "15" --number 10000000 | |
# splits idlist into multiple csvs with max order size length. you can make 10 orders of size 500 at a time for a total of 5000 assets being processed at a time | |
porder idsplit --idlist "full path to idlist.csv" --lines "500" --local "full path to splitcsvs folder" | |
# get list of csv filenames | |
cd "full path to splitcsvs folder" | |
csvs=$(ls *.csv) | |
cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import fire | |
import h5py | |
import glob | |
import tqdm | |
import numpy as np | |
import pandas as pd | |
import geopandas as gpd | |
# requires fire, h5py, tqdm, numpy, pandas, and geopandas |