Trying to segment a jpg image using a model trained on Nifti files

Hi…
I am a beginner in medical programming…but I try hard to finish this project
I used this model from Kaggle to build a model to segment liver tumors: liver segmentation with MONAI | Kaggle
here they deal with task 3 from the MSD dataset, which contains Nifti files

the code has some issues, like the class Toliver
but I said that I will deal with it later

Now…
I have 3 folders containing JPG images for the liver…each folder is class. For example, the first is normal, the second is benign, and the third is malignant.

I want to use the model to segment these JPG images, which I did (but I got an error :ValueError: Sequence must have length 2, got 3.):

Note (I am working on two images only to make it easy for me to track the errors)

here, I tested the output and got this :

from where the ‘foreground_start_coord’ is and how I can fix my program …pls help me