Comments (20)
@heilaw my images are placed where you required as follow:
but the problem dose not solved.
from cornernet.
@lufei92 I changed the annotations of the images. The annotations should be [2014 Train/Val annotations [241MB]. (http://images.cocodataset.org/annotations/annotations_trainval2014.zip)
from cornernet.
From the output you provided, some images do not exist. Can you check if trainval2014
contains images from both train2014.zip
and val2014.zip
as we use all images in train2014.zip
and 35k images in val2014.zip
for training? If this is the case, you can simply copy all images in val2014.zip
to trainval2014
and see if the code can run correctly.
from cornernet.
@scL18 @heilaw thanks very much, the problem is solved. the image of trainval2014 is not contains images of val2014
from cornernet.
@lufei92 I met the same problem. Have you solved this problem?
from cornernet.
Can you try the suggestion here?
from cornernet.
@heilaw
My environment is python 3.6.5. I also changed "batch_size : 4," , "chunk_size : [4], " . When I try to debug the code.
def random_crop(image, detections, random_scales, view_size, border=64):
view_height, view_width = view_size
image_height, image_width = image.shape[0:2]
The shape of the image can be seen. But when I try to run the code the problem shows again.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Process Process-3:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/min/freeman/CornerNet/sample/utils.py", line 58, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@lufei92
Have you solved this problem?
from cornernet.
sorry, i changed my batchsize and chunck size, but the prooblem is still appear. and i print image path, the images are read, so idon't know why occurs this problem
from cornernet.
Can you add print(image.shape)
after line 89 in `sample/coco.py', rerun the training and paste the output here? Thanks!
from cornernet.
@heilaw the follow is my result after adding print(image.shape) under line 89 in `sample/coco.py':
loading all datasets...
using 4 threads
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=14.16s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=13.84s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=13.31s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=18.50s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.41s)
creating index...
index created!
system config...
{'batch_size': 4,
'cache_dir': '/home/gosuncn/detection/CornerNet-master/cache',
'chunk_sizes': [2, 2],
'config_dir': '/home/gosuncn/detection/CornerNet-master/config',
'data_dir': '/home/gosuncn/detection/CornerNet-master/data/',
'data_rng': <mtrand.RandomState object at 0x7f4f2304c828>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 500000,
'nnet_rng': <mtrand.RandomState object at 0x7f4f2304c870>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': '/home/gosuncn/detection/CornerNet-master/data/coco/results',
'sampling_function': 'kp_detection',
'snapshot': 5000,
'snapshot_name': 'CornerNet',
'stepsize': 450000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.7,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
shuffling indices...
(426, 640, 3)
start prefetching data...
(524, 640, 3)
shuffling indices...
(427, 640, 3)
(640, 427, 3)
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
start prefetching data...
(480, 640, 3)
shuffling indices...
(581, 640, 3)
(425, 640, 3)
(357, 500, 3)
(413, 620, 3)
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-3:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
start prefetching data...
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
shuffling indices...
(428, 640, 3)
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
building model...
module_file: models.CornerNet
start prefetching data...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 50, in pin_memory
data = data_queue.get()
File "/usr/lib/python3.6/multiprocessing/queues.py", line 113, in get
return _ForkingPickler.loads(res)
File "/usr/local/lib/python3.6/dist-packages/torch/multiprocessing/reductions.py", line 151, in rebuild_storage_fd
fd = df.detach()
File "/usr/lib/python3.6/multiprocessing/resource_sharer.py", line 57, in detach
with _resource_sharer.get_connection(self._id) as conn:
File "/usr/lib/python3.6/multiprocessing/resource_sharer.py", line 87, in get_connection
c = Client(address, authkey=process.current_process().authkey)
File "/usr/lib/python3.6/multiprocessing/connection.py", line 487, in Client
c = SocketClient(address)
File "/usr/lib/python3.6/multiprocessing/connection.py", line 614, in SocketClient
s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
shuffling indices...
(375, 500, 3)
(375, 500, 3)
(640, 640, 3)
(612, 612, 3)
(480, 640, 3)
(640, 427, 3)
(427, 640, 3)
(640, 480, 3)
(480, 640, 3)
(480, 640, 3)
(427, 640, 3)
(640, 427, 3)
(404, 640, 3)
(640, 426, 3)
(427, 640, 3)
(427, 640, 3)
(332, 500, 3)
(480, 640, 3)
(480, 640, 3)
(361, 640, 3)
(375, 500, 3)
(480, 640, 3)
(600, 450, 3)
(428, 640, 3)
(375, 500, 3)
(610, 640, 3)
(375, 500, 3)
(425, 640, 3)
total parameters: 201035212
setting learning rate to: 0.00025
training start...
(612, 612, 3)
(640, 359, 3)
(640, 427, 3)
(640, 425, 3)
(359, 640, 3)
(640, 425, 3)
(480, 640, 3)
(333, 500, 3)
0%| | 0/500000 [00:00<?, ?it/s](427, 640, 3)
(427, 640, 3)
(359, 640, 3)
(341, 500, 3)
(426, 640, 3)
(427, 640, 3)
(478, 640, 3)
(640, 287, 3)
(425, 640, 3)
(612, 612, 3)
(496, 640, 3)
(480, 640, 3)
from cornernet.
The result is that.
/home/min/anaconda3/envs/CornerNet/bin/python /home/min/freeman/CornerNet/train.py CornerNet
loading all datasets...
using 4 threads
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=21.05s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=20.20s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=21.45s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=19.26s)
creating index...
index created!
loading from cache file: ./cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.58s)
creating index...
index created!
system config...
{'batch_size': 5,
'cache_dir': './cache',
'chunk_sizes': [2, 3],
'config_dir': './config',
'data_dir': './data',
'data_rng': <mtrand.RandomState object at 0x7fae02821fc0>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 50000,
'nnet_rng': <mtrand.RandomState object at 0x7fae02828048>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': './results',
'sampling_function': 'kp_detection',
'snapshot': 500,
'snapshot_name': 'CornerNet',
'stepsize': 45000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.7,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
shuffling indices...
(409, 640, 3)
start prefetching data...
(334, 500, 3)
shuffling indices...
(427, 640, 3)
(480, 640, 3)
start prefetching data...
(428, 640, 3)
shuffling indices...
Traceback (most recent call last):
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-3:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
start prefetching data...
(480, 640, 3)
shuffling indices...
(640, 425, 3)
(431, 640, 3)
start prefetching data...
building model...
module_file: models.CornerNet
shuffling indices...
(480, 640, 3)
(486, 640, 3)
(640, 480, 3)
(429, 640, 3)
(457, 640, 3)
(640, 427, 3)
Traceback (most recent call last):
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-2:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
(429, 640, 3)
Traceback (most recent call last):
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-1:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
(480, 640, 3)
(333, 500, 3)
(480, 640, 3)
(480, 640, 3)
(480, 640, 3)
(481, 640, 3)
(640, 478, 3)
(371, 640, 3)
(457, 640, 3)
(480, 640, 3)
(426, 640, 3)
(640, 384, 3)
(480, 640, 3)
(359, 640, 3)
(640, 436, 3)
(480, 272, 3)
(480, 640, 3)
Traceback (most recent call last):
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-4:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
(480, 640, 3)
(375, 500, 3)
(423, 640, 3)
(364, 500, 3)
(640, 439, 3)
(640, 446, 3)
(640, 427, 3)
(375, 500, 3)
(480, 640, 3)
(428, 640, 3)
(480, 640, 3)
(480, 640, 3)
(480, 640, 3)
(480, 640, 3)
(640, 480, 3)
(426, 640, 3)
(480, 640, 3)
(500, 333, 3)
(640, 518, 3)
(453, 640, 3)
(425, 640, 3)
(500, 375, 3)
(640, 425, 3)
(612, 612, 3)
(480, 640, 3)
total parameters: 201035212
setting learning rate to: 0.00025
training start...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 50, in pin_memory
data = data_queue.get()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/queues.py", line 113, in get
return _ForkingPickler.loads(res)
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/site-packages/torch/multiprocessing/reductions.py", line 70, in rebuild_storage_fd
fd = df.detach()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/resource_sharer.py", line 57, in detach
with _resource_sharer.get_connection(self._id) as conn:
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/resource_sharer.py", line 87, in get_connection
c = Client(address, authkey=process.current_process().authkey)
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/connection.py", line 487, in Client
c = SocketClient(address)
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/connection.py", line 614, in SocketClient
s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
(325, 500, 3)
(464, 640, 3)
(480, 640, 3)
(640, 480, 3)
(508, 640, 3)
(480, 640, 3)
(640, 480, 3)
(480, 640, 3)
(439, 640, 3)
(426, 640, 3)
(480, 640, 3)
(640, 427, 3)
(480, 640, 3)
0%| | 0/50000 [00:00<?, ?it/s](480, 640, 3)
(480, 640, 3)
(640, 424, 3)
(480, 640, 3)
(338, 450, 3)
(480, 640, 3)
(427, 640, 3)
(640, 426, 3)
(480, 640, 3)
(500, 375, 3)
(640, 480, 3)
(640, 483, 3)
0%| | 1/50000 [00:11<165:28:05, 11.91s/it]
from cornernet.
@scL18 @lufei92 Thanks for your info. From the output you provided, it seems that some of the images does not exist or cannot be read. Can you please check if all image paths are correct?
from cornernet.
Thanks for your help. The problem has been solved.
from cornernet.
@scL18 which place you have changed?
from cornernet.
@heilaw
when i directly using your pretrained model to test some pictures,I run python test.py CornerNet --testiter 500000 --split testing,then got the error:AttributeError: 'NoneType' object has no attribute 'shape',do you know how to solve it?
@lufei92 @scL18 @ywchao @anewell
from cornernet.
It seems that the code cannot read your images. You should check if the image paths are correct. (line 74 in test/coco.py
)
from cornernet.
i meet the bug:
training start...
0%| | 0/500000 [00:00<?, ?it/s]Segmentation fault
emm.... what's the meaning of Segmentation fault ???
from cornernet.
loading all datasets...
using 4 threads
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=21.07s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=15.40s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=14.72s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=16.12s)
creating index...
index created!
loading from cache file: ./cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.70s)
creating index...
index created!
system config...
{'batch_size': 49,
'cache_dir': './cache',
'chunk_sizes': [4, 5, 5, 5, 5, 5, 5, 5, 5, 5],
'config_dir': './config',
'data_dir': './data',
'data_rng': <mtrand.RandomState object at 0x7f362af22480>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 500000,
'nnet_rng': <mtrand.RandomState object at 0x7f362af224c8>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': './results',
'sampling_function': 'kp_detection',
'snapshot': 5000,
'snapshot_name': 'CornerNet',
'stepsize': 450000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.3,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
building model...
module_file: models.CornerNet
shuffling indices...
total parameters: 201035212
setting learning rate to: 0.00025
training start...
0%| | 0/500000 [00:00<?, ?it/s]THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCStorage.cu line=58 error=2 : out of memory
Traceback (most recent call last):
File "train.py", line 195, in
train(training_dbs, validation_db, args.start_iter)
File "train.py", line 137, in train
training_loss = nnet.train(**training)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 81, in train
loss = self.network(xs, ys)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/data_parallel.py", line 68, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 19, in forward
preds = self.model(*xs, **kwargs)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 31, in forward
return self.module(*xs, **kwargs)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/kp.py", line 253, in forward
return self._train(*xs, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/kp.py", line 191, in train
tl_cnv = tl_cnv(cnv)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/CornerNet.py", line 32, in forward
pool2 = self.pool2(p2_conv1)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/_cpools/init.py", line 70, in forward
return LeftPoolFunction.apply(x)
File "/home/xinyu/CornerNet-master/models/py_utils/_cpools/init.py", line 37, in forward
output = left_pool.forward(input)[0]
RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCStorage.cu:58
hi,excuse me,could you please tell me how to solve it?
from cornernet.
loading all datasets...
using 4 threads
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=21.07s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=15.40s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=14.72s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=16.12s)
creating index...
index created!
loading from cache file: ./cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.70s)
creating index...
index created!
system config...
{'batch_size': 49,
'cache_dir': './cache',
'chunk_sizes': [4, 5, 5, 5, 5, 5, 5, 5, 5, 5],
'config_dir': './config',
'data_dir': './data',
'data_rng': <mtrand.RandomState object at 0x7f362af22480>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 500000,
'nnet_rng': <mtrand.RandomState object at 0x7f362af224c8>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': './results',
'sampling_function': 'kp_detection',
'snapshot': 5000,
'snapshot_name': 'CornerNet',
'stepsize': 450000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.3,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
building model...
module_file: models.CornerNet
shuffling indices...
total parameters: 201035212
setting learning rate to: 0.00025
training start...
0%| | 0/500000 [00:00<?, ?it/s]THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCStorage.cu line=58 error=2 : out of memory
Traceback (most recent call last):
File "train.py", line 195, in
train(training_dbs, validation_db, args.start_iter)
File "train.py", line 137, in train
training_loss = nnet.train(**training)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 81, in train
loss = self.network(xs, ys)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/data_parallel.py", line 68, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 19, in forward
preds = self.model(*xs, **kwargs)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 31, in forward
return self.module(*xs, **kwargs)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/kp.py", line 253, in forward
return self._train(*xs, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/kp.py", line 191, in train tl_cnv = tl_cnv(cnv)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/CornerNet.py", line 32, in forward
pool2 = self.pool2(p2_conv1)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/_cpools/init.py", line 70, in forward
return LeftPoolFunction.apply(x)
File "/home/xinyu/CornerNet-master/models/py_utils/_cpools/init.py", line 37, in forward
output = left_pool.forward(input)[0]
RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCStorage.cu:58hi,excuse me,could you please tell me how to solve it?
I know your problem, it's your GPU insufficient operating space,you can change the chunk_sizes and batch_size in /config/CornerNet.json
from cornernet.
i meet the bug:
training start...
0%| | 0/500000 [00:00<?, ?it/s]Segmentation faultemm.... what's the meaning of Segmentation fault ???
Hi, have you solved this error? Thank you!
from cornernet.
Related Issues (20)
- Please confirm the results
- RuntimeError: CUDNN_STATUS_MAPPING_ERROR
- when I use the corner pooling with torch 1.4, I hav got the problem
- Ground Truth Heatmap
- Can someone explain why/how does y = ids/width and x=ids%width from heatmaps ?
- Some questions about testing results
- Is heatmap binary
- A about height_inds = (br_ys < tl_ys)
- Why not predict the coordinate of the center of bounding box and regress the height and width directly? HOT 1
- Some questions about python train.py CornerNet
- train it on custom dataset HOT 2
- How to convert. Pkl weight file to torch script format
- Warning when used cornerpooling in a model HOT 1
- How to compile Corner Pooling Layers on windows? HOT 1
- bug in ae_loss HOT 1
- RuntimeError: unable to write to file </torch_5845_4138295531>
- #
- [W Indexing.cu:937] Warning: masked_fill_ received a mask with dtype torch.uint8, this behavior is now deprecated,please use a mask with dtype torch.bool instead. (function masked_fill__cuda) HOT 2
- error
- cornor pool make error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cornernet.