Code Monkey home page Code Monkey logo

Comments (8)

mohitzsh avatar mohitzsh commented on August 17, 2024

This is just an identifier I used to keep track of experiments. Any value should work.

from adversarial-semisupervised-semantic-segmentation.

manbp avatar manbp commented on August 17, 2024

Thank you so much for the reply. One more question I want to ask. In the dataset directory If i provide only the .jpg file of PASCAL VOC 2012 data, will it work? Actually I am getting an error like this:

Traceback (most recent call last):
File "C:/Users/hp/PycharmProjects/new_for_3.5/Adversarial-Semisupervised-Semantic-Segmentation-master/Adversarial-Semisupervised-Semantic-Segmentation-master/train.py", line 515, in
main()
File "C:/Users/hp/PycharmProjects/new_for_3.5/Adversarial-Semisupervised-Semantic-Segmentation-master/Adversarial-Semisupervised-Semantic-Segmentation-master/train.py", line 452, in main
trainloader_u=DataLoader(trainset_u,batch_size=args.batch_size,shuffle=True,num_workers=2,drop_last=True)
File "C:\Users\hp\Anaconda3\envs\new_for_3.5\lib\site-packages\torch\utils\data\dataloader.py", line 802, in init
sampler = RandomSampler(dataset)
File "C:\Users\hp\Anaconda3\envs\new_for_3.5\lib\site-packages\torch\utils\data\sampler.py", line 64, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integeral value, but got num_samples=0

Please help me regarding this.

from adversarial-semisupervised-semantic-segmentation.

mohitzsh avatar mohitzsh commented on August 17, 2024

Using .jpg files should work (look at https://github.com/ms-sharma/Adversarial-Semisupervised-Semantic-Segmentation/blob/master/datasets/pascalvoc.py#L52 for image loading).

Try to check if the dataset is being loaded correctly. I'll start by looking at https://github.com/ms-sharma/Adversarial-Semisupervised-Semantic-Segmentation/blob/master/train.py#L448.

from adversarial-semisupervised-semantic-segmentation.

manbp avatar manbp commented on August 17, 2024

I have dataset folder as shown in the screenshot https://gofile.io/?c=0WIEc5 . I need to provide the directories containing img (Images) and cls (GT Segmentation) folder to the code. So I tried the following code line:

 parser.add_argument("--dataset_dir", default='C:\Users\hp\Desktop\VOCtrainval_11-May-2012\VOCdevkit\VOC2012\JPEGImages', type=str,
                        help="A directory containing img (Images) and cls (GT Segmentation) folder")

But it showing the error as mentioned earlier.
Please help.

from adversarial-semisupervised-semantic-segmentation.

mohitzsh avatar mohitzsh commented on August 17, 2024

--dataset_dir should have two folders, img and cls, with Image files and Segmentation files respectively.

from adversarial-semisupervised-semantic-segmentation.

manbp avatar manbp commented on August 17, 2024

I have modified the dataset folder . Now it contains only two folders, img and cls, with Image files and Segmentation files respectively as shown in the screenshot https://gofile.io/?c=7ROT5T. And tried the following code:

parser.add_argument("--dataset_dir", default='C:/Users/hp/Desktop/VOCtrainval_11-May-2012/VOCdevkit/VOC2012', help="A directory containing img (Images) and cls (GT Segmentation) folder")

but I am getting the same error. Please help.

from adversarial-semisupervised-semantic-segmentation.

mohitzsh avatar mohitzsh commented on August 17, 2024

I won't be able to offer more help than this without having access to debug code at your end.

I would suggest that you understand how the data loading works in the code and see what is going wrong. As I mentioned before, this is handled in the PascalVOC class located here- https://github.com/ms-sharma/Adversarial-Semisupervised-Semantic-Segmentation/blob/master/datasets/pascalvoc.py.

from adversarial-semisupervised-semantic-segmentation.

mohitzsh avatar mohitzsh commented on August 17, 2024

I am closing this issue for now.

from adversarial-semisupervised-semantic-segmentation.

Related Issues (6)

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.