Giter Club home page Giter Club logo

Comments (2)

yelantf avatar yelantf commented on May 27, 2024

To do so , you need to sample the annotations files to keep only those target categories and then generate the json files following DATA.md. And you should also rewrite the dataset class so that it will generate labels with those target classes. The related lines are as follows:

clip2ann = defaultdict(list)
if "annotations" in json_dict:
for ann in json_dict["annotations"]:
action_ids = ann["action_ids"]
one_hot = np.zeros(81, dtype=np.bool)
one_hot[action_ids] = True
packed_act = np.packbits(one_hot[1:])
clip2ann[ann["image_id"]].append(dict(bbox=ann["bbox"], packed_act=packed_act))

one_hot_label = np.unpackbits(packed_act, axis=1)

Besides, in the config file, you should set MODEL.ROI_ACTION_HEAD.NUM_CLASSES to be the number of target categories and then set the right number for MODEL.ROI_ACTION_HEAD.NUM_PERSON_MOVEMENT_CLASSE, MODEL.ROI_ACTION_HEAD.NUM_OBJECT_MANIPULATION_CLASSES, MODEL.ROI_ACTION_HEAD.NUM_PERSON_INTERACTION_CLASSES. The sum of these three kinds of categories should match with the total number specified by MODEL.ROI_ACTION_HEAD.NUM_CLASSES.

This is a little bit tricky and not supported by current codebase. But if you are familiar with PyTorch and python coding, it should not be too hard to implement it. Good luck with it.

from alphaction.

yelantf avatar yelantf commented on May 27, 2024

I believe I have answered your question, so I will close this issue now.

from alphaction.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.