That's why for example fan-made Star Wars movies are totally OK, and Disney has no issue with them, right? In such cases not even the plot is based on anything Disney "owns".
Also, it's OK to make a movie out of a plot summary someone who read some book gave you, right?
You really think such things become legal if you have some ML algos in the loop?