Skip to content

Added evaluation code for VOC Pascal dataset #1216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Added evaluation code for VOC Pascal dataset #1216

wants to merge 2 commits into from

Conversation

lpuglia
Copy link

@lpuglia lpuglia commented Aug 8, 2019

With the following PR it is possible to train FasterRCNN network using VOC dataset.
It was tested on fasterrcnn_resnet50_fpn and got over 70% mAp in 10 epochs.

python train.py --dataset voc --epochs 15 --lr-steps 10 -b 4 --lr 0.04 --model fasterrcnn_resnet50_fpn --data-path /data/set/

notes:

  • I'm pretty sure that the two eval method can easily be merged in a single one but I have no experience with the DistributedDataParallel module so i left it as it is
  • The eval code for VOC is file based, probably it is not the best idea to store the results in /tmp/ but it works
  • In ConvertVOCtoCOCO the name of the file is converted from string to array of int8, this is not as clean as parsing the actual image number, but it generalize better if used on other dataset that have more complex indexing system (e.g. WIDER FACE)
  • If you note useless code it may be because i have more advanced features in my repo that I didn't include in the PR

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR @lpuglia !

I don't have much time to review it now. I'm going on holidays now for a couple of weeks, back on Aug 25th), but I think there are a few things that can be improved (i.e., avoid having a duplicate voc_evaluate). I'll give more detailed comments once I'm back from holidays!

@fmassa fmassa self-requested a review August 12, 2019 19:22
@akshitac8
Copy link

akshitac8 commented Aug 11, 2021

@fmassa are the changes proposed by @lpuglia are good to use for VOC evaluation?

@pmeier pmeier self-assigned this Apr 8, 2022
@yassineAlouini
Copy link
Contributor

Hello @lpuglia and sorry for the taking that long for an update.

As far as my understanding goes, it seems that in general, the references folder contains few reference scripts to train
various categories of computer vision models. I am not sure what is the strategy for the object detection subfolder (or other subfolders): is it planned to add more datasets and more training recipes or keep it "as is" for now and maybe link to external resources that provide other recipes. @pmeier has more details to share most likely.

In the meantime, there is a new datasets API being designed and since you use an existing dataset (namely VOCDetection),
I would like to share some details:

  • the main strategy is to pause development while the new API is being finished
  • otherwise, you can port the dataset to the new API and then use it in your proposed PR. Of course, someone else can do the migration first in another PR.

That being said, before embarking on this development, let's first check if this feature is still needed. Have you used this branch in some work or do you use another project to do this VOC Pascal evaluation? Or maybe another alternative?

Please share if this feature is still relevant @lpuglia. Many thanks in advance and sorry again for the delay.

@pmeier
Copy link
Collaborator

pmeier commented May 17, 2022

@yassineAlouini This PR does not add a new dataset. The VOC detection dataset is supported in the old

class VOCDetection(_VOCBase):

as well as the new API:

This PR adds support for this dataset in the reference training scripts, which only supports COCO

paths = {"coco": (data_path, get_coco, 91), "coco_kp": (data_path, get_coco_kp, 2)}

@lpuglia As @yassineAlouini mentioned, we are currently redesigning the datasets as well as the transforms. This in turn means that we also will adapting the reference scripts quite a bit and it should be easier to add new datasets.

IIUC, the major part of this contribution is to implement the evaluation method used for VOC. There shouldn't be much changes there, so we can port easily.

That being said, we are trying to close stale PRs. I would open an issue linking this PR so we don't forget (again) about this and close the PR for now. How does that sound?

@lpuglia
Copy link
Author

lpuglia commented May 17, 2022

I'm ok to close this, the feature is not needed anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants