Hi
while i ran demo successfully for the images provided in code, when i gave my own back ground image ( .png file 640x480), i got error
Number of background images : 1
[('demo_data_dir/distractor_objects_dir/nature_valley\NP1_234.jpg', None), ('demo_data_dir/distractor_objects_dir/nature_valley\NP2_123.jpg', None)] [('demo_data_dir/distractor_objects_dir/nature_valley\NP2_123.jpg', None), ('demo_data_dir/distractor_objects_dir/nature_valley\NP1_234.jpg', None)]
[('demo_data_dir/distractor_objects_dir/nature_valley\NP2_123.jpg', None), ('demo_data_dir/distractor_objects_dir/nature_valley\NP1_234.jpg', None)] [('demo_data_dir/distractor_objects_dir/nature_valley\NP2_123.jpg', None), ('demo_data_dir/distractor_objects_dir/nature_valley\NP1_234.jpg', None)]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\Microwave Lab.conda\envs\py38\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "C:\Users\Microwave Lab.conda\envs\py38\lib\multiprocessing\pool.py", line 48, in mapstar
return list(map(*args))
File "D:\JCodeExp\cutpaste\syndata-generation-master\datasetgenerator2.py", line 260, in create_image_anno_wrapper
return create_image_anno(*args, w=w, h=h, scale_augment=scale_augment, rotation_augment=rotation_augment,
File "D:\JCodeExp\cutpaste\syndata-generation-master\datasetgenerator2.py", line 360, in create_image_anno
img_target = PIL2array3C(backgrounds[i])
File "D:\JCodeExp\cutpaste\syndata-generation-master\datasetgenerator2.py", line 252, in PIL2array3C
return np.array(img.getdata(),
ValueError: cannot reshape array of size 1228800 into shape (480,640,3)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "datasetgenerator2.py", line 538, in
generate_synthetic_dataset(args)
File "datasetgenerator2.py", line 506, in generate_synthetic_dataset
syn_img_files, anno_files = gen_syn_data(img_files, labels, img_dir, anno_dir, args.scale, args.rotation,
File "datasetgenerator2.py", line 468, in gen_syn_data
p.map(partial_func, params_list)
File "C:\Users\Microwave Lab.conda\envs\py38\lib\multiprocessing\pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "C:\Users\Microwave Lab.conda\envs\py38\lib\multiprocessing\pool.py", line 771, in get
raise self._value
ValueError: cannot reshape array of size 1228800 into shape (480,640,3)
Working on output_dir\images\1_none.jpg
Working on output_dir\images\2_none.jpg
(py38)
i got no output images
while i tried with different backgrounds (even with the plain ones like a white background) i got same error.
i read the paper thoroughly but i could not find anywhere if this code only applied to 3d scene generation or it can work for 2D images (normal images) ?