Giter Club home page Giter Club logo

Comments (5)

zhangboshen avatar zhangboshen commented on July 28, 2024

Oh, I didn't have this problem. It seems like that you already successfully tested 1264 batch images.
And I double checked that HANDS17 test dataset has this "image_D00015173.png" image.
I guess your test dataset has something wrong. Did you check that this file exists in you file folder?

Hello! Your work is nice and I try to use your code to test my own pictures,but I get some problems.

I downloaded the pretrained model and try to test with hands2017.py with my own pictures(15172 pieces of pictures and their names are "image_D00000001.png, image_D00000002.png ... image_D00015172.png" ).

All pictures I put into are gray scale.

I only changed line 37 in hands2017.py, which is testingImageDir = "my own data path".

But I got the error below:

(venv) D:\Hand\A2J\src>python hands2017.py
1264it [03:38, 9.41it/s]Traceback (most recent call last):
File "hands2017.py", line 220, in
main()
File "hands2017.py", line 161, in main
for i, (img, label) in tqdm(enumerate(test_dataloaders)):
File "D:\Hand\venv\lib\site-packages\tqdm\std.py", line 1087, in iter
for obj in iterable:
File "D:\Hand\venv\lib\site-packages\torch\utils\data\dataloader.py", line 568, in next
return self._process_next_batch(batch)
File "D:\Hand\venv\lib\site-packages\torch\utils\data\dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
FileNotFoundError: Traceback (most recent call last):
File "D:\Hand\venv\lib\site-packages\torch\utils\data_utils\worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "D:\Hand\venv\lib\site-packages\torch\utils\data_utils\worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "D:\Hand\A2J\src\hands2017.py", line 133, in getitem
depth = Image.open(self.ImgDir + 'image_D%08d' % (index+1) + '.png')
File "D:\Hand\venv\lib\site-packages\PIL\Image.py", line 2766, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'D:/Hand/data/gray2/image_D00015173.png'

1264it [03:38, 5.79it/s]

Did I do anything wrong?

Oh, I didn't have this problem. It seems like that you already successfully tested 1264 batch images.
And I double checked that HANDS17 test dataset has this "image_D00015173.png" image.
I guess your test dataset has something wrong. Did you check that this file exists in you file folder?

from a2j.

anitaweng avatar anitaweng commented on July 28, 2024

Oh, I got it, it was my fault.
I used my own dataset instead of HANDS17 test dataset.
Then I will try to download HANDS17 dataset.

By the way, so can I test my own images on your testing code?
Thank you so much.

from a2j.

zhangboshen avatar zhangboshen commented on July 28, 2024

The pre-trained models we provided are dataset specific, so you can test your images with HANDS17.pth, however, due to the difference between your data and HANDS17 data, I am not sure how the model will perform.

from a2j.

sklocher avatar sklocher commented on July 28, 2024

I used my own dataset instead of HANDS17 test dataset.

Weird flex but ok.

from a2j.

anitaweng avatar anitaweng commented on July 28, 2024

The pre-trained models we provided are dataset specific, so you can test your images with HANDS17.pth, however, due to the difference between your data and HANDS17 data, I am not sure how the model will perform.

OK, thanks.

from a2j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.