summaryrefslogtreecommitdiff
path: root/python-classy-vision.spec
blob: 1ba14a36d1006d5ce2604d8b09109e559fd0d139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
%global _empty_manifest_terminate_build 0
Name:		python-classy-vision
Version:	0.7.0
Release:	1
Summary:	An end-to-end PyTorch framework for image and video classification.
License:	MIT License
URL:		https://classyvision.ai
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/32/70/b4c0a6404e0def2c10fb81ff338d98c6c3fdbe35419238418807605f3ea2/classy_vision-0.7.0.tar.gz
BuildArch:	noarch

Requires:	python3-fvcore
Requires:	python3-torch
Requires:	python3-torchvision
Requires:	python3-GitPython
Requires:	python3-black
Requires:	python3-sphinx
Requires:	python3-isort
Requires:	python3-bs4
Requires:	python3-nbconvert
Requires:	python3-pre-commit
Requires:	python3-parameterized
Requires:	python3-fairscale

%description
<p align="center"><img width="50%" src="website/static/img/cv-logo.png" /></p>
<p align="center">
 <a href="https://github.com/facebookresearch/ClassyVision/blob/main/LICENSE">
  <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license" />
 </a>
 <a href="https://circleci.com/gh/facebookresearch/ClassyVision">
  <img src="https://circleci.com/gh/facebookresearch/ClassyVision.svg?style=shield&circle-token=feeafa057f8d3f6c0c15dfd74db8dd596d9684c8" alt="CircleCI" />
 </a>
 <a href="https://github.com/facebookresearch/ClassyVision/blob/main/CONTRIBUTING.md">
  <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" />
 </a>
</p>

## Classy Vision is not longer actively maintained.

The latest stable version is 0.7.0 and is available on pip, and has been tested to work with Pytorch 2.0.

## What's New:

- March 2021: Added [RegNetZ models](https://arxiv.org/abs/2103.06877)
- November 2020: [Vision Transformers](https://openreview.net/forum?id=YicbFdNTTy) now available, with training [recipes](https://github.com/facebookresearch/ClassyVision/tree/main/examples/vit)!

<details>
 <summary><b>
  2020-11-20: Classy Vision v0.5 Released
 </b></summary>

#### New Features
- Release [Vision Transformers](https://openreview.net/forum?id=YicbFdNTTy) model implementation, with [recipes](https://github.com/facebookresearch/ClassyVision/tree/main/examples/vit)(#646)
- Implemented gradient clipping (#643)
- Implemented gradient accumulation (#644)
- Added support for [AdamW](https://arxiv.org/abs/1711.05101) (#636)
- Added Precise batch norm hook (#592)
- Added support for adaptive pooling in `fully_convolutional_linear_head` (#602)
- Added support for sync batch norm group size (#534)
- Added a CSV Hook to manually inspect model predictions
- Added a ClassyModel tutorial (#485)
- Migrated to [Hydra 1.0](https://github.com/facebookresearch/hydra) (#536)
- Migrated off of [tensorboardX](https://github.com/lanpa/tensorboardX) (#488)


#### Breaking Changes
- `ClassyOptimizer` API improvements
    - added `OptionsView` to retrieve options from the optimizer `param_group`
- Removed `ClassyModel.evaluation_mode` (#521)
- Removed `ImageNetDataset`, now a subset of `ImagePathDataset` (#494)
- Renamed `is_master` to `is_primary` in `distributed_util` (#576)

</details>

<details>
 <summary><b>
  2020-04-29: Classy Vision v0.4 Released
 </b></summary>

#### New Features
- Release [EfficientNet](https://arxiv.org/pdf/1905.11946.pdf) model implementation ([#475](https://github.com/facebookresearch/ClassyVision/pull/475))
- Add support to convert any `PyTorch` model to a `ClassyModel` with the ability to attach heads to it ([#461](https://github.com/facebookresearch/ClassyVision/pull/461))
  - Added a corresponding [tutorial](https://classyvision.ai/tutorials/classy_model) on `ClassyModel` and `ClassyHeads` ([#485](https://github.com/facebookresearch/ClassyVision/pull/485))
- [Squeeze and Excitation](https://arxiv.org/pdf/1709.01507.pdf) support for `ResNe(X)t` and `DenseNet` models ([#426](https://github.com/facebookresearch/ClassyVision/pull/426), [#427](https://github.com/facebookresearch/ClassyVision/pull/427))
- Made `ClassyHook`s registrable ([#401](https://github.com/facebookresearch/ClassyVision/pull/401)) and configurable ([#402](https://github.com/facebookresearch/ClassyVision/pull/402))
- Migrated to [`TorchElastic v0.2.0`](https://pytorch.org/elastic/master/examples.html#classy-vision) ([#464](https://github.com/facebookresearch/ClassyVision/pull/464))
- Add `SyncBatchNorm` support ([#423](https://github.com/facebookresearch/ClassyVision/pull/423))
- Implement [`mixup`](https://arxiv.org/abs/1710.09412) train augmentation ([#469](https://github.com/facebookresearch/ClassyVision/pull/469))
- Support [`LARC`](https://arxiv.org/abs/1708.03888) for SGD optimizer ([#408](https://github.com/facebookresearch/ClassyVision/pull/408))
- Added convenience wrappers for `Iterable` datasets ([#455](https://github.com/facebookresearch/ClassyVision/pull/455))
- `Tensorboard` improvements
  - Plot histograms of model weights to Tensorboard ([#432](https://github.com/facebookresearch/ClassyVision/pull/432))
  - Reduce data logged to tensorboard ([#436](https://github.com/facebookresearch/ClassyVision/pull/436))
- Invalid (`NaN` / `Inf`) loss detection
- Revamped logging ([#478](https://github.com/facebookresearch/ClassyVision/pull/478))
- Add `bn_weight_decay` configuration option for `ResNe(X)t` models
- Support specifying `update_interval` to Parameter Schedulers ([#418](https://github.com/facebookresearch/ClassyVision/pull/418))

#### Breaking changes
- `ClassificationTask` API improvement and `train_step`, `eval_step` simplification
  - Removed `local_variables` from `ClassificationTask` ([#411](https://github.com/facebookresearch/ClassyVision/pull/411), [#412](https://github.com/facebookresearch/ClassyVision/pull/412), [#413](https://github.com/facebookresearch/ClassyVision/pull/413), [#414](https://github.com/facebookresearch/ClassyVision/pull/414), [#416](https://github.com/facebookresearch/ClassyVision/pull/416), [#421](https://github.com/facebookresearch/ClassyVision/pull/421))
  - Move `use_gpu` from `ClassyTrainer` to `ClassificationTask` ([#468](https://github.com/facebookresearch/ClassyVision/pull/468))
  - Move `num_dataloader_workers` out of `ClassyTrainer` ([#477](https://github.com/facebookresearch/ClassyVision/pull/477))
- Rename `lr` to `value` in parameter schedulers ([#417](https://github.com/facebookresearch/ClassyVision/pull/417))
</details>

<details>
 <summary><b>
  2020-03-06: Classy Vision v0.3 Released
 </b></summary>

#### Release notes
 - `checkpoint_folder` renamed to `checkpoint_load_path` ([#379](https://github.com/facebookresearch/ClassyVision/pull/379))
 - head support on `DenseNet` ([#383](https://github.com/facebookresearch/ClassyVision/pull/383))
 - Cleaner abstraction in `ClassyTask`/`ClassyTrainer`: `eval_step`, `on_start`, `on_end`, …
 - Speed metrics in TB ([#385](https://github.com/facebookresearch/ClassyVision/pull/385))
 - `test_phase_period` in `ClassificationTask` ([#395](https://github.com/facebookresearch/ClassyVision/pull/395))
 - support for losses with trainable parameters ([#394](https://github.com/facebookresearch/ClassyVision/pull/394))
 - Added presets for some typical `ResNe(X)t` configurations: [#405](https://github.com/facebookresearch/ClassyVision/pull/405))
 </details>

## About

[Classy Vision](http://classyvision.ai) is a new end-to-end, PyTorch-based framework for large-scale training of state-of-the-art image and video classification models. Previous computer vision (CV) libraries have been focused on providing components for users to build their own frameworks for their research. While this approach offers flexibility for researchers, in production settings it leads to duplicative efforts, and requires users to migrate research between frameworks and to relearn the minutiae of efficient distributed training and data loading. Our PyTorch-based CV framework offers a better solution for training at scale and for deploying to production. It offers several notable advantages:

* Ease of use. The library features a modular, flexible design that allows anyone to train machine learning models on top of PyTorch using very simple abstractions. The system also has out-of-the-box integration with Amazon Web Services (AWS), facilitating research at scale and making it simple to move between research and production.
* High performance. Researchers can use the framework to train Resnet50 on ImageNet in as little as 15 minutes, for example.
* Demonstrated success in training at scale. We’ve used it to replicate the state-of-the-art results from the paper [Exploring the Limits of Weakly Supervised Pretraining](https://arxiv.org/abs/1805.00932).
* Integration with PyTorch Hub. AI researchers and engineers can download and fine-tune the best publically available ImageNet models with just a few lines of code.
* Elastic training. We have also added experimental integration with [PyTorch Elastic](https://github.com/pytorch/elastic), which allows distributed training jobs to adjust as available resources in the cluster changes. It also makes distributed training robust to transient hardware failures.

Classy Vision is beta software. The project is under active development and our APIs are subject to change in future releases.

## Installation

#### Installation Requirements
Make sure you have an up-to-date installation of PyTorch (1.6), Python (3.6) and torchvision (0.7). If you want to use GPUs, then a CUDA installation (10.1) is also required.

#### Installing the latest stable release
To install Classy Vision via pip:
```bash
pip install classy_vision
```

To install Classy Vision via conda (only works on linux):
```bash
conda install -c conda-forge classy_vision
```

#### Manual install of latest commit on main

Alternatively you can do a manual install.

```bash
git clone https://github.com/facebookresearch/ClassyVision.git
cd ClassyVision
pip install .
```

## Getting started

Classy Vision aims to support a variety of projects to be built and open sourced on top of the core library. We provide utilities for setting up a project in a standard format with some simple generated examples to get started with. To start a new project:

```bash
classy-project my-project
cd my-project
```

We even include a simple, synthetic, training example to show how to use Classy Vision:

```bash
 ./classy_train.py --config configs/template_config.json
 ```

Voila! A few seconds later your first training run using our classification task should be done. Check out the results in the output folder:
```bash
ls output_<timestamp>/checkpoints/
checkpoint.torch model_phase-0_end.torch model_phase-1_end.torch model_phase-2_end.torch model_phase-3_end.torch
```

`checkpoint.torch` is the latest model (in this case, same as `model_phase-3_end.torch`), a checkpoint is saved at the end of each phase.

For more details / tutorials see the documentation section below.

## Documentation

Please see our [tutorials](https://classyvision.ai/tutorials/) to learn how to get started on Classy Vision and customize your training runs. Full documentation is available [here](https://classyvision.ai/api/).

## Join the Classy Vision community
* Website: https://classyvision.ai
* [Stack overflow](https://stackoverflow.com/questions/tagged/classy-vision)
* Slack: [invite link](https://join.slack.com/t/classyvision/shared_invite/enQtODczNTEyOTUyNTY0LTc4YTc3NThhMzhiNGNjZTkzY2RkYjZiNDc1ZDcyZGYxY2Q0M2M5YjAyYjA4OGQ2M2FlNDk4YzBlNWRjOTg3ZTE)

See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.

## License
Classy Vision is MIT licensed, as found in the LICENSE file.

## Citing Classy Vision
If you use Classy Vision in your work, please use the following BibTeX entry:

```BibTeX
@misc{adcock2019classy,
  title={Classy Vision},
  author={{Adcock}, A. and {Reis}, V. and {Singh}, M. and {Yan}, Z. and {van der Maaten}, L. and {Zhang}, K. and {Motwani}, S. and {Guerin}, J. and {Goyal}, N. and {Misra}, I. and {Gustafson}, L. and {Changhan}, C. and {Goyal}, P.},
  howpublished = {\url{https://github.com/facebookresearch/ClassyVision}},
  year={2019}
}
```


%package -n python3-classy-vision
Summary:	An end-to-end PyTorch framework for image and video classification.
Provides:	python-classy-vision
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-classy-vision
<p align="center"><img width="50%" src="website/static/img/cv-logo.png" /></p>
<p align="center">
 <a href="https://github.com/facebookresearch/ClassyVision/blob/main/LICENSE">
  <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license" />
 </a>
 <a href="https://circleci.com/gh/facebookresearch/ClassyVision">
  <img src="https://circleci.com/gh/facebookresearch/ClassyVision.svg?style=shield&circle-token=feeafa057f8d3f6c0c15dfd74db8dd596d9684c8" alt="CircleCI" />
 </a>
 <a href="https://github.com/facebookresearch/ClassyVision/blob/main/CONTRIBUTING.md">
  <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" />
 </a>
</p>

## Classy Vision is not longer actively maintained.

The latest stable version is 0.7.0 and is available on pip, and has been tested to work with Pytorch 2.0.

## What's New:

- March 2021: Added [RegNetZ models](https://arxiv.org/abs/2103.06877)
- November 2020: [Vision Transformers](https://openreview.net/forum?id=YicbFdNTTy) now available, with training [recipes](https://github.com/facebookresearch/ClassyVision/tree/main/examples/vit)!

<details>
 <summary><b>
  2020-11-20: Classy Vision v0.5 Released
 </b></summary>

#### New Features
- Release [Vision Transformers](https://openreview.net/forum?id=YicbFdNTTy) model implementation, with [recipes](https://github.com/facebookresearch/ClassyVision/tree/main/examples/vit)(#646)
- Implemented gradient clipping (#643)
- Implemented gradient accumulation (#644)
- Added support for [AdamW](https://arxiv.org/abs/1711.05101) (#636)
- Added Precise batch norm hook (#592)
- Added support for adaptive pooling in `fully_convolutional_linear_head` (#602)
- Added support for sync batch norm group size (#534)
- Added a CSV Hook to manually inspect model predictions
- Added a ClassyModel tutorial (#485)
- Migrated to [Hydra 1.0](https://github.com/facebookresearch/hydra) (#536)
- Migrated off of [tensorboardX](https://github.com/lanpa/tensorboardX) (#488)


#### Breaking Changes
- `ClassyOptimizer` API improvements
    - added `OptionsView` to retrieve options from the optimizer `param_group`
- Removed `ClassyModel.evaluation_mode` (#521)
- Removed `ImageNetDataset`, now a subset of `ImagePathDataset` (#494)
- Renamed `is_master` to `is_primary` in `distributed_util` (#576)

</details>

<details>
 <summary><b>
  2020-04-29: Classy Vision v0.4 Released
 </b></summary>

#### New Features
- Release [EfficientNet](https://arxiv.org/pdf/1905.11946.pdf) model implementation ([#475](https://github.com/facebookresearch/ClassyVision/pull/475))
- Add support to convert any `PyTorch` model to a `ClassyModel` with the ability to attach heads to it ([#461](https://github.com/facebookresearch/ClassyVision/pull/461))
  - Added a corresponding [tutorial](https://classyvision.ai/tutorials/classy_model) on `ClassyModel` and `ClassyHeads` ([#485](https://github.com/facebookresearch/ClassyVision/pull/485))
- [Squeeze and Excitation](https://arxiv.org/pdf/1709.01507.pdf) support for `ResNe(X)t` and `DenseNet` models ([#426](https://github.com/facebookresearch/ClassyVision/pull/426), [#427](https://github.com/facebookresearch/ClassyVision/pull/427))
- Made `ClassyHook`s registrable ([#401](https://github.com/facebookresearch/ClassyVision/pull/401)) and configurable ([#402](https://github.com/facebookresearch/ClassyVision/pull/402))
- Migrated to [`TorchElastic v0.2.0`](https://pytorch.org/elastic/master/examples.html#classy-vision) ([#464](https://github.com/facebookresearch/ClassyVision/pull/464))
- Add `SyncBatchNorm` support ([#423](https://github.com/facebookresearch/ClassyVision/pull/423))
- Implement [`mixup`](https://arxiv.org/abs/1710.09412) train augmentation ([#469](https://github.com/facebookresearch/ClassyVision/pull/469))
- Support [`LARC`](https://arxiv.org/abs/1708.03888) for SGD optimizer ([#408](https://github.com/facebookresearch/ClassyVision/pull/408))
- Added convenience wrappers for `Iterable` datasets ([#455](https://github.com/facebookresearch/ClassyVision/pull/455))
- `Tensorboard` improvements
  - Plot histograms of model weights to Tensorboard ([#432](https://github.com/facebookresearch/ClassyVision/pull/432))
  - Reduce data logged to tensorboard ([#436](https://github.com/facebookresearch/ClassyVision/pull/436))
- Invalid (`NaN` / `Inf`) loss detection
- Revamped logging ([#478](https://github.com/facebookresearch/ClassyVision/pull/478))
- Add `bn_weight_decay` configuration option for `ResNe(X)t` models
- Support specifying `update_interval` to Parameter Schedulers ([#418](https://github.com/facebookresearch/ClassyVision/pull/418))

#### Breaking changes
- `ClassificationTask` API improvement and `train_step`, `eval_step` simplification
  - Removed `local_variables` from `ClassificationTask` ([#411](https://github.com/facebookresearch/ClassyVision/pull/411), [#412](https://github.com/facebookresearch/ClassyVision/pull/412), [#413](https://github.com/facebookresearch/ClassyVision/pull/413), [#414](https://github.com/facebookresearch/ClassyVision/pull/414), [#416](https://github.com/facebookresearch/ClassyVision/pull/416), [#421](https://github.com/facebookresearch/ClassyVision/pull/421))
  - Move `use_gpu` from `ClassyTrainer` to `ClassificationTask` ([#468](https://github.com/facebookresearch/ClassyVision/pull/468))
  - Move `num_dataloader_workers` out of `ClassyTrainer` ([#477](https://github.com/facebookresearch/ClassyVision/pull/477))
- Rename `lr` to `value` in parameter schedulers ([#417](https://github.com/facebookresearch/ClassyVision/pull/417))
</details>

<details>
 <summary><b>
  2020-03-06: Classy Vision v0.3 Released
 </b></summary>

#### Release notes
 - `checkpoint_folder` renamed to `checkpoint_load_path` ([#379](https://github.com/facebookresearch/ClassyVision/pull/379))
 - head support on `DenseNet` ([#383](https://github.com/facebookresearch/ClassyVision/pull/383))
 - Cleaner abstraction in `ClassyTask`/`ClassyTrainer`: `eval_step`, `on_start`, `on_end`, …
 - Speed metrics in TB ([#385](https://github.com/facebookresearch/ClassyVision/pull/385))
 - `test_phase_period` in `ClassificationTask` ([#395](https://github.com/facebookresearch/ClassyVision/pull/395))
 - support for losses with trainable parameters ([#394](https://github.com/facebookresearch/ClassyVision/pull/394))
 - Added presets for some typical `ResNe(X)t` configurations: [#405](https://github.com/facebookresearch/ClassyVision/pull/405))
 </details>

## About

[Classy Vision](http://classyvision.ai) is a new end-to-end, PyTorch-based framework for large-scale training of state-of-the-art image and video classification models. Previous computer vision (CV) libraries have been focused on providing components for users to build their own frameworks for their research. While this approach offers flexibility for researchers, in production settings it leads to duplicative efforts, and requires users to migrate research between frameworks and to relearn the minutiae of efficient distributed training and data loading. Our PyTorch-based CV framework offers a better solution for training at scale and for deploying to production. It offers several notable advantages:

* Ease of use. The library features a modular, flexible design that allows anyone to train machine learning models on top of PyTorch using very simple abstractions. The system also has out-of-the-box integration with Amazon Web Services (AWS), facilitating research at scale and making it simple to move between research and production.
* High performance. Researchers can use the framework to train Resnet50 on ImageNet in as little as 15 minutes, for example.
* Demonstrated success in training at scale. We’ve used it to replicate the state-of-the-art results from the paper [Exploring the Limits of Weakly Supervised Pretraining](https://arxiv.org/abs/1805.00932).
* Integration with PyTorch Hub. AI researchers and engineers can download and fine-tune the best publically available ImageNet models with just a few lines of code.
* Elastic training. We have also added experimental integration with [PyTorch Elastic](https://github.com/pytorch/elastic), which allows distributed training jobs to adjust as available resources in the cluster changes. It also makes distributed training robust to transient hardware failures.

Classy Vision is beta software. The project is under active development and our APIs are subject to change in future releases.

## Installation

#### Installation Requirements
Make sure you have an up-to-date installation of PyTorch (1.6), Python (3.6) and torchvision (0.7). If you want to use GPUs, then a CUDA installation (10.1) is also required.

#### Installing the latest stable release
To install Classy Vision via pip:
```bash
pip install classy_vision
```

To install Classy Vision via conda (only works on linux):
```bash
conda install -c conda-forge classy_vision
```

#### Manual install of latest commit on main

Alternatively you can do a manual install.

```bash
git clone https://github.com/facebookresearch/ClassyVision.git
cd ClassyVision
pip install .
```

## Getting started

Classy Vision aims to support a variety of projects to be built and open sourced on top of the core library. We provide utilities for setting up a project in a standard format with some simple generated examples to get started with. To start a new project:

```bash
classy-project my-project
cd my-project
```

We even include a simple, synthetic, training example to show how to use Classy Vision:

```bash
 ./classy_train.py --config configs/template_config.json
 ```

Voila! A few seconds later your first training run using our classification task should be done. Check out the results in the output folder:
```bash
ls output_<timestamp>/checkpoints/
checkpoint.torch model_phase-0_end.torch model_phase-1_end.torch model_phase-2_end.torch model_phase-3_end.torch
```

`checkpoint.torch` is the latest model (in this case, same as `model_phase-3_end.torch`), a checkpoint is saved at the end of each phase.

For more details / tutorials see the documentation section below.

## Documentation

Please see our [tutorials](https://classyvision.ai/tutorials/) to learn how to get started on Classy Vision and customize your training runs. Full documentation is available [here](https://classyvision.ai/api/).

## Join the Classy Vision community
* Website: https://classyvision.ai
* [Stack overflow](https://stackoverflow.com/questions/tagged/classy-vision)
* Slack: [invite link](https://join.slack.com/t/classyvision/shared_invite/enQtODczNTEyOTUyNTY0LTc4YTc3NThhMzhiNGNjZTkzY2RkYjZiNDc1ZDcyZGYxY2Q0M2M5YjAyYjA4OGQ2M2FlNDk4YzBlNWRjOTg3ZTE)

See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.

## License
Classy Vision is MIT licensed, as found in the LICENSE file.

## Citing Classy Vision
If you use Classy Vision in your work, please use the following BibTeX entry:

```BibTeX
@misc{adcock2019classy,
  title={Classy Vision},
  author={{Adcock}, A. and {Reis}, V. and {Singh}, M. and {Yan}, Z. and {van der Maaten}, L. and {Zhang}, K. and {Motwani}, S. and {Guerin}, J. and {Goyal}, N. and {Misra}, I. and {Gustafson}, L. and {Changhan}, C. and {Goyal}, P.},
  howpublished = {\url{https://github.com/facebookresearch/ClassyVision}},
  year={2019}
}
```


%package help
Summary:	Development documents and examples for classy-vision
Provides:	python3-classy-vision-doc
%description help
<p align="center"><img width="50%" src="website/static/img/cv-logo.png" /></p>
<p align="center">
 <a href="https://github.com/facebookresearch/ClassyVision/blob/main/LICENSE">
  <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license" />
 </a>
 <a href="https://circleci.com/gh/facebookresearch/ClassyVision">
  <img src="https://circleci.com/gh/facebookresearch/ClassyVision.svg?style=shield&circle-token=feeafa057f8d3f6c0c15dfd74db8dd596d9684c8" alt="CircleCI" />
 </a>
 <a href="https://github.com/facebookresearch/ClassyVision/blob/main/CONTRIBUTING.md">
  <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" />
 </a>
</p>

## Classy Vision is not longer actively maintained.

The latest stable version is 0.7.0 and is available on pip, and has been tested to work with Pytorch 2.0.

## What's New:

- March 2021: Added [RegNetZ models](https://arxiv.org/abs/2103.06877)
- November 2020: [Vision Transformers](https://openreview.net/forum?id=YicbFdNTTy) now available, with training [recipes](https://github.com/facebookresearch/ClassyVision/tree/main/examples/vit)!

<details>
 <summary><b>
  2020-11-20: Classy Vision v0.5 Released
 </b></summary>

#### New Features
- Release [Vision Transformers](https://openreview.net/forum?id=YicbFdNTTy) model implementation, with [recipes](https://github.com/facebookresearch/ClassyVision/tree/main/examples/vit)(#646)
- Implemented gradient clipping (#643)
- Implemented gradient accumulation (#644)
- Added support for [AdamW](https://arxiv.org/abs/1711.05101) (#636)
- Added Precise batch norm hook (#592)
- Added support for adaptive pooling in `fully_convolutional_linear_head` (#602)
- Added support for sync batch norm group size (#534)
- Added a CSV Hook to manually inspect model predictions
- Added a ClassyModel tutorial (#485)
- Migrated to [Hydra 1.0](https://github.com/facebookresearch/hydra) (#536)
- Migrated off of [tensorboardX](https://github.com/lanpa/tensorboardX) (#488)


#### Breaking Changes
- `ClassyOptimizer` API improvements
    - added `OptionsView` to retrieve options from the optimizer `param_group`
- Removed `ClassyModel.evaluation_mode` (#521)
- Removed `ImageNetDataset`, now a subset of `ImagePathDataset` (#494)
- Renamed `is_master` to `is_primary` in `distributed_util` (#576)

</details>

<details>
 <summary><b>
  2020-04-29: Classy Vision v0.4 Released
 </b></summary>

#### New Features
- Release [EfficientNet](https://arxiv.org/pdf/1905.11946.pdf) model implementation ([#475](https://github.com/facebookresearch/ClassyVision/pull/475))
- Add support to convert any `PyTorch` model to a `ClassyModel` with the ability to attach heads to it ([#461](https://github.com/facebookresearch/ClassyVision/pull/461))
  - Added a corresponding [tutorial](https://classyvision.ai/tutorials/classy_model) on `ClassyModel` and `ClassyHeads` ([#485](https://github.com/facebookresearch/ClassyVision/pull/485))
- [Squeeze and Excitation](https://arxiv.org/pdf/1709.01507.pdf) support for `ResNe(X)t` and `DenseNet` models ([#426](https://github.com/facebookresearch/ClassyVision/pull/426), [#427](https://github.com/facebookresearch/ClassyVision/pull/427))
- Made `ClassyHook`s registrable ([#401](https://github.com/facebookresearch/ClassyVision/pull/401)) and configurable ([#402](https://github.com/facebookresearch/ClassyVision/pull/402))
- Migrated to [`TorchElastic v0.2.0`](https://pytorch.org/elastic/master/examples.html#classy-vision) ([#464](https://github.com/facebookresearch/ClassyVision/pull/464))
- Add `SyncBatchNorm` support ([#423](https://github.com/facebookresearch/ClassyVision/pull/423))
- Implement [`mixup`](https://arxiv.org/abs/1710.09412) train augmentation ([#469](https://github.com/facebookresearch/ClassyVision/pull/469))
- Support [`LARC`](https://arxiv.org/abs/1708.03888) for SGD optimizer ([#408](https://github.com/facebookresearch/ClassyVision/pull/408))
- Added convenience wrappers for `Iterable` datasets ([#455](https://github.com/facebookresearch/ClassyVision/pull/455))
- `Tensorboard` improvements
  - Plot histograms of model weights to Tensorboard ([#432](https://github.com/facebookresearch/ClassyVision/pull/432))
  - Reduce data logged to tensorboard ([#436](https://github.com/facebookresearch/ClassyVision/pull/436))
- Invalid (`NaN` / `Inf`) loss detection
- Revamped logging ([#478](https://github.com/facebookresearch/ClassyVision/pull/478))
- Add `bn_weight_decay` configuration option for `ResNe(X)t` models
- Support specifying `update_interval` to Parameter Schedulers ([#418](https://github.com/facebookresearch/ClassyVision/pull/418))

#### Breaking changes
- `ClassificationTask` API improvement and `train_step`, `eval_step` simplification
  - Removed `local_variables` from `ClassificationTask` ([#411](https://github.com/facebookresearch/ClassyVision/pull/411), [#412](https://github.com/facebookresearch/ClassyVision/pull/412), [#413](https://github.com/facebookresearch/ClassyVision/pull/413), [#414](https://github.com/facebookresearch/ClassyVision/pull/414), [#416](https://github.com/facebookresearch/ClassyVision/pull/416), [#421](https://github.com/facebookresearch/ClassyVision/pull/421))
  - Move `use_gpu` from `ClassyTrainer` to `ClassificationTask` ([#468](https://github.com/facebookresearch/ClassyVision/pull/468))
  - Move `num_dataloader_workers` out of `ClassyTrainer` ([#477](https://github.com/facebookresearch/ClassyVision/pull/477))
- Rename `lr` to `value` in parameter schedulers ([#417](https://github.com/facebookresearch/ClassyVision/pull/417))
</details>

<details>
 <summary><b>
  2020-03-06: Classy Vision v0.3 Released
 </b></summary>

#### Release notes
 - `checkpoint_folder` renamed to `checkpoint_load_path` ([#379](https://github.com/facebookresearch/ClassyVision/pull/379))
 - head support on `DenseNet` ([#383](https://github.com/facebookresearch/ClassyVision/pull/383))
 - Cleaner abstraction in `ClassyTask`/`ClassyTrainer`: `eval_step`, `on_start`, `on_end`, …
 - Speed metrics in TB ([#385](https://github.com/facebookresearch/ClassyVision/pull/385))
 - `test_phase_period` in `ClassificationTask` ([#395](https://github.com/facebookresearch/ClassyVision/pull/395))
 - support for losses with trainable parameters ([#394](https://github.com/facebookresearch/ClassyVision/pull/394))
 - Added presets for some typical `ResNe(X)t` configurations: [#405](https://github.com/facebookresearch/ClassyVision/pull/405))
 </details>

## About

[Classy Vision](http://classyvision.ai) is a new end-to-end, PyTorch-based framework for large-scale training of state-of-the-art image and video classification models. Previous computer vision (CV) libraries have been focused on providing components for users to build their own frameworks for their research. While this approach offers flexibility for researchers, in production settings it leads to duplicative efforts, and requires users to migrate research between frameworks and to relearn the minutiae of efficient distributed training and data loading. Our PyTorch-based CV framework offers a better solution for training at scale and for deploying to production. It offers several notable advantages:

* Ease of use. The library features a modular, flexible design that allows anyone to train machine learning models on top of PyTorch using very simple abstractions. The system also has out-of-the-box integration with Amazon Web Services (AWS), facilitating research at scale and making it simple to move between research and production.
* High performance. Researchers can use the framework to train Resnet50 on ImageNet in as little as 15 minutes, for example.
* Demonstrated success in training at scale. We’ve used it to replicate the state-of-the-art results from the paper [Exploring the Limits of Weakly Supervised Pretraining](https://arxiv.org/abs/1805.00932).
* Integration with PyTorch Hub. AI researchers and engineers can download and fine-tune the best publically available ImageNet models with just a few lines of code.
* Elastic training. We have also added experimental integration with [PyTorch Elastic](https://github.com/pytorch/elastic), which allows distributed training jobs to adjust as available resources in the cluster changes. It also makes distributed training robust to transient hardware failures.

Classy Vision is beta software. The project is under active development and our APIs are subject to change in future releases.

## Installation

#### Installation Requirements
Make sure you have an up-to-date installation of PyTorch (1.6), Python (3.6) and torchvision (0.7). If you want to use GPUs, then a CUDA installation (10.1) is also required.

#### Installing the latest stable release
To install Classy Vision via pip:
```bash
pip install classy_vision
```

To install Classy Vision via conda (only works on linux):
```bash
conda install -c conda-forge classy_vision
```

#### Manual install of latest commit on main

Alternatively you can do a manual install.

```bash
git clone https://github.com/facebookresearch/ClassyVision.git
cd ClassyVision
pip install .
```

## Getting started

Classy Vision aims to support a variety of projects to be built and open sourced on top of the core library. We provide utilities for setting up a project in a standard format with some simple generated examples to get started with. To start a new project:

```bash
classy-project my-project
cd my-project
```

We even include a simple, synthetic, training example to show how to use Classy Vision:

```bash
 ./classy_train.py --config configs/template_config.json
 ```

Voila! A few seconds later your first training run using our classification task should be done. Check out the results in the output folder:
```bash
ls output_<timestamp>/checkpoints/
checkpoint.torch model_phase-0_end.torch model_phase-1_end.torch model_phase-2_end.torch model_phase-3_end.torch
```

`checkpoint.torch` is the latest model (in this case, same as `model_phase-3_end.torch`), a checkpoint is saved at the end of each phase.

For more details / tutorials see the documentation section below.

## Documentation

Please see our [tutorials](https://classyvision.ai/tutorials/) to learn how to get started on Classy Vision and customize your training runs. Full documentation is available [here](https://classyvision.ai/api/).

## Join the Classy Vision community
* Website: https://classyvision.ai
* [Stack overflow](https://stackoverflow.com/questions/tagged/classy-vision)
* Slack: [invite link](https://join.slack.com/t/classyvision/shared_invite/enQtODczNTEyOTUyNTY0LTc4YTc3NThhMzhiNGNjZTkzY2RkYjZiNDc1ZDcyZGYxY2Q0M2M5YjAyYjA4OGQ2M2FlNDk4YzBlNWRjOTg3ZTE)

See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.

## License
Classy Vision is MIT licensed, as found in the LICENSE file.

## Citing Classy Vision
If you use Classy Vision in your work, please use the following BibTeX entry:

```BibTeX
@misc{adcock2019classy,
  title={Classy Vision},
  author={{Adcock}, A. and {Reis}, V. and {Singh}, M. and {Yan}, Z. and {van der Maaten}, L. and {Zhang}, K. and {Motwani}, S. and {Guerin}, J. and {Goyal}, N. and {Misra}, I. and {Gustafson}, L. and {Changhan}, C. and {Goyal}, P.},
  howpublished = {\url{https://github.com/facebookresearch/ClassyVision}},
  year={2019}
}
```


%prep
%autosetup -n classy-vision-0.7.0

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-classy-vision -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.7.0-1
- Package Spec generated