Git Product home page Git Product logo

vitrivr / cineast Goto Github PK

View Code? Open in Web Editor NEW
56.0 7.0 50.0 19.68 MB

Cineast is a multi-feature content-based mulitmedia retrieval engine. It is capable of retrieving images, audio- and video sequences as well as 3d models based on edge or color sketches, textual descriptions and example objects.

License: MIT License

Java 99.82% Dockerfile 0.03% Shell 0.05% Batchfile 0.08% GLSL 0.02%
retrieval video audio images 3d java oas

cineast's Introduction

vitrivr - cineast GitHub release License swagger-editor swagger-editor Java CI with Gradle

Cineast

Cineast is a multi-feature content-based multimedia retrieval engine. It is capable of retrieving images, audio- and video sequences as well as 3d models based on edge or color sketches, sketch-based motion queries and example objects. Cineast is written in Java and uses CottontailDB as a storage backend.

Building Cineast

Cineast can be built using Gradle. It needs Java 17+. Building and running it is as easy as

git clone https://github.com/vitrivr/cineast.git
cd cineast
./gradlew getExternalFiles cineast-runtime:shadowJar
java -jar cineast-runtime/build/libs/cineast-runtime-x.x-all.jar cineast.json

For more setup information, consult our Wiki

Docker image

There is a Docker image available on Docker Hub.

You can run the CLI with:

docker run vitrivr/cineast cli cineast.json help

To change the configuration you can use a bind mount, e.g. to run the API server with custom configuration file cineast.json in the current directory:

docker run -v "$PWD"/cineast.json:/opt/cineast/cineast.json:ro,Z vitrivr/cineast api cineast.json

Generate OpenApi Specification

If you need to rebuild the OpenApi Specification (OAS), there is a gradle task for this purpose:

./gradlew -PcineastConfig=<path/to/your/config> generateOpenApiSpecs

You can omit -PcineastConfig, then the default config (cineast.json) is used. The generated OAS is stored at docs/openapi.json

Prerequisites

System dependencies

  • git
  • JDK 17 or higher

3D rendering

For 3D rendering (required in order to support 3D models) you either need a video card or Mesa 3D. The JOGL library supports both. Rendering on Headless devices has been successfully tested with Xvfb. The following steps are required to enable 3D rendering support on a headless device without video card (Ubuntu 16.04.1 LTS)

  1. Install Mesa 3D (should come pre-installed on Ubuntu). Check with dpkg -l | grep mesa
  2. Install Xvfb:
$> sudo apt-get install xvfb
  1. Start a new screen:
$> sudo Xvfb :1 -ac -screen 0 1024x768x24 &
  1. Using the new screen, start Cineast:
$> DISPLAY=:1 java -jar cineast.jar -3d

The -3d option will perform a 3D test. If it succeeds, cineast should generate a PNG image depicting two coloured triangles on a black background.

Versioning

Cineast uses semantic versioning. See the releases page.

Code Style

Cineast primarily uses the Google Java Styleguide. Please use the file supplied in the docs/ folder

To automatically apply the styleguide in IntelliJ IDEA go to_File_ -> Settings -> Editor -> Code Style -> Java and import the supplied file via the gear icon.

You can also use Eclipse for development and use Google's styleguide for eclipse.

cineast's People

Contributors

alexandertheus avatar awani216 avatar frankier avatar ivangiangreco avatar liuhaai avatar lucaro avatar lukasbeck avatar mpas97 avatar net-cscience-raphael avatar ppanopticon avatar rahelarnold98 avatar s3inlc avatar samuelboerlin avatar sauterl avatar silvanheller avatar silvanstich avatar simonpeterhans avatar singaltanmay avatar spiess avatar vgsteiger avatar x4e-jonas avatar zydu51 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cineast's Issues

Score calculation for sketch-based retrieval features is suboptimal for staged querying

Currently, when using color sketches for a stage which is not the first one, it is possible that very little results are shown to the user. This is because for large vector distances, the score is bounded to 0 before limiting to the top k results. This means it is possible to enter a sketch-based stage with e.g. 3000 ids and leave it with just 10, even though the config is looking for the top 2500 results.

This has multiple possible fixes: we can adjust maximum distances, change something about correspondence functions or limit before going to correspondence.

Fix missing serialVersionUID to serializable classes

Multiple classes are marked as Serializable, but do not contain a definition of serialVersionUID. Either remove the marker or add a serial version.

Non-exhaustive list of classes:

  • Classes that implement FloatArrayDistance, i.e. org.vitrivr.cineast.core.util.distance.*
  • Exceptions MeshDecoderException, MethodNotSupportedException.java, ActionHandlerException, DatabaseLookupException

Extraction continues even when database is unavailable

On the development branch extraction continues even when database is unavailable. I'm not sure, but I think ideally the extraction process should just abort in this case to avoid outputting files which are not indexed. Also if the database becomes unreachable part way through. This way (hopefully) a partial dump can be restored.

Here are some illustrative logs:

2020-07-10 12:22:23.367 [pool-3-thread-51] ERROR o.v.c.c.d.c.CottontailWrapper - Error occurred during invocation of CottontailWrapper.query: UNAVAILABLE: io exception
2020-07-10 12:22:23.386 [pool-3-thread-55] ERROR o.v.c.c.d.c.CottontailWrapper - Error occurred during invocation of CottontailWrapper.query: UNAVAILABLE: io exception
2020-07-10 12:22:23.386 [pool-3-thread-36] ERROR o.v.c.c.d.c.CottontailWrapper - Error occurred during invocation of CottontailWrapper.query: UNAVAILABLE: io exception
2020-07-10 12:22:23.386 [pool-3-thread-21] ERROR o.v.c.c.d.c.CottontailWrapper - Error occurred during invocation of CottontailWrapper.query: UNAVAILABLE: io exception
2020-07-10 12:22:23.386 [pool-3-thread-31] ERROR o.v.c.c.d.c.CottontailWrapper - Error occurred during invocation of CottontailWrapper.query: UNAVAILABLE: io exception
2020-07-10 12:22:23.387 [pool-3-thread-52] ERROR o.v.c.c.d.c.CottontailWrapper - Error occurred during invocation of CottontailWrapper.query: UNAVAILABLE: io exception
2020-07-10 12:22:23.400 [pool-3-thread-55] DEBUG o.v.c.s.r.ExtractionTask - Finished CLD on segmentID v_0000001_69 in 1026 ms
2020-07-10 12:22:23.422 [pool-3-thread-21] DEBUG o.v.c.s.r.ExtractionTask - Finished EdgeGrid16 on segmentID v_0000001_69 in 1049 ms
2020-07-10 12:22:23.440 [pool-3-thread-36] DEBUG o.v.c.s.r.ExtractionTask - Finished EdgeARP88 on segmentID v_0000001_69 in 1066 ms
2020-07-10 12:22:23.608 [pool-3-thread-33] DEBUG o.v.c.s.r.ExtractionTask - Finished AverageFuzzyHist on segmentID v_0000001_69 in 1234 ms
2020-07-10 12:22:23.643 [pool-3-thread-13] DEBUG o.v.c.s.r.ExtractionTask - Finished AverageColorGrid8 on segmentID v_0000001_69 in 1270 ms
2020-07-10 12:22:23.671 [pool-3-thread-35] DEBUG o.v.c.s.r.ExtractionTask - Finished AverageColorARP44 on segmentID v_0000001_69 in 1298 ms
2020-07-10 12:22:23.834 [pool-3-thread-27] DEBUG o.v.c.s.r.ExtractionTask - Finished AverageColorGrid8Reduced15 on segmentID v_0000001_69 in 1461 ms
2020-07-10 12:22:24.449 [pool-3-thread-31] DEBUG o.v.c.s.r.ExtractionTask - Finished EHD on segmentID v_0000001_69 in 2076 ms
2020-07-10 12:22:25.898 [pool-3-thread-51] DEBUG o.v.c.s.r.ExtractionTask - Finished MedianColor on segmentID v_0000001_69 in 3526 ms
2020-07-10 12:22:25.926 [pool-3-thread-52] DEBUG o.v.c.s.r.ExtractionTask - Finished MedianColorGrid8 on segmentID v_0000001_69 in 3554 ms

...
...carries on...

Include the new ADAMpro-Protobuf repo in the devbranch

Currently there are only generated files. It might be worth to switch back to the old subrepo system or include instructions to generate new ADAMpro-Protobuf Files.

Specifically, there are multiple fixes internally which depend on the new ADAMpro-API which are relevant for the GC-Issue we ran into during extraction.

SharedConfig only loads default json

in config/Config.java, the sharedConfig Singleton only loads the default-json file and completely ignores the --config flag in the API.
The loadConfig() method in contrast returns a config-object.

[Wishlist] Filter Metadata

It would be very convenient if one could filter metadata domains at request-time:

To illustrate the aforementioned feature, let's have a look to the following example:

When requesting metadata of several objects (for RESTful API), the request to /api/v1/find/metadata/by/id would may be look like:

{
  "filters": [
   "LOCATION, "JSON"
   ],
  "ids":[
    "i_zD0BXwe4a7ljNbRJ",
    "i_1bBhZC4JLdf7RGKL"
  ]
}

The response would only contain metadata entries of the domains LOCATION and JSON

Support Batch-insert

As far as I understand the code base does currently not support batch inserts into ADAMpro. This is unfortunate for the use case where i want to insert my labels and have to perform one request per key-value pair because the current pers

Did I miss functionality here or is that something that is on the wishlist?

SegmentScoreElement Naming

AFAIK, SegmentScoreElement.getSegmentID() returns the full descriptor, including prefix, objectID and segmentID and not just segmentID

Optimize should be run automatically or is misleadingly named

Currently it appears that optimize must be run after an import for indices to be build in cottontail. This means it's required after an import for things to work correctly so is more than just an optimization step. I know this is all in a bit of a state of flux, but I'm just filing this issue (here, but perhaps it could equally well be filed against cottontail) to note that either:

  • Optimize should be run automatically at some point
  • OR optimize should be renamed to index (or even commit?) and it should be noted that it's compulsory to run it after adding any new data.

Note also that it's not just that queries won't work, but also integrity problems such as duplicate keys won't be reported until optimize is run (a reasonable design here I think but it should be made a bit clearer).

Large Files

I recently moved the larger resource files, such as BoW codebooks and DNN weights to git lfs but as it turn out this quickly maxes out the github bandwidth limit. So we should come up with a workflow which enables us to host these larger files somewhere else and easily download them when necessary. I'm doing something like this for https://github.com/lucaro/VideoSaliencyFilter, but here we have more files which have to be managed. Thoughts?

Refactor AbstractExtractionFileHandler to enable multiple media types per extraction-session

Once #48 is merged, this is the next item on the wishlist
Some thoughts:

  • Move Executor-Service instantiation out of the FileHandler so it can be shared between multiple FileHandlers.
  • ExtractionItemContainers are requested with specified media-type support OR are checked for compatibility from a pool of filehandlers
  • I'm not sure if the FileHandlers can share an ExtractionPipeline.

distinct scroll position

Actually, all views "share" the same scroll position. So if I scroll down, e.g., the list view and then open the gallery view, I'll directly be at the bottom too. In other words, all "movements" are registered by all views, even those currently not displayed. This is quite annoying, because when you go back to the tab you were before, you first have to look for where you left off.

:cineast-core:generateProto doesn't output java files on new Debian bullseye with OpenJDK 14

This is an issue that occurs on my own branch, which is just dev + #110

The machine has a fresh Debian bulleye install with OpenJDK 14

When I run:

$ ./gradlew :cineast-core:generateProto

I don't get any .java files generated, only .proto!

Oddly it does work in the following situations:

I'm left wondering whether I might be missing some hidden system dependency. I tried installing the various protobuf packages from apt just in case, but it hasn't helped.

[Bug] No default config in code

On branch multi-module there is no default config in code
This leads -if one config is not explicitely given- to a crash.

In the case of a missing cache config, this leads to a failure due to no default cache config is used.

Also, in the example config, there is no cache mentioned.

Library for Cineast interaction

Currently, to interact with the jar, the dependent needs to write configurations that mimic the config in Cineast.
To smooth out updating 3rd parties, there should be a cineast-api, deployed to gradle or otherwise that 3rd parties can use.

Empty retriever list for query AudioQueryContainer

Hello, below are the stack trace when I'm trying to execute an audio query
the audio query was working and fine before last updates but now seems something went wrong I'm not sure exactly where or during which stage ( extraction or retrieving)

2019-09-04 21:18:59.446 [pool-5-thread-2] DEBUG o.v.c.a.w.h.a.AbstractWebsocketMessageHandler - Successfully wrote QR_END message to WebSocket stream!
2019-09-04 21:19:36.972 [pool-5-thread-2] DEBUG o.v.c.a.w.h.a.AbstractWebsocketMessageHandler - Successfully wrote QR_START message to WebSocket stream!
2019-09-04 21:19:36.996 [pool-5-thread-2] WARN o.v.c.c.u.ContinuousRetrievalLogic - Empty retriever list for query AudioQueryContainer[frames=[org.vitrivr.cineast.core.data.frames.AudioFrame@2554d0b7, org.vitrivr.cineast.core.data.frames.AudioFrame@5a52d6fe, org.vitrivr.cineast.core.data.frames.AudioFrame@5ce0a3c8, org.vitrivr.cineast.core.data.frames.AudioFrame@186f2d2a, org.vitrivr.cineast.core.data.frames.AudioFrame@1bbd97f8, org.vitrivr.cineast.core.data.frames.AudioFrame@57145757, org.vitrivr.cineast.core.data.frames.AudioFrame@eb3409e, org.vitrivr.cineast.core.data.frames.AudioFrame@6fd43a1f, org.vitrivr.cineast.core.data.frames.AudioFrame@1821624a, org.vitrivr.cineast.core.data.frames.AudioFrame@6d7a30f6, org.vitrivr.cineast.core.data.frames.AudioFrame@79593a77, org.vitrivr.cineast.core.data.frames.AudioFrame@3793e381, org.vitrivr.cineast.core.data.frames.AudioFrame@2433e40b, org.vitrivr.cineast.core.data.frames.AudioFrame@18728dfb, org.vitrivr.cineast.core.data.frames.AudioFrame@28c88600, org.vitrivr.cineast.core.data.frames.AudioFrame@efe773, org.vitrivr.cineast.core.data.frames.AudioFrame@3bc758d9, org.vitrivr.cineast.core.data.frames.AudioFrame@3756070f, org.vitrivr.cineast.core.data.frames.AudioFrame@5bc27f63, org.vitrivr.cineast.core.data.frames.AudioFrame@24e9df17, org.vitrivr.cineast.core.data.frames.AudioFrame@25695ac3, org.vitrivr.cineast.core.data.frames.AudioFrame@22804f1e, org.vitrivr.cineast.core.data.frames.AudioFrame@6af1054a, org.vitrivr.cineast.core.data.frames.AudioFrame@a6e64, org.vitrivr.cineast.core.data.frames.AudioFrame@6fda93e4, org.vitrivr.cineast.core.data.frames.AudioFrame@4f82d9be, org.vitrivr.cineast.core.data.frames.AudioFrame@2d3b4e51, org.vitrivr.cineast.core.data.frames.AudioFrame@7e116cdc, org.vitrivr.cineast.core.data.frames.AudioFrame@45ef8549, org.vitrivr.cineast.core.data.frames.AudioFrame@1c79eb63, org.vitrivr.cineast.core.data.frames.AudioFrame@6b47777b, org.vitrivr.cineast.core.data.frames.AudioFrame@1e459143, org.vitrivr.cineast.core.data.frames.AudioFrame@27b98a0f, org.vitrivr.cineast.core.data.frames.AudioFrame@74c84f68, org.vitrivr.cineast.core.data.frames.AudioFrame@24e40225, org.vitrivr.cineast.core.data.frames.AudioFrame@16994073, org.vitrivr.cineast.core.data.frames.AudioFrame@7d1b495d, org.vitrivr.cineast.core.data.frames.AudioFrame@4b1eea99, org.vitrivr.cineast.core.data.frames.AudioFrame@4fef3cf5, org.vitrivr.cineast.core.data.frames.AudioFrame@132977a3, org.vitrivr.cineast.core.data.frames.AudioFrame@345f853a, org.vitrivr.cineast.core.data.frames.AudioFrame@8a9eb0a, org.vitrivr.cineast.core.data.frames.AudioFrame@3e97667e, org.vitrivr.cineast.core.data.frames.AudioFrame@665b8a60, org.vitrivr.cineast.core.data.frames.AudioFrame@2ee5b5c4, org.vitrivr.cineast.core.data.frames.AudioFrame@69d3faa9, org.vitrivr.cineast.core.data.frames.AudioFrame@6c72d57b, org.vitrivr.cineast.core.data.frames.AudioFrame@56404a1f, org.vitrivr.cineast.core.data.frames.AudioFrame@55088e86, org.vitrivr.cineast.core.data.frames.AudioFrame@2378203c, org.vitrivr.cineast.core.data.frames.AudioFrame@59dbe025, org.vitrivr.cineast.core.data.frames.AudioFrame@d1f59b3],totalSamples=105984,totalDuration=4.806529,descriptor=org.vitrivr.cineast.core.data.frames.AudioDescriptor@4cab4423,weight=1.0,id=<null>,superId=<null>], category audiofingerprint and config org.vitrivr.cineast.core.config.QueryConfig@1cf29a28[
  queryId=7cfb1114-d3c0-40de-a1fb-754065df1902
  distance=<null>
  distanceWeights=<null>
  norm=NaN
  correspondence=<null>
  hints=[exact]
], returning no results
2019-09-04 21:19:37.009 [pool-5-thread-2] DEBUG o.v.c.a.w.h.a.AbstractWebsocketMessageHandler - Successfully wrote QR_END message to WebSocket stream!

any help is appreciated.,
below also are the contents of my job file and cineast config

{
    "database": {
         "host": "127.0.0.1",
         "port": 5890,
         "plaintext": true
     },


  "benchmark": {
    "mode": "OFF",
    "path": "benchmarks"
  },
  "retriever": {
    "threadPoolSize": 500,
    "maxResults": 200,
    "resultsPerModule": 250,
    "features": {
      "boolean" : [
        {"feature":  "DailyRangeBooleanRetriever", "weight": 1.0},
        {"feature":  "DailyCollectionBooleanRetriever", "weight": 1.0},
        {"feature":  "WSDMTICollectionBooleanRetriever", "weight": 1.0}
      ],
      "semantic" : [
        {"feature": "ConceptMasksAde20k", "weight" : 1.0}
      ],
      "globalcolor": [
        {"feature": "AverageColor",  "weight": 2.3},
        {"feature": "MedianColorRaster", "weight": 0.5},
        {"feature": "MedianColor", "weight": 1.2},
        {"feature": "AverageFuzzyHist", "weight": 0.7},
        {"feature": "AverageFuzzyHistNormalized", "weight": 0.7},
        {"feature": "HueHistogram", "weight": 0.7},
        {"feature": "MedianFuzzyHist",   "weight": 1.3 }
      ],
      "localcolor": [
        {"feature": "AverageColorARP44", "weight": 2},
        {"feature": "AverageColorARP44Normalized", "weight": 0.5},
        {"feature": "SubDivAverageFuzzyColor", "weight": 0.5},
        {"feature": "SubDivMedianFuzzyColor", "weight": 0.85},
        {"feature": "AverageColorGrid8", "weight": 1.8},
        {"feature": "AverageColorGrid8Normalized", "weight": 1.8},
        {"feature": "AverageColorCLD", "weight": 1.4},
        {"feature": "AverageColorCLDNormalized", "weight": 1.4},
        {"feature": "MedianColor", "weight": 1.0},
        {"feature": "CLD", "weight": 1.3},
        {"feature": "CLDNormalized", "weight": 1.3},
        {"feature": "MedianColorGrid8", "weight": 1.7},
        {"feature": "MedianColorARP44", "weight": 1.7},
        {"feature": "AverageColorRaster", "weight": 1.0}
      ],
      "edge": [
        {"feature": "EdgeARP88", "weight": 0.85},
        {"feature": "EdgeGrid16", "weight": 1.15},
        {"feature": "EHD", "weight": 0.7},
        {"feature": "DominantEdgeGrid16", "weight": 1.4},
        {"feature": "DominantEdgeGrid8", "weight": 1.4}
      ],
      "motion": [
        {"feature": "SubDivMotionHistogram3", "weight": 0.5},
        {"feature": "MotionHistogram", "weight": 0.5},
        {"feature": "SubDivMotionHistogram5", "weight": 0.5},
        {"feature": "SubDivMotionHistogramBackground3", "weight": 0.5},
        {"feature": "SubDivMotionHistogramBackground5", "weight": 0.5}
      ],
      "quantized": [
        {"feature": "AverageColorGrid8Reduced11", "weight": 1.0},
        {"feature": "AverageColorGrid8Reduced15", "weight": 1.0},
        {"feature": "AverageColorRasterReduced11", "weight": 1.0},
        {"feature": "AverageColorRasterReduced15", "weight": 1.0},
        {"feature": "CLDReduced11", "weight": 1.0},
        {"feature": "CLDReduced15", "weight": 1.0}
      ],
      "localfeatures": [
        {"feature": "SURFMirflickr25K512", "weight": 1.75},
        {"feature": "HOGMirflickr25K512", "weight": 1.0}
      ],
      "localfeatures_fast": [
        {"feature": "SURFMirflickr25K256", "weight": 1.75},
        {"feature": "HOGMirflickr25K256", "weight": 1.0}
      ],
      "audio": [
        {"feature": "CENS12Shingle", "weight": 1.0},
        {"feature": "AudioFingerprint", "weight": 1.0},
        {"feature": "HPCP12Shingle", "weight": 1.0},
        {"feature": "MFCCShingle", "weight": 1.0}
      ],
      "tagsft": [
        {"feature": "SegmentTags", "weight": 1.0}
      ],
      "ocr": [
        {"feature": "OCRSearch", "weight": 1.0}
      ],
      "text": [
                 {"feature": "SubtitleFulltextSearch","weight": 2.5}
      ]

    }
  },

  "decoders": {
    "VIDEO": {
      "decoder": "FFMpegVideoDecoder",
      "properties": {
        "maxFrameWidth": 640,
        "maxFrameHeight": 480,
	"subtitle": true
      }
    },
    "IMAGE": {
      "decoder": "DefaultImageDecoder",
      "properties": {
        "bounds": 1024
      }
    },
    "AUDIO": {
      "decoder": "FFMpegAudioDecoder",
      "properties": {
        "samplerate": 44100,
        "channels": 2
      }
    }
  },

  "extractor": {
    "threadPoolSize": 500,
    "outputLocation": "out"
  },

  "imagecache": {
    "softMemoryLimit": 2048,
    "hardMemoryLimit": 1024
  },

  "api": {
    "enableCLI": true,
    "enableWebsocket": true,
    "enableWebsocketSecure": false,
    "enableRest": true,
    "enableRestSecure": false,
    "enableLegacy": false,
    "maxMessageSize": 40960000,
    "httpPort": 4567,
    "httpsPort": 4568,
    "legacyPort": 12345,
    "threadPoolSize": 500,
    "serveContent": true,
    "serveUI": true,
    "uiLocation": "/var/www/html",
    "thumbnailLocation": "thumbnails",
    "objectLocation": "objects"
  },

  "visualization": {
    "cacheEnabled": false,
    "cachePath": "cache/art/"
  },

  "monitoring":{
    "enablePrometheus": true,
    "prometheusPort": 4569
  }

}

job file

{
	"type":"VIDEO",
	"input":{
		"path": "objects",
		"depth":3,
		"skip": 0,
		"id": {
			"name": "SequentialObjectIdGenerator",
			"properties": {}
		}
	},
	"extractors":[
		/* Visual features: */
		{"name": "AverageColor"},
		{"name": "AverageColorARP44"},
		{"name": "AverageColorCLD"},
		{"name": "AverageColorGrid8"},
		{"name": "AverageColorRaster"},
		{"name": "AverageFuzzyHist"},
		{"name": "CLD"},
		{"name": "EdgeARP88"},
		{"name": "EdgeGrid16"},
		{"name": "EHD"},
		{"name": "MedianColor"},
		{"name": "MedianColorARP44"},
		{"name": "MedianColorGrid8"},
		{"name": "MedianColorRaster"},
		{"name": "MotionHistogram"},
		{"name": "HOGMirflickr25K512"},
		{"name": "SURFMirflickr25K512"},
		{"name": "SubtitleFulltextSearch"},
		{"name": "OCRSearch"},

		/* Audio features: */
		{"name": "AudioFingerprint"},
		{"name": "CENS12Shingle"},
		{"name": "HPCP12Shingle"},
		{"name": "MFCCShingle"}

	
	],
	"exporters":[
		{
			"name": "AudioSegmentExporter",
			"properties": {
				"destination": "thumbnails"
			}
		},
		{
			"name": "ShotThumbNails",
			"properties": {
				"destination": "thumbnails"
			}
		}
	]
	}

QoL: Re-add direct commands

As of now (branch multi-module) the old way of calling a certain functionality (e.g. start an extraction job) is not supported anymore: One has to manually type the command in cineast's CLI:

It would be nice to have those direct commands back, e.g.

Instead of:

currently:

java -jar cineast.jar cineast.json
cineast>extract -e path/to/config.json

supposetly in future:

java -jar cineast.jar cineast.json extract -e path/to/config.json

Duplicated last segment of video

When extracting multiple videos within one job, it happens that the last segment of the video is written twice. No output appears to be to produced for the second-to-last segment however, only for the one with the last number.

GenericExtractionItemHandler crashes with NPE

Using the extraction API, I get the following NPE:

java.lang.NullPointerException
        at org.vitrivr.cineast.core.db.ImporterSelector.getRows(ImporterSelector.java:216)
        at org.vitrivr.cineast.core.db.ImporterSelector.getRows(ImporterSelector.java:198)
        at org.vitrivr.cineast.core.db.dao.reader.MultimediaObjectLookup.lookUpObjectByPath(MultimediaObjectLookup.java:104)
        at org.vitrivr.cineast.core.run.filehandler.GenericExtractionItemHandler.fetchOrCreateMultimediaObjectDescriptor(GenericExtractionItemHandler.java:376)
        at org.vitrivr.cineast.core.run.filehandler.GenericExtractionItemHandler.run(GenericExtractionItemHandler.java:150)
        at java.lang.Thread.run(Unknown Source)

[Wishlist] Sophisticated Metadata API

As an attendum to #63

In general more cineast-side filtering / processing of metadata would be highly appreciated:
This includes, but is not limited to:

  • specify domain on request-time (see #63 )
  • specify domain and key in the request (e.g. for a GET request: api/v1/metadata/of/:objectID/:domain/:key )
  • by domain (e.g. for a GET request: api/v1/metadata/in/:domain )
  • by key, regardless domain (e.g. for a GET request: api/v1/metadata/with/:key)

[Wishlist] Possible Memory Leak of FFMPEG

FFMPEG possibly has memory leaks.

  • Investigate: Is it actually FFMPEG?
  • If it's FFMPEG, this means we need a way to quit and spawn a new extraction-process from within java
  • That logic should then be used in the session-logic so we can restart the extraction-process belonging to a session

Connection Issue when I implemented in Docker

I followed this guide (https://vitrivr.org/getting_started.html) to run AdamPro in Docker in 3 ports (8080, 5890 and 443) using this command in Ubuntu 18.04:
docker run --name adampro -p 8080:4040 -p 5890:5890 -p 443:9099 -d vitrivr/adampro:2.1-selfcontained

Next, I executed java -jar cineast.jar --setup and running the extraction successfully.
vitrivr-ng is configured in nginx 1.14.0 through port 80.

When I run the command below, the error message show on the screen.
java -jar cineast.jar

Error message:

root@ubuntu: java -jar cineast.jar
2019-11-13 15:51:16.007 [main] INFO o.v.c.c.c.Config - Config file loaded!
2019-11-13 15:51:16.029 [main] INFO o.v.c.m.PrometheusServer - Initalizing Prometheus endpoint at port 4569
2019-11-13 15:51:16.061 [main] INFO o.e.j.u.log - Logging initialized @1291ms to org.eclipse.jetty.util.log.Slf4jLog
2019-11-13 15:51:16.141 [main] INFO o.v.c.m.PrometheusExtractionTaskMonitor - Initalizing Prometheus Extraction Task Monitor
2019-11-13 15:51:16.144 [main] INFO o.v.c.m.ImportTaskMonitor - Initalizing Prometheus Extraction Task Monitor
2019-11-13 15:51:16.144 [main] INFO o.v.c.m.DatabaseHealthMonitor - Initalizing Prometheus Extraction Task Monitor
2019-11-13 15:51:16.678 [main] INFO o.v.c.m.RetrievalTaskMonitor - Initalizing Prometheus Retrieval Task Monitor
2019-11-13 15:51:16.681 [main] INFO o.e.j.s.Server - jetty-9.4.z-SNAPSHOT
2019-11-13 15:51:16.737 [main] INFO o.e.j.s.h.ContextHandler - Started o.e.j.s.ServletContextHandler@70a36a66{/,null,AVAILABLE}
2019-11-13 15:51:16.751 [main] INFO o.e.j.s.AbstractConnector - Started ServerConnector@23bff419{HTTP/1.1,[http/1.1]}{0.0.0.0:4569}
2019-11-13 15:51:16.751 [main] INFO o.e.j.s.Server - Started @1985ms
Starting HTTP API...
Cineast CLI started.
2019-11-13 15:51:16.888 [Thread-13] INFO o.e.j.s.Server - jetty-9.4.z-SNAPSHOT
2019-11-13 15:51:16.903 [Thread-13] INFO o.e.j.s.session - DefaultSessionIdManager workerName=node0
2019-11-13 15:51:16.904 [Thread-13] INFO o.e.j.s.session - No SessionScavenger set, using defaults
2019-11-13 15:51:16.905 [Thread-13] INFO o.e.j.s.session - Scavenging every 660000ms
2019-11-13 15:51:16.909 [Thread-13] INFO o.e.j.s.h.ContextHandler - Started o.e.j.s.ServletContextHandler@48f3e9e9{/,null,AVAILABLE}
2019-11-13 15:51:16.914 [Thread-13] INFO o.e.j.s.AbstractConnector - Started ServerConnector@37312d7a{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
2019-11-13 15:51:16.914 [Thread-13] INFO o.e.j.s.Server - Started @2148ms
2019-11-13 15:51:17.112 [Thread-1] ERROR o.v.c.c.d.a.ADAMproWrapper - error in pingBlocking: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found: AdamSearch/Ping
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:528)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:509)
        at org.vitrivr.cineast.core.db.adampro.ADAMproWrapper.pingBlocking(ADAMproWrapper.java:108)
        at org.vitrivr.cineast.core.db.adampro.AbstractADAMproSelector.ping(AbstractADAMproSelector.java:164)
        at org.vitrivr.cineast.monitoring.DatabaseHealthMonitor.lambda$init$0(DatabaseHealthMonitor.java:38)
        at java.lang.Thread.run(Thread.java:748)
Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found: AdamSearch/Ping
        at io.grpc.Status.asRuntimeException(Status.java:526)
        at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:433)
        at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
        at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:339)
        at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:443)
        at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:525)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:446)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:557)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:107)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        ... 1 more

2019-11-13 15:51:17.113 [Thread-1] ERROR o.v.c.m.DatabaseHealthMonitor - Connection issue, waiting for 1 minute
HTTP API started!
2019-11-13 15:52:19.152 [Thread-1] ERROR o.v.c.c.d.a.ADAMproWrapper - error in pingBlocking: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found: AdamSearch/Ping
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:528)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:509)
        at org.vitrivr.cineast.core.db.adampro.ADAMproWrapper.pingBlocking(ADAMproWrapper.java:108)
        at org.vitrivr.cineast.core.db.adampro.AbstractADAMproSelector.ping(AbstractADAMproSelector.java:164)
        at org.vitrivr.cineast.monitoring.DatabaseHealthMonitor.lambda$init$0(DatabaseHealthMonitor.java:38)
        at java.lang.Thread.run(Thread.java:748)
Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found: AdamSearch/Ping
        at io.grpc.Status.asRuntimeException(Status.java:526)
        at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:433)
        at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
        at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:339)
        at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:443)
        at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:525)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:446)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:557)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:107)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        ... 1 more

2019-11-13 15:52:19.153 [Thread-1] ERROR o.v.c.m.DatabaseHealthMonitor - Connection issue, waiting for 1 minute

netstat -tulpn, port 80, 443, 80, 5890, 4567 and 4569 are in use but vitrivr-ng cannot connect to cineast.

image

API port in config.json in vitrivr-ng:

"api": {
    "host" : "127.0.0.1",
    "port" : 4567,
    "protocol_http": "http",
    "protocol_ws": "ws",
    "ping_interval": 10000
  }

Error in Chrome:

image

I hope for you help! Thank you very much!

Release Management Automation

Since the last release, nobody updated the pre-built version of the UI in the github releases. Could someone have a look at this and how to prevent this in the future?

Resource location issue

SURFMirflickr25K256 feature cannot load the resource file as it is not found.

Branch: multi-module

JsonSelector breaks for MedianColor

{"id":"i_CuMWCPS6D3hnTmwA_1","feature":[100,-0.04735537,-0.010409119]}

starts with an Integer, so PrimitiveTypeProvider.fromObject tries to generate an Integer-Array. This throws a ClassCastException since you can't cast Doubles to Integers.

This is fixed for me (44f4a05) and JSON isn't used in production as far as I'm aware but I'll leave this here as a reference for maybe a future PR. (JSON has other issues which I'm fixing as-i-go on the evaluation branch)

[Discussion] OAS documentation

We sould revise and discuss the upcoming OAS documentation.
In particular, some desriptions would benefit from a revision or two.

This thread is supposed to host the discussion of the documentation

HOG and SURF Features cannot be stored in ADAMpro

Branch: dev
Version: latest

Steps to reproduce:

  • Have the ADAMpro-2.1 Docker Container running
  • Create entities using the --setup command
  • Try to extract features using HOG / SURF
  • => WARN o.v.c.c.d.a.ADAMproWriter - Error: cannot load entity during persist in entity features_hogmf25k512
    (Emphasis mine, in bold the ADAMpro Error message)

The ADAMpro UI confirms that no features are persisted.

Unfortunately, as the ADAMpro Docker log is still cluttered by irrelevant Spark-Messages, I'm unable to investigate this further currently. Maybe @ivangiangreco can take a look.

Exception in SolrTextRetriever

Sorry to disturb you ,but could you please tell me is the scene caption function described in the paper "Deep Learning-Based Concept Detection in vitrivr" available now?
Encountered such an error while using cineast's DescriptionTextSearch feature extraction module:

2019-11-21 16:05:42.695 [pool-5-thread-1] FATAL o.v.c.c.r.ExtractionTask - EXTRACTION ERROR in DescriptionTextSearch: for segmentID i_50ANYl8J0vkx7627_000001 java.lang.UnsupportedOperationException: Not supported by default at org.vitrivr.cineast.core.features.abstracts.SolrTextRetriever.processSegment(SolrTextRetriever.java:74) at org.vitrivr.cineast.core.runtime.ExtractionTask.run(ExtractionTask.java:28) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

In the processSegment function of SolrTextRetriever.java, I found that this exception was thrown by default. Is there a problem with my usage?

Remove / Re-introduce Benchmarking Config

Since the restructuring, the benchmarking config is not used properly, since it would introduce a dependency from core to standalone. This needs some redesign in order to be useful again.

Error for ID-Merging in SegmentLookup

For both ConceptMaskAde20k and DescriptionTextSearch, the following error can happen:

public Map<String, MediaSegmentDescriptor> lookUpSegments(Iterable<String> segmentIds) {
    Stream<MediaSegmentDescriptor> descriptors = this.lookUpSegmentsByField(FIELDNAMES[0], segmentIds);
    return Maps.uniqueIndex(descriptors.iterator(), MediaSegmentDescriptor::getSegmentId);
  }

The following snippet fails with an exception:

2018-11-27 10:26:29.482 [pool-5-thread-13] ERROR o.v.c.a.w.h.a.AbstractWebsocketMessageHandler - An exception occurred during execution of similarity query message java.lang.IllegalArgumentException: Multiple entries with same key: v_00455_38=MediaSegmentDescriptor(v_00455_38) and v_00455_38=MediaSegmentDescriptor(v_00455_38). To index multiple values under a key, use Multimaps.index.
        at com.google.common.collect.Maps.uniqueIndex(Maps.java:1346)
        at org.vitrivr.cineast.core.db.dao.reader.MediaSegmentReader.lookUpSegments(MediaSegmentReader.java:50)
        at org.vitrivr.cineast.api.websocket.handlers.queries.AbstractQueryMessageHandler.loadSegments(AbstractQueryMessageHandler.java:40)
        at org.vitrivr.cineast.api.websocket.handlers.queries.SimilarityQueryMessageHandler.finalizeAndSubmitResults(SimilarityQueryMessageHandler.java:102)
        at org.vitrivr.cineast.api.websocket.handlers.queries.SimilarityQueryMessageHandler.handle(SimilarityQueryMessageHandler.java:70)
        at org.vitrivr.cineast.api.websocket.handlers.queries.SimilarityQueryMessageHandler.handle(SimilarityQueryMessageHandler.java:31)
        at org.vitrivr.cineast.api.websocket.WebsocketAPI.lambda$message$0(WebsocketAPI.java:118)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Websocket-Message Size seems to be magically capped around 6500 string length in Safari

For some queries, the base64-string sent by vitrivr-ng is cut at ca. 6k string length when it arrives at cineast. This then leads to two issues: 1) the query is not executed since the message cannot be parsed properly. 2) the ws-connection crashes, jetty closes it with a 1006 error (which is not helpful at all).
I have not managed to triangulate the issue, none of the available config-parameters from jetty fix the problem and it also does not seem to be a problem on the vitrivr-ng side.

This is not a clearly reproducible problem, it is most probably reproduced by drawing a small black circle.

This is certainly an issue for novices, as we have neither automatic reconnect nor is it intuitive if a query is not executed.

One trivial fix would be to resize the canvas before serialization in vitrivr-ng from currently 450x450 to e.g. 200x200. This would reduce the length of the base64-string without a massive reduction in the quality of sketch input and would be very low implementation effort.

Thoughts @lucaro?

Inconsistency in RESTful API response

As seen in

,
a request to /api/v1/find/tags/all results in a top-level array, whereas in every other response I know (may be there are more inconsistencies), the response is an object, containing the actual query result.

EDIT: The API responses once consisted of top-level objects.
Nevertheless, this inconsistency is rather inconvenient: Sometimes the response is an object, sometimes an array - I suggest to only use objects, as some JSON parsers do not support top-level arrays.
Furthermore, the WebSocket API always returns top-level objects, which is another reason for the same behaviour in the RESTful API.

Failed to start http endpoint due to exception

Hello, supporters,
cineast was working fine with me 2 weeks ago, but I decided to trigger
git pull origin master to keep me up-to-date and the I recompiled cineast so a new exception related to Jetty server appeared, I'm not sure if Jetty was there from the beginning I think apache was used as web server below is the stack trace I hope you could help me.

`2019-08-31 19:32:32.669 [main] WARN o.v.c.c.c.d.FeatureCategoriesDeserializer - The specified feature 'QueryImageExporter' could not be instantiated: java.lang.ClassNotFoundException: org.vitrivr.cineast.core.features.QueryImageExporter
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.vitrivr.cineast.core.util.ReflectionHelper.getClassFromName(ReflectionHelper.java:449)
at org.vitrivr.cineast.core.config.deserializers.FeatureCategoriesDeserializer.deserialize(FeatureCategoriesDeserializer.java:58)
at org.vitrivr.cineast.core.config.deserializers.FeatureCategoriesDeserializer.deserialize(FeatureCategoriesDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4001)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2890)
at org.vitrivr.cineast.core.util.json.JacksonJsonProvider.toObject(JacksonJsonProvider.java:70)
at org.vitrivr.cineast.core.config.Config.loadConfig(Config.java:53)
at org.vitrivr.cineast.core.config.Config.sharedConfig(Config.java:42)
at org.vitrivr.cineast.monitoring.PrometheusServer.initialize(PrometheusServer.java:29)
at org.vitrivr.cineast.api.API.main(API.java:90)

2019-08-31 19:32:32.693 [main] WARN o.v.c.c.c.d.FeatureCategoriesDeserializer - The specified feature 'SubtitleWordSearch' could not be instantiated: java.lang.ClassNotFoundException: org.vitrivr.cineast.core.features.SubtitleWordSearch
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.vitrivr.cineast.core.util.ReflectionHelper.getClassFromName(ReflectionHelper.java:449)
at org.vitrivr.cineast.core.config.deserializers.FeatureCategoriesDeserializer.deserialize(FeatureCategoriesDeserializer.java:58)
at org.vitrivr.cineast.core.config.deserializers.FeatureCategoriesDeserializer.deserialize(FeatureCategoriesDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4001)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2890)
at org.vitrivr.cineast.core.util.json.JacksonJsonProvider.toObject(JacksonJsonProvider.java:70)
at org.vitrivr.cineast.core.config.Config.loadConfig(Config.java:53)
at org.vitrivr.cineast.core.config.Config.sharedConfig(Config.java:42)
at org.vitrivr.cineast.monitoring.PrometheusServer.initialize(PrometheusServer.java:29)
at org.vitrivr.cineast.api.API.main(API.java:90)

2019-08-31 19:32:32.695 [main] INFO o.v.c.c.c.Config - Config file loaded!
2019-08-31 19:32:32.695 [main] INFO o.v.c.m.PrometheusServer - Prometheus monitoring not enabled
Starting HTTP API...
Cineast CLI started.
2019-08-31 19:32:32.947 [Thread-2] INFO o.e.j.u.log - Logging initialized @3926ms to org.eclipse.jetty.util.log.Slf4jLog
2019-08-31 19:32:34.049 [Thread-2] INFO o.e.j.s.Server - jetty-9.4.z-SNAPSHOT
2019-08-31 19:32:34.083 [Thread-2] FATAL o.v.c.a.APIEndpoint - Failed to start HTTP endpoint due to an exception. Cineast will shut down now!
java.lang.IllegalStateException: Insufficient threads: max=8 < needed(acceptors=1 + selectors=8 + request=1)
at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[cineast.jar:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[cineast.jar:?]
at spark.embeddedserver.jetty.EmbeddedJettyServer.ignite(EmbeddedJettyServer.java:149) ~[cineast.jar:?]
at spark.Service.lambda$init$2(Service.java:496) ~[cineast.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
`

SRTSubTitleDecoder :NumberFormatException

Hello, the below exception is thrown while trying to run extraction using cineast
`
2019-10-13 00:40:37.893 [extraction-file-handler-thread] ERROR o.v.c.c.r.f.GenericExtractionItemHandler - Media Type VIDEO does not sup
port file type application/octet-stream
2019-10-13 00:40:37.894 [extraction-file-handler-thread] DEBUG o.v.c.c.r.p.TreeWalkContainerIteratorProvider - Next path: /var/www/html
/test/1.mp4, base /var/www/html/test, res 1.mp4
2019-10-13 00:40:37.894 [extraction-file-handler-thread] INFO o.v.c.c.r.f.GenericExtractionItemHandler - Processing path ExtractionItem
Container{object=MediaObjectDescriptor{objectId='null', name='1.mp4', path='1.mp4', exists=false, mediatypeId=99}, metadata=[], path=/v
ar/www/html/test/1.mp4} and mediatype VIDEO
2019-10-13 00:40:38.867 [extraction-file-handler-thread] INFO o.v.c.c.d.s.s.SRTSubTitleDecoder - Loading SRT subtitle from /var/www/htm
l/test/1.srt
2019-10-13 00:40:38.962 [extraction-file-handler-thread] WARN o.v.c.c.d.s.s.SRTSubTitleDecoder - Error while parsing subtitle item
2019-10-13 00:40:38.964 [extraction-file-handler-thread] WARN o.v.c.c.d.s.s.SRTSubTitleDecoder - java.lang.NumberFormatException: For i
nput string: "1"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at java.lang.Thread.run(Thread.java:748)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.vitrivr.cineast.core.decode.subtitle.SubtitleDecoderFactory.subtitleForFile(SubtitleDecoderFactory.java:77)
at org.vitrivr.cineast.core.decode.subtitle.SubtitleDecoderFactory.subtitleForVideo(SubtitleDecoderFactory.java:56)
at org.vitrivr.cineast.core.decode.video.FFMpegVideoDecoder.init(FFMpegVideoDecoder.java:430)
at org.vitrivr.cineast.core.run.filehandler.GenericExtractionItemHandler.run(GenericExtractionItemHandler.java:208)
at java.lang.Thread.run(Thread.java:748)

actully i tried to figure out if it's a problem with class SRTSubTitleDecoder itself so i somehow seperate it like below

import java.io.BufferedReader;
import java.io.IOException;
import java.nio.file.Paths;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
/*
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.vitrivr.cineast.core.decode.subtitle.SubTitleDecoder;
import org.vitrivr.cineast.core.decode.subtitle.SubtitleItem;
import org.vitrivr.cineast.core.util.LogHelper;
*/
public class SRTSubTitleDecoder {

//rivate static final Logger LOGGER = LogManager.getLogger();

//private List<SRTSubtitleItem> items = new ArrayList<>();
private int maxId = -1;
private long startTime = -1, endTime = -1;
private int pointer = 0;


public SRTSubTitleDecoder(Path file) {

// LOGGER.info("Loading SRT subtitle from {}", file);
try (final BufferedReader reader = Files.newBufferedReader(file)) {
String line1, line2, line3;
StringBuffer text;
int id = 0;
long start, end;
loop:
while ((line1 = reader.readLine()) != null) {

            while (line1.isEmpty()) {
                line1 = reader.readLine();
                if (line1 == null) {
                    break loop;
                }
            }

            try {
                id = Integer.parseInt(line1);
                //System.out.println(id);

                this.maxId = Math.max(maxId, id);

                line2 = reader.readLine();
                if (line2 == null) {
                    break;
                }
                String[] timing = line2.split(" --> ");
                if (timing.length != 2) {
                    break;
                }

                start = parseTime(timing[0]);
                end = parseTime(timing[1]);

                if (this.startTime == -1) {
                    this.startTime = start;
                }

                this.endTime = end;

                text = new StringBuffer();
                while ((line3 = reader.readLine()) != null && !line3.isEmpty()) {
                    text.append(line3);
                    System.out.println(text);
                    text.append('\n');
                }

// items.add(new SRTSubtitleItem(id, start, end, text.toString()));
} catch (NumberFormatException e) {
// LOGGER.warn("Error while parsing subtitle item");
// LOGGER.warn(LogHelper.getStackTrace(e));
}
}
`
and i run that class against the same SRT file and it worked no exceptions were thrown.

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.