{ "info": { "author": "Ruslan Baikulov", "author_email": "ruslan1123@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Argus \n\nArgus is easy-to-use flexible library for training neural networks in PyTorch.\n\n## Installation\n\nFrom pip:\n\n```bash\npip install pytorch-argus\n```\n\nFrom source:\n\n```bash\ngit clone https://github.com/lRomul/argus\ncd argus\npython setup.py install\n```\n\n## Examples\n\nSimple image classification example:\n\n```python\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom mnist_utils import get_data_loaders\n\nfrom argus import Model, load_model\nfrom argus.callbacks import MonitorCheckpoint, EarlyStopping, ReduceLROnPlateau\n\n\nclass Net(nn.Module):\n def __init__(self, n_classes, p_dropout=0.5):\n super().__init__()\n self.conv1 = nn.Conv2d(1, 10, kernel_size=5)\n self.conv2 = nn.Conv2d(10, 20, kernel_size=5)\n self.conv2_drop = nn.Dropout2d(p=p_dropout)\n self.fc1 = nn.Linear(320, 50)\n self.fc2 = nn.Linear(50, n_classes)\n\n def forward(self, x):\n x = F.relu(F.max_pool2d(self.conv1(x), 2))\n x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))\n x = x.view(-1, 320)\n x = F.relu(self.fc1(x))\n x = F.dropout(x, training=self.training)\n x = self.fc2(x)\n return x\n\n\nclass MnistModel(Model):\n nn_module = Net\n optimizer = torch.optim.SGD\n loss = torch.nn.CrossEntropyLoss\n\n\nif __name__ == \"__main__\":\n train_loader, val_loader = get_data_loaders()\n\n params = {\n 'nn_module': {'n_classes': 10, 'p_dropout': 0.1},\n 'optimizer': {'lr': 0.01},\n 'device': 'cpu'\n }\n\n model = MnistModel(params)\n\n callbacks = [\n MonitorCheckpoint(dir_path='mnist', monitor='val_accuracy', max_saves=3),\n EarlyStopping(monitor='val_accuracy', patience=9),\n ReduceLROnPlateau(monitor='val_accuracy', factor=0.5, patience=3)\n ]\n\n model.fit(train_loader,\n val_loader=val_loader,\n max_epochs=50,\n metrics=['accuracy'],\n callbacks=callbacks,\n metrics_on_train=True)\n\n del model\n model = load_model('mnist/model-last.pth')\n```\n\nUse Argus with `make_model` from [pytorch-cnn-finetune](https://github.com/creafz/pytorch-cnn-finetune).\n\n```python\nfrom cnn_finetune import make_model\nfrom argus import Model\n\nclass CnnFinetune(Model):\n nn_module = make_model\n\n\nparams = {\n 'nn_module': {\n 'model_name': 'resnet18',\n 'num_classes': 10,\n 'pretrained': False,\n 'input_size': (256, 256)\n },\n 'optimizer': ('Adam', {'lr': 0.01}),\n 'loss': 'CrossEntropyLoss',\n 'device': 'cuda'\n}\n\nmodel = CnnFinetune(params)\n```\n\nYou can find other examples [here](examples). \n\n## Kaggle solutions \n\n1. 1st place solution for Freesound Audio Tagging 2019 (mel-spectrograms, mixed precision training with Apex) \n[https://github.com/lRomul/argus-freesound](https://github.com/lRomul/argus-freesound/blob/master/src/argus_models.py)\n2. 14th place solution for TGS Salt Identification Challenge (segmentation, MeanTeacher) \n[https://github.com/lRomul/argus-tgs-salt](https://github.com/lRomul/argus-tgs-salt/blob/master/src/argus_models.py)\n3. 50th place solution for Quick, Draw! Doodle Recognition Challenge (gradient accumulation, training on 50M images) \n[https://github.com/lRomul/argus-quick-draw](https://github.com/lRomul/argus-quick-draw/blob/master/src/argus_models.py)\n4. 66th place solution for Kaggle Airbus Ship Detection Challenge (instance segmentation) \n[https://github.com/OniroAI/Universal-segmentation-baseline-Kaggle-Airbus-Ship-Detection](https://github.com/OniroAI/Universal-segmentation-baseline-Kaggle-Airbus-Ship-Detection)\n5. Solution for Humpback Whale Identification (metric learning: arcface, center loss) \n[https://github.com/lRomul/argus-humpback-whale](https://github.com/lRomul/argus-humpback-whale/blob/master/src/argus_models.py)\n6. Solution for VSB Power Line Fault Detection (1d conv) \n[https://github.com/lRomul/argus-vsb-power](https://github.com/lRomul/argus-vsb-power/blob/master/src/argus_models.py)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lRomul/argus", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytorch-argus", "package_url": "https://pypi.org/project/pytorch-argus/", "platform": "", "project_url": "https://pypi.org/project/pytorch-argus/", "project_urls": { "Homepage": "https://github.com/lRomul/argus" }, "release_url": "https://pypi.org/project/pytorch-argus/0.0.9/", "requires_dist": [ "torch (>=0.4.1)" ], "requires_python": ">=3.6", "summary": "Easy high-level library for training neural networks in PyTorch.", "version": "0.0.9" }, "last_serial": 5710164, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "ce690d2f1e61212ff9fddd1226c0f1f9", "sha256": "3f6dd2b47199ec399b0b5cab55936b455daea7d64454ff7ca72bfac0cdbcfd6d" }, "downloads": -1, "filename": "pytorch_argus-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ce690d2f1e61212ff9fddd1226c0f1f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 9697, "upload_time": "2018-07-18T16:27:56", "url": "https://files.pythonhosted.org/packages/14/68/09ef3d251188d6a6a9157aabfe9aa8fc76372877552483966385687cb3fd/pytorch_argus-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7fdfcaf5b51c0726c370df6f3c2b43e2", "sha256": "e6a77c3f496f39cb433d151d5455d2bdd1cf7990159f93fdc46c6112309435bb" }, "downloads": -1, "filename": "pytorch-argus-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7fdfcaf5b51c0726c370df6f3c2b43e2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7290, "upload_time": "2018-07-18T16:27:57", "url": "https://files.pythonhosted.org/packages/0d/c5/eb4a3e6486be8716b4dab673c87f5c52d87481c3bc5adf649a20ab1858ea/pytorch-argus-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "6578ffa6b1e52478ac9d717b3699d549", "sha256": "7d1f2d3d1cc194081e93ba72634095bb2bf23139137c695c9cc4f27b34eca8db" }, "downloads": -1, "filename": "pytorch_argus-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6578ffa6b1e52478ac9d717b3699d549", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14970, "upload_time": "2018-07-30T23:07:08", "url": "https://files.pythonhosted.org/packages/8d/29/babc2e880d18a5fb6f46429b088fdcedb416f0edb84d819372cc497faebf/pytorch_argus-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "abb31fa6a023012a32acc42e64faeb66", "sha256": "c6cb869e66fde92eaf12a37ae32d915844e19a9d5948259241679539ee90d38a" }, "downloads": -1, "filename": "pytorch-argus-0.0.3.tar.gz", "has_sig": false, "md5_digest": "abb31fa6a023012a32acc42e64faeb66", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10129, "upload_time": "2018-07-30T23:07:09", "url": "https://files.pythonhosted.org/packages/9d/ea/c0c44a838fafc5f3fe946ce778006107b9b355c2a416a26003d923b8077f/pytorch-argus-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "0ef200844f75935ace26fefc4059e219", "sha256": "f3b9eb59b873ccf3ef724cb8c0d566f00f65bb49bdfdd1b9010df5127949afa5" }, "downloads": -1, "filename": "pytorch_argus-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "0ef200844f75935ace26fefc4059e219", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 15051, "upload_time": "2018-08-09T21:31:45", "url": "https://files.pythonhosted.org/packages/aa/98/b672b82f5b86f36802d3304d0def1f02b6b3bde58587fbb2fa4cb19c02c7/pytorch_argus-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c4aeb2b3b2e5fa2076a3dc6be918ded", "sha256": "4afd732a869baf5109ada37831d32b0ff415407586f5910f45f9e42de15e0ea8" }, "downloads": -1, "filename": "pytorch-argus-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9c4aeb2b3b2e5fa2076a3dc6be918ded", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10214, "upload_time": "2018-08-09T21:31:46", "url": "https://files.pythonhosted.org/packages/cb/05/ec854dadd5c1e11f4bf9d26280b1da164c0f749262285df9893a7673ee98/pytorch-argus-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "c6a378447b304dd682d734083b856f3c", "sha256": "051af999185f8ef740f13f5bd7a2b71e3ba67c57a99efe940c1ebe1dae7fd9a7" }, "downloads": -1, "filename": "pytorch_argus-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "c6a378447b304dd682d734083b856f3c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 15074, "upload_time": "2018-09-06T09:37:15", "url": "https://files.pythonhosted.org/packages/86/4c/72c7b5e2a825b44c6069fd3d1892b31dddd612bc9294cd28124dd4485d45/pytorch_argus-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2197de6074bb26dcbe50849b7bc8a0e9", "sha256": "58ea8e16ad3190f61432a24226e985205fe2a621c2c8b5aaa15cb860e5ffff02" }, "downloads": -1, "filename": "pytorch-argus-0.0.5.tar.gz", "has_sig": false, "md5_digest": "2197de6074bb26dcbe50849b7bc8a0e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 11662, "upload_time": "2018-09-06T09:37:17", "url": "https://files.pythonhosted.org/packages/71/08/83b5206dbb970e8f1b63ae2e0b80e9a1627a0feab4a270226fc59ed21bf9/pytorch-argus-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "d67f3e68b53fc92c25a4b36714cf22e9", "sha256": "0960615d5ed4e77e6969f3a89637b9f91437cfcba59602c2fbc4990414c4fd27" }, "downloads": -1, "filename": "pytorch_argus-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "d67f3e68b53fc92c25a4b36714cf22e9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 17052, "upload_time": "2018-11-01T11:53:35", "url": "https://files.pythonhosted.org/packages/b0/a0/21e8b5ef47e510063220e98ee87d3de4072cdc19cad838948949f0dc8d9b/pytorch_argus-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a4a8f021f772a78b015a356107334f7a", "sha256": "cdac0dd805ca7608dabb06e69399821575a6606e065841648cf68740dd46f3c0" }, "downloads": -1, "filename": "pytorch-argus-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a4a8f021f772a78b015a356107334f7a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 11135, "upload_time": "2018-11-01T11:53:37", "url": "https://files.pythonhosted.org/packages/f8/48/38c7f796021aaa5d4d6d5c86375baf97b49a35c15777143ffe37186b5dad/pytorch-argus-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "664c27cec874ee513fe073dd8caaf823", "sha256": "e6a19a46f63a11d858e734e45e52b9408663d7d76d01bf618f8ebec0eb3518b5" }, "downloads": -1, "filename": "pytorch_argus-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "664c27cec874ee513fe073dd8caaf823", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 17178, "upload_time": "2018-11-07T11:20:16", "url": "https://files.pythonhosted.org/packages/ac/a5/00b320cf487257e0852652ef14d5635a911b7ced2ca90550f7aca226e42a/pytorch_argus-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2d12392c1b472d3ce92cacdf96c102b", "sha256": "c9ff99b41cf9f79fa47400f6f2212dbca0da4fe4cbfdc782fb2e864a6fdc6757" }, "downloads": -1, "filename": "pytorch-argus-0.0.7.tar.gz", "has_sig": false, "md5_digest": "e2d12392c1b472d3ce92cacdf96c102b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12996, "upload_time": "2018-11-07T11:20:17", "url": "https://files.pythonhosted.org/packages/09/f7/f498d63a0b1ae003e817cb301551f712ccc3bf53db31522f5708c6d5a025/pytorch-argus-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "2060982a17acc14acc8d72bb3cd65789", "sha256": "7d1d050336bac350b21d5191cda9a174ce435117869b60d739a636089cb64745" }, "downloads": -1, "filename": "pytorch_argus-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "2060982a17acc14acc8d72bb3cd65789", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 17716, "upload_time": "2019-01-14T16:17:42", "url": "https://files.pythonhosted.org/packages/67/ed/42ba507a11f209b56e8a49d6b162ec6a1dbd15de41dedb999ff14c5231c2/pytorch_argus-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c9491fa9f89a9322c4fc762871034f1e", "sha256": "e21db69c3bfd8d22c04d0c4ddffd80fdfe07bed52caad14915e85614ea80de4a" }, "downloads": -1, "filename": "pytorch-argus-0.0.8.tar.gz", "has_sig": false, "md5_digest": "c9491fa9f89a9322c4fc762871034f1e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 13517, "upload_time": "2019-01-14T16:17:44", "url": "https://files.pythonhosted.org/packages/2b/19/f68ed65d7f8883ccd0fe1d3c244ef0d75c63579ac576aa87004c121d3f5b/pytorch-argus-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "6d02035ebceacada91f7314eeb4fe50a", "sha256": "b53aad71a63be3952c146cb7f551d044fb0aee5a274b79c811f31399c1676604" }, "downloads": -1, "filename": "pytorch_argus-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "6d02035ebceacada91f7314eeb4fe50a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 18589, "upload_time": "2019-08-21T14:49:08", "url": "https://files.pythonhosted.org/packages/2d/d2/12ef0f8138b8254cd12f6c00d397a37aead713b864556ea7927e6b0e0d94/pytorch_argus-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0d9e1d3c030db3305e9f53f9a07a334", "sha256": "cbd6c54633151ec863d263d541ec9f32f1eb59e07c666a43dff84b98431cb49a" }, "downloads": -1, "filename": "pytorch-argus-0.0.9.tar.gz", "has_sig": false, "md5_digest": "f0d9e1d3c030db3305e9f53f9a07a334", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 14262, "upload_time": "2019-08-21T14:49:10", "url": "https://files.pythonhosted.org/packages/80/d6/e18e301a6e75a3a849cd638e2aacb65f02fe38f3815c211251fa42766e32/pytorch-argus-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6d02035ebceacada91f7314eeb4fe50a", "sha256": "b53aad71a63be3952c146cb7f551d044fb0aee5a274b79c811f31399c1676604" }, "downloads": -1, "filename": "pytorch_argus-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "6d02035ebceacada91f7314eeb4fe50a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 18589, "upload_time": "2019-08-21T14:49:08", "url": "https://files.pythonhosted.org/packages/2d/d2/12ef0f8138b8254cd12f6c00d397a37aead713b864556ea7927e6b0e0d94/pytorch_argus-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0d9e1d3c030db3305e9f53f9a07a334", "sha256": "cbd6c54633151ec863d263d541ec9f32f1eb59e07c666a43dff84b98431cb49a" }, "downloads": -1, "filename": "pytorch-argus-0.0.9.tar.gz", "has_sig": false, "md5_digest": "f0d9e1d3c030db3305e9f53f9a07a334", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 14262, "upload_time": "2019-08-21T14:49:10", "url": "https://files.pythonhosted.org/packages/80/d6/e18e301a6e75a3a849cd638e2aacb65f02fe38f3815c211251fa42766e32/pytorch-argus-0.0.9.tar.gz" } ] }