Skip to content
Snippets Groups Projects
Commit 82b77d5e authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Succcessful test running ilastik pixel classification over API

parent ba186562
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,9 @@ class TestIlastikOverApi(TestServerBaseClass):
rj = resp_list.json()
self.assertEqual(rj[model_id]['class'], 'IlastikPixelClassifierModel')
return model_id
def test_load_ilastik_object_model(self):
resp_load = requests.put(
self.uri + 'models/ilastik/object_classification/load/',
......@@ -121,4 +124,18 @@ class TestIlastikOverApi(TestServerBaseClass):
resp_list = requests.get(self.uri + 'models')
self.assertEqual(resp_list.status_code, 200)
rj = resp_list.json()
self.assertEqual(rj[model_id]['class'], 'IlastikObjectClassifierModel')
\ No newline at end of file
self.assertEqual(rj[model_id]['class'], 'IlastikObjectClassifierModel')
def test_ilastik_infer_pixel_probability(self):
TestServerBaseClass.copy_input_file_to_server()
model_id = self.test_load_ilastik_pixel_model()
resp_infer = requests.put(
self.uri + f'infer/from_image_file',
params={
'model_id': model_id,
'input_filename': czifile['filename'],
'channel': 2,
},
)
self.assertEqual(resp_infer.status_code, 200, resp_infer.content.decode())
import unittest
from conf.testing import czifile
from model_server.image import CziImageFileAccessor
from model_server.model import DummyImageToImageModel, CouldNotLoadModelError, Model
from model_server.model import DummyImageToImageModel, CouldNotLoadModelError
class TestCziImageFileAccess(unittest.TestCase):
def setUp(self) -> None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment