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

bug report about CR_LoadImageList #204

Open
CatDroid opened this issue Sep 5, 2024 · 1 comment
Open

bug report about CR_LoadImageList #204

CatDroid opened this issue Sep 5, 2024 · 1 comment

Comments

@CatDroid
Copy link

CatDroid commented Sep 5, 2024

class CR_LoadImageList: 
       ....
        # Ensure start_index is within the bounds of the list
        start_index = max(0, min(start_index, len(file_list) - 1))

        # Calculate the end index based on max_rows
        end_index = min(start_index + max_images, len(file_list) - 1)
                    
        for num in range(start_index, end_index):
            img = Image.open(os.path.join(in_path, file_list[num]))
            image = img.convert("RGB")
            image_list.append(pil2tensor(image))

'range(start_index, end_index):'

this not include 'end_index' , so

' end_index = min(start_index + max_images, len(file_list) - 1) should change ' len(file_list) - 1' to ' len(file_list)' '

@CatDroid
Copy link
Author

CatDroid commented Sep 5, 2024

CR_LoadImageListPlus has the same issue.

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