Compare commits
5 Commits
8c972c0c7a
...
822c90599b
Author | SHA1 | Date | |
---|---|---|---|
822c90599b | |||
7d7bf73a7f | |||
e151067e57 | |||
831b137f8d | |||
28debaf267 |
@ -1,3 +0,0 @@
|
||||
from deepdanbooru_onnx import DeepDanbooru
|
||||
danbooru = DeepDanbooru()
|
||||
print(danbooru("/run/media/philipp/20404acc-312c-44f2-b2d1-3a0a14257cc6/.Media/porn/00244-3145022840.png"))
|
11
LLavaTagger/requirements.txt
Normal file
11
LLavaTagger/requirements.txt
Normal file
@ -0,0 +1,11 @@
|
||||
accelerate==0.29.0
|
||||
bitsandbytes
|
||||
huggingface-hub==0.22.2
|
||||
ninja==1.11.1.1
|
||||
safetensors==0.4.2
|
||||
tokenizers==0.15.2
|
||||
transformers
|
||||
pytorch
|
||||
opencv-python
|
||||
numpy
|
||||
tqdm
|
@ -1,4 +1,24 @@
|
||||
#!/bin/python3
|
||||
|
||||
# PersonDatasetAssembler - A tool to assmble images of a specific person from a
|
||||
# directory of images or from a video file
|
||||
# Copyright (C) 2024 Carl Philipp Klemm
|
||||
#
|
||||
# This file is part of PersonDatasetAssembler.
|
||||
#
|
||||
# PersonDatasetAssembler is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# PersonDatasetAssembler is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with PersonDatasetAssembler. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
from typing import Iterator
|
||||
|
@ -1,3 +1,23 @@
|
||||
//
|
||||
// SmartCrop - A tool for content aware croping of images
|
||||
// Copyright (C) 2024 Carl Philipp Klemm
|
||||
//
|
||||
// This file is part of SmartCrop.
|
||||
//
|
||||
// SmartCrop is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// SmartCrop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
#include "facerecognizer.h"
|
||||
#include <filesystem>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <exception>
|
||||
#include <opencv2/core/mat.hpp>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file incbin.h
|
||||
* @author Dale Weiler
|
||||
|
@ -1,3 +1,23 @@
|
||||
//
|
||||
// SmartCrop - A tool for content aware croping of images
|
||||
// Copyright (C) 2024 Carl Philipp Klemm
|
||||
//
|
||||
// This file is part of SmartCrop.
|
||||
//
|
||||
// SmartCrop is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// SmartCrop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
#include "intelligentroi.h"
|
||||
|
||||
#include <opencv2/imgproc.hpp>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <opencv2/imgproc.hpp>
|
||||
|
@ -1,3 +1,23 @@
|
||||
//
|
||||
// SmartCrop - A tool for content aware croping of images
|
||||
// Copyright (C) 2024 Carl Philipp Klemm
|
||||
//
|
||||
// This file is part of SmartCrop.
|
||||
//
|
||||
// SmartCrop is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// SmartCrop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <opencv2/core.hpp>
|
||||
@ -430,7 +450,7 @@ int main(int argc, char* argv[])
|
||||
std::vector<std::thread> threads;
|
||||
std::vector<std::vector<std::filesystem::path>> imagePathParts = splitVector(imagePaths, std::thread::hardware_concurrency());
|
||||
|
||||
for(size_t i = 0; i < std::thread::hardware_concurrency(); ++i)
|
||||
for(size_t i = 0; i < imagePathParts.size(); ++i)
|
||||
threads.push_back(std::thread(threadFn, imagePathParts[i], std::ref(config), recognizer, std::ref(recognizerMutex), std::ref(debugOutputPath)));
|
||||
|
||||
for(std::thread& thread : threads)
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
@ -1,3 +1,23 @@
|
||||
//
|
||||
// SmartCrop - A tool for content aware croping of images
|
||||
// Copyright (C) 2024 Carl Philipp Klemm
|
||||
//
|
||||
// This file is part of SmartCrop.
|
||||
//
|
||||
// SmartCrop is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// SmartCrop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
#include "seamcarving.h"
|
||||
|
||||
#include <opencv2/imgcodecs.hpp>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <opencv2/core/core.hpp>
|
||||
|
@ -1,3 +1,23 @@
|
||||
//
|
||||
// SmartCrop - A tool for content aware croping of images
|
||||
// Copyright (C) 2024 Carl Philipp Klemm
|
||||
//
|
||||
// This file is part of SmartCrop.
|
||||
//
|
||||
// SmartCrop is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// SmartCrop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
#include "tokenize.h"
|
||||
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
@ -1,3 +1,23 @@
|
||||
//
|
||||
// SmartCrop - A tool for content aware croping of images
|
||||
// Copyright (C) 2024 Carl Philipp Klemm
|
||||
//
|
||||
// This file is part of SmartCrop.
|
||||
//
|
||||
// SmartCrop is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// SmartCrop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#include <filesystem>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
@ -1,3 +1,23 @@
|
||||
//
|
||||
// SmartCrop - A tool for content aware croping of images
|
||||
// Copyright (C) 2024 Carl Philipp Klemm
|
||||
//
|
||||
// This file is part of SmartCrop.
|
||||
//
|
||||
// SmartCrop is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// SmartCrop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
#include <opencv2/dnn/dnn.hpp>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/* * SmartCrop - A tool for content aware croping of images
|
||||
* Copyright (C) 2024 Carl Philipp Klemm
|
||||
*
|
||||
* This file is part of SmartCrop.
|
||||
*
|
||||
* SmartCrop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SmartCrop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with SmartCrop. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <fstream>
|
||||
|
Reference in New Issue
Block a user