data_set["train"]["image"].append(img)
data_set["train"]["label"].append(labels.index(direct))
Instead of
data_set["train"].add_item(n)
it solved my problem, thank you - furas, in the https://github.com/huggingface/datasets/issues/4796 they offered a solution to the problem, but in a more general way + uploading to the hub, for me the essence came down to two line
PS and without
from datasets import Image
feature = Image()
n['image'] = feature.encode_example(n['image'])