L4A S4CCrop Type Step error

Dear Sen4CAP team,

We have run into a problem with the execution of L4A processor. The process finishes without any error codes, however, the resulting shapefile table has no data for the classification results.

When inspecting the error outputs for each of the steps in the GUI, the step S4CCrop Type actually seems to have an issue that causes the execution to halt. I have attached the error log. Let me know if you need any additional info. Thank you in advance!

Best,
Harijs

S4CCrop_Type_log.txt (3.0 KB)

Hello Sen4CAP community,

For information, we have ran into a similar issue with the L4A processor using both our own data and the sample data set from Netherlands. We are currently looking into the issue with the Sen4CAP team.

Best regards,
Sakari

1 Like

Dear Harijs and Sakari,

It seems to me (and maybe @cudroiu will confirm it) that the problems concern the extraction of the S1 features only. Maybe something to begin with could be to try a crop type with S2 features only (s2-only mode in the advanced parameters of the custom jobs tab). Can you try this?

On top of that, as explained by email to Sakari, another way to spot possible problems is to launch the crop type command manually from the linux console. In this way, during/after the process, you have access to the intermediate results (like the S2 and S1 features that are extracted by parcel) and you can potentially detect the problem. To do this, you can:

  • Copy the command of the S4CCropType step corresponding to your L4A job (in monitoring tab)
  • Change the working and output directories by a directory that you have created and that you can access
  • The command should be somthing like this:
    crop-type-wrapper.py -s 2 --season-start 2020-01-01 --season-end 2020-08-30 --working-path /mnt/archive/test/ --out-path /mnt/archive/test/ --tiles 32UQA 32UQV 33UUQ 33UUR 33UVQ 33UVR 33UVS 33UWQ 33UWR 33UWS 33UXQ 33UXR 33UYQ 33UYR 34UCA --lc 1234 --min-s2-pix 3 --min-s1-pix 1 --best-s2-pix 10 --pa-min 30 --pa-train-h 4000 --pa-train-l 1333 --sample-ratio-h 0.25 --sample-ratio-l 0.75 --smote-target 1000 --smote-k 5 --num-trees 300 --min-node-size 10 --mode both

But maybe @cudroiu will understand more directly the error log that you shared.

Best regards,

Philippe

Dear Harijsi,

From what I see in your log, seems that your RAM memory was full when you tried to execute the L4A and you got an OutOfMemory error. I assume that you did not configured a swap on your system and when you tried to execute, some S1 -pre-processing jobs were also running (please note that these are big RAM memory consumers).
I am not sure how much memory you have on your machine but you might want to try:

  • add a swap/increase the swap on your linux machine.
  • Stop the sen4cap services if you try executing an L4A CropType processor (restart them when L4A is finished).

Hope this helps.

Best regards,
Cosmin

Hello @cudroiu and @Philippe_Malcorps,

Thank you for your suggestions and help so far!
To answer your suggestion, Philippe, I tried setting the S2-only mode for the processor in the GUI, but that resulted in an error as well. (error text from GUI is attached - S4CCropType_error_S2_only_GUI.txt (1.6 KB) )

I tried the manual input as well, and it seems that indeed the issue is with S1 feature extraction, because both sar-features.csv and sar-temporal.csv are empty.

Cosmin, our system has 32GB swap space, so it does not appear to be an issue. I stopped all S1 processing and tried to initiate L4A through the console - with the same results.

I have added a full console log for the time when this process was running. There still is the OutOfMemory error, but do you think 32GB swap on top of 32GB RAM with no parallel processing is not enough for such a small area? (two S-2 tiles)

S4CCropType_error_both_full_log.txt (84.7 KB)

Best regards,
Harijs

Dear @cudroiu and @Philippe_Malcorps,

Just checking back to see whether any solutions or causing factors have been found for this issue? The feature extraction aspect of this system is probably the most important aspect for us, so we are very interested in getting it to work properly. Let me know if you need any additional information.

Best regards,
Harijs

Hello Harijs,

For the out of memory problem, I cannot really help. Maybe @cudroiu ?

But for the test with s2-only, I can help :). I don’t know if you did it already, but we had to modify the crop_type.R script which comes at the end of the crop type process, because of problems encountered using the updated packages. A new crop_type.R script is available here : No predicted classes created in L4A processor, last post.

Can you replace the old /usr/bin/crop_type.R by this one?
Then, can you retry to launch the L4A process with s2-only?

Sorry for the inconvenience.

Philippe