mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
chore(server,ml): remove object detection job and endpoint (#2627)
* removed object detection job * removed object detection endpoint
This commit is contained in:
parent
9730bf0acc
commit
631f13cf2f
10 changed files with 0 additions and 75 deletions
|
|
@ -22,7 +22,6 @@ class ClipRequestBody(BaseModel):
|
|||
classification_model = os.getenv(
|
||||
"MACHINE_LEARNING_CLASSIFICATION_MODEL", "microsoft/resnet-50"
|
||||
)
|
||||
object_model = os.getenv("MACHINE_LEARNING_OBJECT_MODEL", "hustvl/yolos-tiny")
|
||||
clip_image_model = os.getenv("MACHINE_LEARNING_CLIP_IMAGE_MODEL", "clip-ViT-B-32")
|
||||
clip_text_model = os.getenv("MACHINE_LEARNING_CLIP_TEXT_MODEL", "clip-ViT-B-32")
|
||||
facial_recognition_model = os.getenv(
|
||||
|
|
@ -39,7 +38,6 @@ app = FastAPI()
|
|||
@app.on_event("startup")
|
||||
async def startup_event():
|
||||
# Get all models
|
||||
_get_model(object_model, "object-detection")
|
||||
_get_model(classification_model, "image-classification")
|
||||
_get_model(clip_image_model)
|
||||
_get_model(clip_text_model)
|
||||
|
|
@ -55,14 +53,6 @@ async def root():
|
|||
def ping():
|
||||
return "pong"
|
||||
|
||||
|
||||
@app.post("/object-detection/detect-object", status_code=200)
|
||||
def object_detection(payload: MlRequestBody):
|
||||
model = _get_model(object_model, "object-detection")
|
||||
assetPath = payload.thumbnailPath
|
||||
return run_engine(model, assetPath)
|
||||
|
||||
|
||||
@app.post("/image-classifier/tag-image", status_code=200)
|
||||
def image_classification(payload: MlRequestBody):
|
||||
model = _get_model(classification_model, "image-classification")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue