voxel51 / voxelgpt

AI assistant that can query visual datasets, search the FiftyOne docs, and answer general computer vision questions
https://gpt.fiftyone.ai
Apache License 2.0
234 stars 17 forks source link

VoxelGPT is more than just a view generator! #40

Closed jacobmarks closed 1 year ago

jacobmarks commented 1 year ago

With this refactor, VoxelGPT is officially a chatbot. This PR adds chat-style responses for queries related to the FiftyOne docs, and computer vision more broadly.

How?

Notes:

Examples:

  1. computer vision: How do I train a model?

Training a model involves several steps, including data preparation, model selection, hyperparameter tuning, and evaluation. Here is a general overview of the process:

  1. Data preparation: Collect and preprocess data to ensure it is in a format that can be used for training. This may involve cleaning, normalization, and feature engineering.

  2. Model selection: Choose an appropriate model architecture based on the problem you are trying to solve. This may involve selecting from a range of pre-existing models or building a custom model.

  3. Hyperparameter tuning: Adjust the model's hyperparameters to optimize its performance. This may involve using techniques such as grid search or random search.

  4. Training: Train the model on the prepared data using an appropriate algorithm. This may involve using techniques such as stochastic gradient descent or backpropagation.

  5. Evaluation: Evaluate the model's performance on a separate test set to ensure it is generalizing well to new data.

There are many resources available to help with each of these steps, including online courses, textbooks, and research papers. It's important to keep in mind that training a model can be a complex and iterative process, and it may take several rounds of experimentation to achieve the desired results.

  1. documentation: How can I load a dataset into FiftyOne?

You can load a dataset into FiftyOne by using the from_dir() method of the Dataset class. You need to specify the directory containing the dataset, the type of the dataset being imported, and a name for the dataset. If your data is stored in one of the many common formats supported natively by FiftyOne, you can use the following simple pattern:

import fiftyone as fo

# A name for the dataset
name = "my-dataset"

# The directory containing the dataset to import
dataset_dir = "[/path/to/dataset](https://file+.vscode-resource.vscode-cdn.net/path/to/dataset)"

# The type of the dataset being imported
dataset_type = fo.types.COCODetectionDataset  # for example

dataset = fo.Dataset.from_dir(
    dataset_dir=dataset_dir,
    dataset_type=dataset_type,
    name=name,
)

If your data is in a custom format, you can write a simple loop to load your data into FiftyOne.

  1. display: Show me 10 random images from the dataset

    Identified potential view stages: sort_by(), skip(), limit(), take(), exclude() Okay, I'm going to load dataset.take(10)