Comments (8)
Ahhh my bad, I wrote the wrong command. Here's the correct one:
python eval.py --trained_model=weights/yolact_base_54_800000.pth --output_coco_json
python run_coco_eval.py
So sorry about that!
from yolact.
COCOEval doesn't evaluate images without ground truth annotations:
https://github.com/cocodataset/cocoapi/blob/aca78bcd6b4345d25405a64fdba1120dfa5da1ab/PythonAPI/pycocotools/cocoeval.py#L247
so we don't either.
I'm pretty sure those 48 images don't have annotations, because I turned off our check for no annotations and it went up to 5000. I then submitted the results for that new 5000 image set to COCOEval and got the same mAP as when submitting the 4952 image set. To turn that check off for yourself, grab my latest commit and add the 'has_gt': False
parameter to coco2017_dataset
toward the top of data/config.py
. Note that this will stop you from being able to use my eval implementation so you'll have to use COCOEval, so run these commands (note that coco2017_dataset
is the default so you don't have to specify):
python eval.py --trained_model=weights/yolact_base_54_800000.pth
python run_coco_eval.py
You should see 5000 images for eval.py
, but run_coco_eval.py
should give you the same 29.9 mask mAP.
from yolact.
Hi @dbolya thanks for your response.
I did what you recommended and added the 'has_gt': False in data/config.py to your last commit but I get this error:
python eval.py --trained_model=weights/yolact_base_54_800000.pth
Config not specified. Parsed yolact_base_config from the file name.
loading annotations into memory...
Done (t=0.83s)
creating index...
index created!
Loading model... Done.
Traceback (most recent call last):
File "eval.py", line 937, in <module>
evaluate(net, dataset)
File "eval.py", line 790, in evaluate
prep_metrics(ap_data, preds, img, gt, gt_masks, h, w, num_crowd, dataset.ids[image_idx], detections)
File "eval.py", line 336, in prep_metrics
gt_boxes = torch.Tensor(gt[:, :4])
TypeError: 'NoneType' object is not subscriptable
from yolact.
Thanks a lot for your help! It works now
from yolact.
i run "python eval.py --trained_model=weights/yolact_base_xxxxxx.pth " of mydataset and then
python run_coco_eval.py "
but got error " if g['ignore'] or (g['area']<aRng[0] or g['area']>aRng[1]):
KeyError: 'area'" when excuting run_coco_eval.py . Moreever g['_ignore'] is not exist .
it seems that the format of box_json and mask_json file are no supported by cocoeval.py ?
from yolact.
'area'
is supposed to be in the gt annotation. First check if you have those in your dataset's annotation. Then if you're running this on your own dataset, the proper set of commands are:
python eval.py --trained_model=weights/yolact_base_xxxxxx.pth --output_coco_json --dataset=<your_dataset>
python run_coco_eval.py --gt_ann_file=<path/to/your/dataset/validation/annotation/json>
from yolact.
thx , i know the commands for personal dataset. I wonder if "ignore" or" _ignore" is supposed to be in the gt annotation. i've checked the "instances_val2017.json" file , but find neither "ignore" nor" _ignore"
from yolact.
"ignore" is something that the cocoeval script adds to the dictionary later. It's to keep track of which annotations it's already assigned to a detection. You don't need to include it in your annotations file.
From the error message though it seems like one of your annotations doesn't have an 'area'
field, so make sure they all have that.
from yolact.
Related Issues (20)
- Hyperparameter tuning
- AP输出
- Loss curve
- Just wonder how this project make the results sync while using thread pool
- How to change the network
- How to draw a specific shape on the screen while recognizing a specific object?
- epoch
- How to pick the best epoch? HOT 1
- KeyError 2156740059
- small-, medium-, large-mAP definition?
- Question on DCN implementation
- mAP and AR: definition of small medium large ? HOT 2
- Handling negative images or images with no object of interest
- After entering the verification command, do not display the verified image
- After entering the verification command, do not display the verified image
- I get Illegal instruction (core dumped)
- "mtrand.pyx", line 936, in numpy.random.mtrand.RandomState.choice HOT 2
- How to get the coordinates and polygon information of evaluation results
- Post processing process issues
- There is a bug when I want to do test with yolact. HOT 1
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 yolact.