Coder Social home page Coder Social logo

Comments (8)

wondervictor avatar wondervictor commented on June 11, 2024 3

Hi @myhz0606, thanks for your interest in YOLO-World!
Extracting nouns is easy in our work, we simply adopt the NLTK package to do it as follows:

import string
import nltk
from nltk import word_tokenize, pos_tag


nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')


def extract_noun_phrases(text):
    
    tokens = word_tokenize(text)
    tokens = [token for token in tokens if token not in string.punctuation]
    tagged = pos_tag(tokens)
    print(tagged)
    grammar = 'NP: {<DT>?<JJ.*>*<NN.*>+}'
    cp = nltk.RegexpParser(grammar)
    result = cp.parse(tagged)
    
    noun_phrases = []
    for subtree in result.subtrees():
        if subtree.label() == 'NP':
            noun_phrases.append(' '.join(t[0] for t in subtree.leaves()))
    
    return noun_phrases

from yolo-world.

wondervictor avatar wondervictor commented on June 11, 2024 1

Hi @lxfater, generally, this will not have an impact, unless there are some similar categories or hard-to-distinguish categories among the 5000 words.

from yolo-world.

lxfater avatar lxfater commented on June 11, 2024

If I have to input a large number of detection categories (1000), will this affect performance? @wondervictor

from yolo-world.

wondervictor avatar wondervictor commented on June 11, 2024

Hi @lxfater, it will not affect and YOLO-World is born for custom vocabularies without re-training.

from yolo-world.

lxfater avatar lxfater commented on June 11, 2024

If I feed 5,000 words into the model as categories and ask it to recognize any image, does that cause a performance problem compared to feed the categories that only appear in the image? I'm a novice in this field @wondervictor

from yolo-world.

wondervictor avatar wondervictor commented on June 11, 2024

Thanks for your interest. If you have any questions about YOLO-World in the future, you're welcome to open a new issue.

from yolo-world.

tuotalimiaomiao avatar tuotalimiaomiao commented on June 11, 2024

Can yolo world train its own dataset from scratch in the industrial domain?

from yolo-world.

wondervictor avatar wondervictor commented on June 11, 2024

Hi @tuotalimiaomiao, sure. But I strongly suggest you use the pre-trained weights to initialize, which is very useful.

from yolo-world.

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.