question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

evaluate the model on COCO dataset

See original GitHub issue

python test_net.py --dataset coco --net res101 --checksession 1 --checkepoch 10 --checkpoint 14657 --cuda Called with args: Namespace(cfg_file=‘cfgs/vgg16.yml’, checkepoch=10, checkpoint=14657, checksession=1, class_agnostic=False, cuda=True, dataset=‘coco’, large_scale=False, load_dir=‘/home/hs/hs/pytorch/faster-rcnn.pytorch-master/models’, mGPUs=False, net=‘res101’, parallel_type=0, set_cfgs=None, vis=False) Using config: {‘ANCHOR_RATIOS’: [0.5, 1, 2], ‘ANCHOR_SCALES’: [4, 8, 16, 32], ‘CROP_RESIZE_WITH_MAX_POOL’: False, ‘CUDA’: False, ‘DATA_DIR’: ‘/home/hs/data’, ‘DEDUP_BOXES’: 0.0625, ‘EPS’: 1e-14, ‘EXP_DIR’: ‘res101’, ‘FEAT_STRIDE’: [16], ‘GPU_ID’: 0, ‘MATLAB’: ‘matlab’, ‘MAX_NUM_GT_BOXES’: 20, ‘MOBILENET’: {‘DEPTH_MULTIPLIER’: 1.0, ‘FIXED_LAYERS’: 5, ‘REGU_DEPTH’: False, ‘WEIGHT_DECAY’: 4e-05}, ‘PIXEL_MEANS’: array([[[102.9801, 115.9465, 122.7717]]]), ‘POOLING_MODE’: ‘align’, ‘POOLING_SIZE’: 7, ‘RESNET’: {‘FIXED_BLOCKS’: 1, ‘MAX_POOL’: False}, ‘RNG_SEED’: 3, ‘ROOT_DIR’: ‘/home/hs/hs/pytorch/faster-rcnn.pytorch-master’, ‘TEST’: {‘BBOX_REG’: True, ‘HAS_RPN’: True, ‘MAX_SIZE’: 1000, ‘MODE’: ‘nms’, ‘NMS’: 0.3, ‘PROPOSAL_METHOD’: ‘gt’, ‘RPN_MIN_SIZE’: 16, ‘RPN_NMS_THRESH’: 0.7, ‘RPN_POST_NMS_TOP_N’: 300, ‘RPN_PRE_NMS_TOP_N’: 6000, ‘RPN_TOP_N’: 5000, ‘SCALES’: [600], ‘SVM’: False}, ‘TRAIN’: {‘ASPECT_GROUPING’: False, ‘BATCH_SIZE’: 128, ‘BBOX_INSIDE_WEIGHTS’: [1.0, 1.0, 1.0, 1.0], ‘BBOX_NORMALIZE_MEANS’: [0.0, 0.0, 0.0, 0.0], ‘BBOX_NORMALIZE_STDS’: [0.1, 0.1, 0.2, 0.2], ‘BBOX_NORMALIZE_TARGETS’: True, ‘BBOX_NORMALIZE_TARGETS_PRECOMPUTED’: True, ‘BBOX_REG’: True, ‘BBOX_THRESH’: 0.5, ‘BG_THRESH_HI’: 0.5, ‘BG_THRESH_LO’: 0.0, ‘BIAS_DECAY’: False, ‘BN_TRAIN’: False, ‘DISPLAY’: 20, ‘DOUBLE_BIAS’: False, ‘FG_FRACTION’: 0.25, ‘FG_THRESH’: 0.5, ‘GAMMA’: 0.1, ‘HAS_RPN’: True, ‘IMS_PER_BATCH’: 1, ‘LEARNING_RATE’: 0.001, ‘MAX_SIZE’: 1000, ‘MOMENTUM’: 0.9, ‘PROPOSAL_METHOD’: ‘gt’, ‘RPN_BATCHSIZE’: 256, ‘RPN_BBOX_INSIDE_WEIGHTS’: [1.0, 1.0, 1.0, 1.0], ‘RPN_CLOBBER_POSITIVES’: False, ‘RPN_FG_FRACTION’: 0.5, ‘RPN_MIN_SIZE’: 8, ‘RPN_NEGATIVE_OVERLAP’: 0.3, ‘RPN_NMS_THRESH’: 0.7, ‘RPN_POSITIVE_OVERLAP’: 0.7, ‘RPN_POSITIVE_WEIGHT’: -1.0, ‘RPN_POST_NMS_TOP_N’: 2000, ‘RPN_PRE_NMS_TOP_N’: 12000, ‘SCALES’: [600], ‘SNAPSHOT_ITERS’: 5000, ‘SNAPSHOT_KEPT’: 3, ‘SNAPSHOT_PREFIX’: ‘res101_faster_rcnn’, ‘STEPSIZE’: [30000], ‘SUMMARY_INTERVAL’: 180, ‘TRIM_HEIGHT’: 600, ‘TRIM_WIDTH’: 600, ‘TRUNCATED’: False, ‘USE_ALL_GT’: True, ‘USE_FLIPPED’: True, ‘USE_GT’: False, ‘WEIGHT_DECAY’: 0.0001}, ‘USE_GPU_NMS’: True} loading annotations into memory… Done (t=0.33s) creating index… index created! Loaded dataset coco_2014_minival for training Set proposal method: gt Preparing training data… coco_2014_minival gt roidb loaded from /home/hs/data/cache/coco_2014_minival_gt_roidb.pkl done loading annotations into memory… Done (t=0.46s) creating index… index created! 5000 roidb entries load checkpoint /home/hs/hs/pytorch/faster-rcnn.pytorch-master/models/res101/coco/faster_rcnn_1_10_14657.pth load model successfully! /home/hs/hs/pytorch/faster-rcnn.pytorch-master/lib/model/rpn/rpn.py:68: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument. rpn_cls_prob_reshape = F.softmax(rpn_cls_score_reshape) /home/hs/hs/pytorch/faster-rcnn.pytorch-master/lib/model/faster_rcnn/faster_rcnn.py:99: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument. cls_prob = F.softmax(cls_score) Evaluating detections0.115s 0.044s
Collecting person results (1/80) Collecting bicycle results (2/80) Collecting car results (3/80) Collecting motorcycle results (4/80) Collecting airplane results (5/80) Collecting bus results (6/80) Collecting train results (7/80) Collecting truck results (8/80) Collecting boat results (9/80) Collecting traffic light results (10/80) Collecting fire hydrant results (11/80) Collecting stop sign results (12/80) Collecting parking meter results (13/80) Collecting bench results (14/80) Collecting bird results (15/80) Collecting cat results (16/80) Collecting dog results (17/80) Collecting horse results (18/80) Collecting sheep results (19/80) Collecting cow results (20/80) Collecting elephant results (21/80) Collecting bear results (22/80) Collecting zebra results (23/80) Collecting giraffe results (24/80) Collecting backpack results (25/80) Collecting umbrella results (26/80) Collecting handbag results (27/80) Collecting tie results (28/80) Collecting suitcase results (29/80) Collecting frisbee results (30/80) Collecting skis results (31/80) Collecting snowboard results (32/80) Collecting sports ball results (33/80) Collecting kite results (34/80) Collecting baseball bat results (35/80) Collecting baseball glove results (36/80) Collecting skateboard results (37/80) Collecting surfboard results (38/80) Collecting tennis racket results (39/80) Collecting bottle results (40/80) Collecting wine glass results (41/80) Collecting cup results (42/80) Collecting fork results (43/80) Collecting knife results (44/80) Collecting spoon results (45/80) Collecting bowl results (46/80) Collecting banana results (47/80) Collecting apple results (48/80) Collecting sandwich results (49/80) Collecting orange results (50/80) Collecting broccoli results (51/80) Collecting carrot results (52/80) Collecting hot dog results (53/80) Collecting pizza results (54/80) Collecting donut results (55/80) Collecting cake results (56/80) Collecting chair results (57/80) Collecting couch results (58/80) Collecting potted plant results (59/80) Collecting bed results (60/80) Collecting dining table results (61/80) Collecting toilet results (62/80) Collecting tv results (63/80) Collecting laptop results (64/80) Collecting mouse results (65/80) Collecting remote results (66/80) Collecting keyboard results (67/80) Collecting cell phone results (68/80) Collecting microwave results (69/80) Collecting oven results (70/80) Collecting toaster results (71/80) Collecting sink results (72/80) Collecting refrigerator results (73/80) Collecting book results (74/80) Collecting clock results (75/80) Collecting vase results (76/80) Collecting scissors results (77/80) Collecting teddy bear results (78/80) Collecting hair drier results (79/80) Collecting toothbrush results (80/80) Writing results json to /home/hs/hs/pytorch/faster-rcnn.pytorch-master/output/res101/coco_2014_minival/faster_rcnn_10/detections_minival2014_results.json Loading and preparing results…
DONE (t=2.79s) creating index… index created! Running per image evaluation…
DONE (t=35.32s). Accumulating evaluation results…
Traceback (most recent call last): File “test_net.py”, line 324, in <module> imdb.evaluate_detections(all_boxes, output_dir) File “/home/hs/hs/pytorch/faster-rcnn.pytorch-master/lib/datasets/coco.py”, line 314, in evaluate_detections self._do_detection_eval(res_file, output_dir) File “/home/hs/hs/pytorch/faster-rcnn.pytorch-master/lib/datasets/coco.py”, line 260, in _do_detection_eval coco_eval.accumulate() File “/home/hs/hs/pytorch/faster-rcnn.pytorch-master/lib/pycocotools/cocoeval.py”, line 327, in accumulate if len(E) == 0: TypeError: object of type ‘filter’ has no len()

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
AndOneDaycommented, Oct 24, 2018

您好,我用您通过coco训练好的模型来评估,总是报这个错误,但是我不知道该怎么解决,麻烦您有时间解答一下,非常感激

if you use python3, you can change code E = filter(None, E) to E = list(filter(None, E)) in cocoeval.py

0reactions
237014845commented, Oct 24, 2018

@AndOneDay Thank you for your reply!

Read more comments on GitHub >

github_iconTop Results From Across the Web

COCO dataset
FiftyOne is an open-source tool facilitating visualization and access to COCO data resources and serves as an evaluation tool for model analysis on...
Read more >
The COCO Dataset: Best Practices for Downloading ...
Evaluating models ​​ The COCO API has been widely adopted as the standard metric for evaluating object detections. The COCO average precision is ......
Read more >
How to work with object detection datasets in COCO format
A comprehensive guide to defining, loading, exploring, and evaluating object detection datasets in COCO format using FiftyOne.
Read more >
70-Page Report on the COCO Dataset and Object Detection ...
It facilitates visualization and access to COCO data resources and serves as an evaluation tool for model analysis on COCO. Here's the official ......
Read more >
An Introduction to the COCO Dataset - Roboflow Blog
The COCO dataset provides a benchmark for evaluating the periodic improvement of these models through computer vision research.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found