mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
python3Packages.ultralytics: init at 8.3.85
This commit is contained in:
109
pkgs/development/python-modules/ultralytics/default.nix
Normal file
109
pkgs/development/python-modules/ultralytics/default.nix
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
|
||||
# dependencies
|
||||
scipy,
|
||||
matplotlib,
|
||||
opencv-python,
|
||||
pillow,
|
||||
pyyaml,
|
||||
requests,
|
||||
torch,
|
||||
torchvision,
|
||||
tqdm,
|
||||
psutil,
|
||||
py-cpuinfo,
|
||||
pandas,
|
||||
seaborn,
|
||||
ultralytics-thop,
|
||||
|
||||
# tests
|
||||
pytestCheckHook,
|
||||
onnx,
|
||||
onnxruntime,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ultralytics";
|
||||
version = "8.3.85";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ultralytics";
|
||||
repo = "ultralytics";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-4EiTiy4SNinNwIUvqbckaA/5YRcv6io8ssTAhwDVgsM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "numpy>=1.23.0,<=2.1.1" "numpy"
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
scipy
|
||||
matplotlib
|
||||
opencv-python
|
||||
pillow
|
||||
pyyaml
|
||||
requests
|
||||
scipy
|
||||
torch
|
||||
torchvision
|
||||
tqdm
|
||||
psutil
|
||||
py-cpuinfo
|
||||
pandas
|
||||
seaborn
|
||||
ultralytics-thop
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "ultralytics" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
onnx
|
||||
onnxruntime
|
||||
];
|
||||
|
||||
# rest of the tests require internet access
|
||||
pytestFlagsArray = [ "tests/test_python.py" ];
|
||||
|
||||
disabledTests = [
|
||||
# also remove the individual tests that require internet
|
||||
"test_model_methods"
|
||||
"test_predict_txt"
|
||||
"test_predict_img"
|
||||
"test_predict_visualize"
|
||||
"test_predict_grey_and_4ch"
|
||||
"test_val"
|
||||
"test_train_scratch"
|
||||
"test_train_pretrained"
|
||||
"test_all_model_yamls"
|
||||
"test_workflow"
|
||||
"test_predict_callback_and_setup"
|
||||
"test_results"
|
||||
"test_labels_and_crops"
|
||||
"test_data_annotator"
|
||||
"test_model_embeddings"
|
||||
"test_yolov10"
|
||||
"test_utils_torchutils"
|
||||
"test_yolo_world"
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/ultralytics/ultralytics";
|
||||
changelog = "https://github.com/ultralytics/ultralytics/releases/tag/v${version}";
|
||||
description = "Train YOLO models for computer vision tasks";
|
||||
mainProgram = "yolo";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [ osbm ];
|
||||
};
|
||||
}
|
||||
@@ -17934,6 +17934,8 @@ self: super: with self; {
|
||||
|
||||
ultraheat-api = callPackage ../development/python-modules/ultraheat-api { };
|
||||
|
||||
ultralytics = callPackage ../development/python-modules/ultralytics { };
|
||||
|
||||
ultralytics-thop = callPackage ../development/python-modules/ultralytics-thop { };
|
||||
|
||||
umalqurra = callPackage ../development/python-modules/umalqurra { };
|
||||
|
||||
Reference in New Issue
Block a user