-
Notifications
You must be signed in to change notification settings - Fork 50
Getting Started
This page provides a quick example to get started with two scenarios: Working with already extracted features, and working with a small multimedia collection. Both scenarios assume that you either have a jar or have executed the setup as described on the Environment Setup page.
To extract features from data, you need a cineast config file and an extraction job config file that describes the location of your data and which features to extract. The basic structure of an extraction job config file is described on the Extraction Configuration page.
The following instructions assume that you are executing the commands from inside the Cineast API CLI started with the cineast config file as the only argument e.g. java -jar path/to/cineast_api.jar cineast.json
. If you are using the Standalone version of Cineast, you can perform the same commands by appending them to java -jar path/to/cineast_standalone.jar cineast.json
.
In the most simple use case, features are extracted directly into a running Cottontail DB instance. The instructions to set up and run Cottontail DB can be found on its GitHub page.
- Set up the database schema for the extracted features:
setup --extraction extraction_config.json
If the database already contains existing data or a schema you would like to remove, additionally append the option --clean
.
2. Run the data extraction:
extract --extraction extraction_config.json
- Post-process features in Cottontail DB (this step is necessary to allow the retrieval of features through Cineast):
optimize
Sometimes you may want to extract features to an intermediary file format (e.g. JSON, PROTO, etc.) before importing them into a database. To do this, adjust the extraction job config file accordingly and run just the extraction command:
extract --extraction extraction_config.json
To import previously extracted features in a supported intermediary file format (in this example JSON) into a running Cottontail DB instance use the following commands:
- Set up the database schema if it isn't already:
setup --extraction extraction_config.json
- Import features:
import --type json --input path/to/extracted/features
- Post-process features in Cottontail DB:
optimize
This scenario assumes the following:
- You have a running Cottontail DB instance with a
cottontaildb-data/
folder containing cineast data (segments, objects, metadata, feature data)
Generate the api jar using gradlew cineast-api:fatJar
. You can then start cineast using a config file with java -jar cineast-api/build/libs/cineast-api-2.5-full.jar cineast.json
Starting the API is done via the org.vitrivr.cineast.api.Main
class, which takes one argument: the config file (e.g. cineast.json
). Depending on the configuration, this launches the WS / Rest / Proto Endpoints.
Make sure that the retriever
modules are consistent with those in your cottontail instance.
The Cineast CLI provides a bunch of utilities for developing. Please check out org.vitrivr.cineast.standalone.cli.CineastCli
for a complete overview. We just provide an example here.
Run org.vitrivr.cineast.standalone.Main
with the arguments cineast.json help
to see a complete list.
To retrieve all metadata and features of a segment, use the org.vitrivr.cineast.standalone.Main
class with the arguments cineast.json retrieve-single --segmentid v_02497_13
, where the first argument is the config, the second the command and the third one provides the segmentid you want to know more about.
To actually search your collection, check out for example vitrivr-ng as a frontend for cineast
- Home
- Setup
- Environment Setup
- Getting Started
- Optional: Retrieval Setup Guide
- Research: Working with Existing Data
- Working with Multimedia Data
- Advanced
- API Documentation
- CLI