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

Output with artefacts after running on savedmodel #67

Closed
caviri opened this issue May 7, 2023 · 2 comments
Closed

Output with artefacts after running on savedmodel #67

caviri opened this issue May 7, 2023 · 2 comments

Comments

@caviri
Copy link

caviri commented May 7, 2023

Hello, first of all, I would like to thank you for developing this package and making the pre-trained model available.

I am trying to do a first save run with one Sentinel 2 product. I used otbcli_BandMathX to create the composite and export the input for sr4rs. After doing a first run, I obtained an image with a grid and some reminiscent of the original terrain. However, I don't know if this is normal behavior from using the savemodel. Am I missing some steps? Or can I tune some parameters to obtain a better initial result?

Thanks!

original
artefact_big

Some extra info

otbuser@a2c232e90a25:/output$ python sr4rs/code/sr.py --savedmodel sr4rs_sentinel2_bands4328_france2020_savedmodel --input Sentinel-2_B4328_10m.tif --output test.tif
2023-05-05 15:10:17 (INFO): Loading metadata from official product
2023-05-05 15:10:17 (INFO) ReadImageInfo:
Image general information:
        Number of bands : 4
        Data type : float
        No data flags : Not found
        Start index :  [0,0]
        Size :  [10980,10980]
        Origin :  [300005,4.10004e+06]
        Spacing :  [10,-10]
        Estimated ground spacing (in meters): [9.97857,10.0213]

Image acquisition information:
        Sensor :
        Image projection : PROJCS["WGS 84 / UTM zone 30N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32630"]]

Image default RGB composition:
        [R, G, B] = [0,1,2]

Ground control points information:
        Number of GCPs = 0
        GCPs projection =

2023-05-05 15:10:18 (INFO) TensorflowModelServe: Default RAM limit for OTB is 256 MB
2023-05-05 15:10:18 (INFO) TensorflowModelServe: GDAL maximum cache size is 1605 MB
2023-05-05 15:10:18 (INFO) TensorflowModelServe: OTB will use at most 12 threads
@caviri caviri changed the title Output with many artefacts Output with artefacts after running on checkpoint May 7, 2023
@caviri caviri changed the title Output with artefacts after running on checkpoint Output with artefacts after running on savedmodel May 7, 2023
@caviri
Copy link
Author

caviri commented May 7, 2023

Actually, it's the same issue as here: #59. I realized otbcli_BandMathX exported a float32 file. I'm running again with a tif containing integer 16 bits using:

otbcli_ConcatenateImages \
-il S2A_MSIL2A_20220222T110051_N0400_R094_T30SUF_20220222T163641.SAFE/GRANULE/L2A_T30SUF_A034840_20220222T110705/IMG_DATA/R10m/T30SUF_20220222T110051_B04_10m.jp2 \
    S2A_MSIL2A_20220222T110051_N0400_R094_T30SUF_20220222T163641.SAFE/GRANULE/L2A_T30SUF_A034840_20220222T110705/IMG_DATA/R10m/T30SUF_20220222T110051_B03_10m.jp2 \
    S2A_MSIL2A_20220222T110051_N0400_R094_T30SUF_20220222T163641.SAFE/GRANULE/L2A_T30SUF_A034840_20220222T110705/IMG_DATA/R10m/T30SUF_20220222T110051_B02_10m.jp2 \
    S2A_MSIL2A_20220222T110051_N0400_R094_T30SUF_20220222T163641.SAFE/GRANULE/L2A_T30SUF_A034840_20220222T110705/IMG_DATA/R10m/T30SUF_20220222T110051_B08_10m.jp2 \
-out T30SUF_4328.tif int16

@caviri
Copy link
Author

caviri commented May 7, 2023

Final results.

WhatsApp Image 2023-05-07 at 19 34 09

WhatsApp Image 2023-05-07 at 19 35 02

@caviri caviri closed this as completed May 7, 2023
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