List Index Out of Range
See original GitHub issueI tried two images. Both very old, one with lots of scratches, the other with some. I got List Index Out of Range
both times.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
List Index Out of Range – Python Error Message Solved
You'll get the Indexerror: list index out of range error when iterating through a list and trying to access an item that doesn't...
Read more >Python IndexError: List Index Out of Range Error Explained
In this tutorial, you'll learn how all about the Python list index out of range error, including what it is, why it occurs,...
Read more >Indexerror: list Index Out of Range in Python - STechies
“List index out of range” error occurs in Python when we try to access an undefined element from the list. The only way...
Read more >Python IndexError: List Index Out of Range [Easy Fix] - Finxter
The error “list index out of range” arises if you access invalid indices in your Python list. For example, if you try to...
Read more >Index Error: list index out of range (Python) - Stack Overflow
Generally it means that you are providing an index for which a list element does not exist. E.g, if your list was [1,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @noobyogi0010 ,
Thanks for replying. Here are the steps:
Overview
tabRun Model
tab (If you are not alraedy there)Input
sectionwith_scratch
checkboxSubmit
Upon submitting, on the right hand side of the page, you get the
Output
section, where on step/stage 4, I get the errorList index out of range
Iniput image:
Does not work “GPU -1”
python run.py --input_folder /home/alex/Bringing-Old-Photos-Back-to-Life/test_images/old_w_scratch/ --output_folder /home/alex/Bringing-Old-Photos-Back-to-Life --GPU -1 Running Stage 1: Overall restoration test.py:19: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead. def data_transforms(img, method=Image.BILINEAR, scale=False): Traceback (most recent call last): File “test.py”, line 98, in <module> model.initialize(opt) File “/home/alex/Bringing-Old-Photos-Back-to-Life/Global/models/mapping_model.py”, line 136, in initialize self.netG_A.cuda(opt.gpu_ids[0]) IndexError: list index out of range Finish Stage 1 …
Running Stage 2: Face Detection Finish Stage 2 …
Running Stage 3: Face Enhancement The main GPU is Traceback (most recent call last): File “test_face.py”, line 13, in <module> opt = TestOptions().parse() File “/home/alex/Bringing-Old-Photos-Back-to-Life/Face_Enhancement/options/base_options.py”, line 285, in parse print(opt.gpu_ids[0]) IndexError: list index out of range Finish Stage 3 …
Running Stage 4: Blending Finish Stage 4 …
All the processing is done. Please check the results.