Skip to content

Commit

Permalink
renamed dummy analyzers for migration
Browse files Browse the repository at this point in the history
  • Loading branch information
faberf committed Dec 1, 2023
1 parent 40f76b3 commit 4a26832
Show file tree
Hide file tree
Showing 27 changed files with 430 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class DummyStringAnalyzer : Analyser<ContentElement<*>, StringDescriptor> {
class AudioTranscription : Analyser<ContentElement<*>, StringDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = StringDescriptor::class
override fun prototype() = StringDescriptor(id= UUID.randomUUID(), retrievableId = UUID.randomUUID(), transient = true, value = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy192FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class AverageColorGrid8 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(192) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.vitrivr.engine.base.features.migration

import org.vitrivr.engine.core.context.IndexContext
import org.vitrivr.engine.core.context.QueryContext
import org.vitrivr.engine.core.model.content.element.ContentElement
import org.vitrivr.engine.core.model.descriptor.vector.FloatVectorDescriptor
import org.vitrivr.engine.core.model.metamodel.Analyser
import org.vitrivr.engine.core.model.metamodel.Schema
import org.vitrivr.engine.core.model.retrievable.Retrievable
import org.vitrivr.engine.core.operators.Operator
import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class AverageColorGrid8Reduced15 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(192) { 0.0f }, transient=true)
override fun newRetrieverForContent(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, content: Collection<ContentElement<*>>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newRetrieverForDescriptors(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, descriptors: Collection<FloatVectorDescriptor>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newExtractor(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, input: Operator<Retrievable>, context: IndexContext, persisting: Boolean, parameters: Map<String, Any>): Extractor<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.vitrivr.engine.base.features.migration

import org.vitrivr.engine.core.context.IndexContext
import org.vitrivr.engine.core.context.QueryContext
import org.vitrivr.engine.core.model.content.element.ContentElement
import org.vitrivr.engine.core.model.descriptor.vector.FloatVectorDescriptor
import org.vitrivr.engine.core.model.metamodel.Analyser
import org.vitrivr.engine.core.model.metamodel.Schema
import org.vitrivr.engine.core.model.retrievable.Retrievable
import org.vitrivr.engine.core.operators.Operator
import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class AverageFuzzyHist : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(15) { 0.0f }, transient=true)
override fun newRetrieverForContent(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, content: Collection<ContentElement<*>>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newRetrieverForDescriptors(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, descriptors: Collection<FloatVectorDescriptor>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newExtractor(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, input: Operator<Retrievable>, context: IndexContext, persisting: Boolean, parameters: Map<String, Any>): Extractor<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy15FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class AverageFuzzyHistNormalized : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(15) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy12FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class CLD : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(12) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.vitrivr.engine.base.features.migration

import org.vitrivr.engine.core.context.IndexContext
import org.vitrivr.engine.core.context.QueryContext
import org.vitrivr.engine.core.model.content.element.ContentElement
import org.vitrivr.engine.core.model.descriptor.vector.FloatVectorDescriptor
import org.vitrivr.engine.core.model.metamodel.Analyser
import org.vitrivr.engine.core.model.metamodel.Schema
import org.vitrivr.engine.core.model.retrievable.Retrievable
import org.vitrivr.engine.core.operators.Operator
import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class CLDReduced15 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(12) { 0.0f }, transient=true)
override fun newRetrieverForContent(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, content: Collection<ContentElement<*>>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newRetrieverForDescriptors(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, descriptors: Collection<FloatVectorDescriptor>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newExtractor(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, input: Operator<Retrievable>, context: IndexContext, persisting: Boolean, parameters: Map<String, Any>): Extractor<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy2048FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class ConceptMasksADE20k : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(2048) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.vitrivr.engine.base.features.migration

import org.vitrivr.engine.core.context.IndexContext
import org.vitrivr.engine.core.context.QueryContext
import org.vitrivr.engine.core.model.content.element.ContentElement
import org.vitrivr.engine.core.model.descriptor.scalar.StringDescriptor
import org.vitrivr.engine.core.model.metamodel.Analyser
import org.vitrivr.engine.core.model.metamodel.Schema
import org.vitrivr.engine.core.model.retrievable.Retrievable
import org.vitrivr.engine.core.operators.Operator
import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class DominantColor : Analyser<ContentElement<*>, StringDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = StringDescriptor::class
override fun prototype() = StringDescriptor(id= UUID.randomUUID(), retrievableId = UUID.randomUUID(), transient = true, value = "")
override fun newRetrieverForContent(field: Schema.Field<ContentElement<*>, StringDescriptor>, content: Collection<ContentElement<*>>, context: QueryContext): Retriever<ContentElement<*>, StringDescriptor> {
TODO("Not yet implemented")
}

override fun newRetrieverForDescriptors(field: Schema.Field<ContentElement<*>, StringDescriptor>, descriptors: Collection<StringDescriptor>, context: QueryContext): Retriever<ContentElement<*>, StringDescriptor> {
TODO("Not yet implemented")
}

override fun newExtractor(field: Schema.Field<ContentElement<*>, StringDescriptor>, input: Operator<Retrievable>, context: IndexContext, persisting: Boolean, parameters: Map<String, Any>): Extractor<ContentElement<*>, StringDescriptor> {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy64FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class DominantEdgeGrid : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(64) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy256FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class DominantEdgeGrid16 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(256) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.vitrivr.engine.base.features.migration

import org.vitrivr.engine.core.context.IndexContext
import org.vitrivr.engine.core.context.QueryContext
import org.vitrivr.engine.core.model.content.element.ContentElement
import org.vitrivr.engine.core.model.descriptor.vector.FloatVectorDescriptor
import org.vitrivr.engine.core.model.metamodel.Analyser
import org.vitrivr.engine.core.model.metamodel.Schema
import org.vitrivr.engine.core.model.retrievable.Retrievable
import org.vitrivr.engine.core.operators.Operator
import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class DominantEdgeGrid8 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(64) { 0.0f }, transient=true)
override fun newRetrieverForContent(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, content: Collection<ContentElement<*>>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newRetrieverForDescriptors(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, descriptors: Collection<FloatVectorDescriptor>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newExtractor(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, input: Operator<Retrievable>, context: IndexContext, persisting: Boolean, parameters: Map<String, Any>): Extractor<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy80FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class EHD : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(80) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.vitrivr.engine.base.features.migration

import org.vitrivr.engine.core.context.IndexContext
import org.vitrivr.engine.core.context.QueryContext
import org.vitrivr.engine.core.model.content.element.ContentElement
import org.vitrivr.engine.core.model.descriptor.vector.FloatVectorDescriptor
import org.vitrivr.engine.core.model.metamodel.Analyser
import org.vitrivr.engine.core.model.metamodel.Schema
import org.vitrivr.engine.core.model.retrievable.Retrievable
import org.vitrivr.engine.core.operators.Operator
import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class EdgeARP88 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(64) { 0.0f }, transient=true)
override fun newRetrieverForContent(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, content: Collection<ContentElement<*>>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newRetrieverForDescriptors(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, descriptors: Collection<FloatVectorDescriptor>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newExtractor(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, input: Operator<Retrievable>, context: IndexContext, persisting: Boolean, parameters: Map<String, Any>): Extractor<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.vitrivr.engine.base.features.migration

import org.vitrivr.engine.core.context.IndexContext
import org.vitrivr.engine.core.context.QueryContext
import org.vitrivr.engine.core.model.content.element.ContentElement
import org.vitrivr.engine.core.model.descriptor.vector.FloatVectorDescriptor
import org.vitrivr.engine.core.model.metamodel.Analyser
import org.vitrivr.engine.core.model.metamodel.Schema
import org.vitrivr.engine.core.model.retrievable.Retrievable
import org.vitrivr.engine.core.operators.Operator
import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class EdgeGrid16 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(256) { 0.0f }, transient=true)
override fun newRetrieverForContent(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, content: Collection<ContentElement<*>>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newRetrieverForDescriptors(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, descriptors: Collection<FloatVectorDescriptor>, context: QueryContext): Retriever<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}

override fun newExtractor(field: Schema.Field<ContentElement<*>, FloatVectorDescriptor>, input: Operator<Retrievable>, context: IndexContext, persisting: Boolean, parameters: Map<String, Any>): Extractor<ContentElement<*>, FloatVectorDescriptor> {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy512FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class HOGMF25k512 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(512) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy16FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class HueHistogram : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(16) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy1536FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class InceptionResNetV2 : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(1536) { 0.0f }, transient=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.vitrivr.engine.core.operators.ingest.Extractor
import org.vitrivr.engine.core.operators.retrieve.Retriever
import java.util.*

class Dummy3FloatVectorAnalyzer : Analyser<ContentElement<*>, FloatVectorDescriptor> {
class MedianColor : Analyser<ContentElement<*>, FloatVectorDescriptor> {
override val contentClasses = setOf(ContentElement::class)
override val descriptorClass = FloatVectorDescriptor::class
override fun prototype() = FloatVectorDescriptor(UUID.randomUUID(), UUID.randomUUID(), List(3) { 0.0f }, transient=true)
Expand Down
Loading

4 comments on commit 4a26832

@lucaro
Copy link
Member

@lucaro lucaro commented on 4a26832 Dec 1, 2023

Choose a reason for hiding this comment

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

Why are there so many dummy analyzers now? None of them does anything. Just to do the data migration, why would you need all these dummies?

@faberf
Copy link
Contributor Author

@faberf faberf commented on 4a26832 Dec 1, 2023

Choose a reason for hiding this comment

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

We will need them eventually. I have included them here to verify that the migrated data can be accessed via the schema. The next step is to add the retrievers. Does this answer your question?

@lucaro
Copy link
Member

@lucaro lucaro commented on 4a26832 Dec 1, 2023

Choose a reason for hiding this comment

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

Well, no, we will not need them eventually, at least not all of them, since with the architecture of the new system, several things that needed to be done in dedicated feature modules in cineast can be done in a combination of transformers and analyzers here.

@faberf
Copy link
Contributor Author

@faberf faberf commented on 4a26832 Dec 1, 2023

Choose a reason for hiding this comment

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

Ok that sounds cool. Not sure exactly how that would work. But yes we can simply remove the dummy analysers and replace them with these combinations, I am not attached to them.

Please sign in to comment.