I'm trying to run demo.py but "ValueError: num_samples should be a positive integer value, but got num_samples=0"
Any solution :(
(DB) C:\AIP391\DB>python demo.py experiments/seg_detector/totaltext_resnet18_deform_thre.yaml --image_path datasets/img651.jpg --resume models/totaltext_resnet18 --polygon --box_thresh 0.7 --visualize
verbose: True
Initializing log dir for workspace\SegDetectorModel-seg_detector\deformable_resnet18\L1BalanceCELoss
Traceback (most recent call last):
File "demo.py", line 148, in
main()
File "demo.py", line 41, in main
experiment = Configurable.construct_class_from_config(experiment_args)
File "C:\AIP391\DB\concern\config.py", line 130, in construct_class_from_config
return cls(args)
File "C:\AIP391\DB\experiment.py", line 96, in init
self.load_all(kwargs)
File "C:\AIP391\DB\concern\config.py", line 143, in load_all
self.load(name, kwargs)
File "C:\AIP391\DB\concern\config.py", line 151, in load
(kwargs[state_name], cmd)))
File "C:\AIP391\DB\concern\config.py", line 164, in create_member_from_config
return cls(args, cmd=cmd)
File "C:\AIP391\DB\experiment.py", line 37, in init
self.load_all(kwargs)
File "C:\AIP391\DB\concern\config.py", line 143, in load_all
self.load(name, kwargs)
File "C:\AIP391\DB\concern\config.py", line 151, in load
(kwargs[state_name], cmd)))
File "C:\AIP391\DB\concern\config.py", line 164, in create_member_from_config
return cls(**args, cmd=cmd)
File "C:\AIP391\DB\data\data_loader.py", line 57, in init
worker_init_fn=default_worker_init_fn)
File "C:\Users\lam19\anaconda3\envs\DB\lib\site-packages\torch\utils\data\dataloader.py", line 262, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore
File "C:\Users\lam19\anaconda3\envs\DB\lib\site-packages\torch\utils\data\sampler.py", line 104, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0
I'm trying to run demo.py but "ValueError: num_samples should be a positive integer value, but got num_samples=0" Any solution :(
(DB) C:\AIP391\DB>python demo.py experiments/seg_detector/totaltext_resnet18_deform_thre.yaml --image_path datasets/img651.jpg --resume models/totaltext_resnet18 --polygon --box_thresh 0.7 --visualize verbose: True Initializing log dir for workspace\SegDetectorModel-seg_detector\deformable_resnet18\L1BalanceCELoss Traceback (most recent call last): File "demo.py", line 148, in
main()
File "demo.py", line 41, in main
experiment = Configurable.construct_class_from_config(experiment_args)
File "C:\AIP391\DB\concern\config.py", line 130, in construct_class_from_config
return cls(args)
File "C:\AIP391\DB\experiment.py", line 96, in init
self.load_all(kwargs)
File "C:\AIP391\DB\concern\config.py", line 143, in load_all
self.load(name, kwargs)
File "C:\AIP391\DB\concern\config.py", line 151, in load
(kwargs[state_name], cmd)))
File "C:\AIP391\DB\concern\config.py", line 164, in create_member_from_config
return cls(args, cmd=cmd)
File "C:\AIP391\DB\experiment.py", line 37, in init
self.load_all(kwargs)
File "C:\AIP391\DB\concern\config.py", line 143, in load_all
self.load(name, kwargs)
File "C:\AIP391\DB\concern\config.py", line 151, in load
(kwargs[state_name], cmd)))
File "C:\AIP391\DB\concern\config.py", line 164, in create_member_from_config
return cls(**args, cmd=cmd)
File "C:\AIP391\DB\data\data_loader.py", line 57, in init
worker_init_fn=default_worker_init_fn)
File "C:\Users\lam19\anaconda3\envs\DB\lib\site-packages\torch\utils\data\dataloader.py", line 262, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore
File "C:\Users\lam19\anaconda3\envs\DB\lib\site-packages\torch\utils\data\sampler.py", line 104, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0