diff --git a/DanbooruTagger/example.py b/DanbooruTagger/example.py new file mode 100644 index 0000000..18fa74d --- /dev/null +++ b/DanbooruTagger/example.py @@ -0,0 +1,3 @@ +from deepdanbooru_onnx import DeepDanbooru +danbooru = DeepDanbooru() +print(danbooru("/run/media/philipp/20404acc-312c-44f2-b2d1-3a0a14257cc6/.Media/porn/00244-3145022840.png")) diff --git a/LLavaTagger/requirements.txt b/LLavaTagger/requirements.txt deleted file mode 100644 index ada4970..0000000 --- a/LLavaTagger/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -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 diff --git a/PersonDatasetAssembler/PersonDatasetAssembler.py b/PersonDatasetAssembler/PersonDatasetAssembler.py index 8b365a5..c720547 100755 --- a/PersonDatasetAssembler/PersonDatasetAssembler.py +++ b/PersonDatasetAssembler/PersonDatasetAssembler.py @@ -1,24 +1,4 @@ #!/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 . - import argparse import os from typing import Iterator diff --git a/SmartCrop/facerecognizer.cpp b/SmartCrop/facerecognizer.cpp index 623bfb2..3caddae 100644 --- a/SmartCrop/facerecognizer.cpp +++ b/SmartCrop/facerecognizer.cpp @@ -1,23 +1,3 @@ -// -// 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 . -// - #include "facerecognizer.h" #include diff --git a/SmartCrop/facerecognizer.h b/SmartCrop/facerecognizer.h index 8b28613..b8d818d 100644 --- a/SmartCrop/facerecognizer.h +++ b/SmartCrop/facerecognizer.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - #pragma once #include #include diff --git a/SmartCrop/incbin.h b/SmartCrop/incbin.h index 502862f..3f662e1 100644 --- a/SmartCrop/incbin.h +++ b/SmartCrop/incbin.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - /** * @file incbin.h * @author Dale Weiler diff --git a/SmartCrop/intelligentroi.cpp b/SmartCrop/intelligentroi.cpp index 394509c..ddb4606 100644 --- a/SmartCrop/intelligentroi.cpp +++ b/SmartCrop/intelligentroi.cpp @@ -1,23 +1,3 @@ -// -// 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 . -// - #include "intelligentroi.h" #include diff --git a/SmartCrop/intelligentroi.h b/SmartCrop/intelligentroi.h index 0cbb00b..188cd9e 100644 --- a/SmartCrop/intelligentroi.h +++ b/SmartCrop/intelligentroi.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - #pragma once #include diff --git a/SmartCrop/main.cpp b/SmartCrop/main.cpp index c90fd00..d659181 100644 --- a/SmartCrop/main.cpp +++ b/SmartCrop/main.cpp @@ -1,23 +1,3 @@ -// -// 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 . -// - #include #include #include @@ -450,7 +430,7 @@ int main(int argc, char* argv[]) std::vector threads; std::vector> imagePathParts = splitVector(imagePaths, std::thread::hardware_concurrency()); - for(size_t i = 0; i < imagePathParts.size(); ++i) + for(size_t i = 0; i < std::thread::hardware_concurrency(); ++i) threads.push_back(std::thread(threadFn, imagePathParts[i], std::ref(config), recognizer, std::ref(recognizerMutex), std::ref(debugOutputPath))); for(std::thread& thread : threads) diff --git a/SmartCrop/options.h b/SmartCrop/options.h index 38c2840..2d2aad7 100644 --- a/SmartCrop/options.h +++ b/SmartCrop/options.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - #pragma once #include #include diff --git a/SmartCrop/readfile.h b/SmartCrop/readfile.h index a6f61be..0196a0a 100644 --- a/SmartCrop/readfile.h +++ b/SmartCrop/readfile.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - #pragma once #include #include diff --git a/SmartCrop/seamcarving.cpp b/SmartCrop/seamcarving.cpp index fab719c..dabd0f1 100644 --- a/SmartCrop/seamcarving.cpp +++ b/SmartCrop/seamcarving.cpp @@ -1,23 +1,3 @@ -// -// 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 . -// - #include "seamcarving.h" #include diff --git a/SmartCrop/seamcarving.h b/SmartCrop/seamcarving.h index e306694..c4b61a9 100644 --- a/SmartCrop/seamcarving.h +++ b/SmartCrop/seamcarving.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - #pragma once #include diff --git a/SmartCrop/tokenize.cpp b/SmartCrop/tokenize.cpp index c565fc2..af8509b 100644 --- a/SmartCrop/tokenize.cpp +++ b/SmartCrop/tokenize.cpp @@ -1,23 +1,3 @@ -// -// 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 . -// - #include "tokenize.h" diff --git a/SmartCrop/tokenize.h b/SmartCrop/tokenize.h index 85d7321..6641e5e 100644 --- a/SmartCrop/tokenize.h +++ b/SmartCrop/tokenize.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - #pragma once #include diff --git a/SmartCrop/utils.cpp b/SmartCrop/utils.cpp index b9b1104..65b2fdb 100644 --- a/SmartCrop/utils.cpp +++ b/SmartCrop/utils.cpp @@ -1,23 +1,3 @@ -// -// 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 . -// - #include "utils.h" #include diff --git a/SmartCrop/utils.h b/SmartCrop/utils.h index ea13523..33a88df 100644 --- a/SmartCrop/utils.h +++ b/SmartCrop/utils.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - #pragma once #include diff --git a/SmartCrop/yolo.cpp b/SmartCrop/yolo.cpp index 531df96..cc32b89 100644 --- a/SmartCrop/yolo.cpp +++ b/SmartCrop/yolo.cpp @@ -1,23 +1,3 @@ -// -// 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 . -// - #include #include #include diff --git a/SmartCrop/yolo.h b/SmartCrop/yolo.h index 2977b99..8241f9a 100644 --- a/SmartCrop/yolo.h +++ b/SmartCrop/yolo.h @@ -1,22 +1,3 @@ -/* * 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 . - */ - #pragma once #include