固安建设网站潍坊网站制作熊掌号
- 作者: 五速梦信息网
- 时间: 2026年04月20日 11:08
当前位置: 首页 > news >正文
固安建设网站,潍坊网站制作熊掌号,鸿星尔克网络营销,服务器网站部署这周闲来无事#xff0c;看到一篇前不久刚发表的文章#xff0c;是做密集人群密度估计的#xff0c;这块我之前虽然也做过#xff0c;但是主要是基于检测的方式实现的#xff0c;这里提出来的方法还是比较有意思的#xff0c;就拿来实践一下。论文在这里#xff0c;感兴…这周闲来无事看到一篇前不久刚发表的文章是做密集人群密度估计的这块我之前虽然也做过但是主要是基于检测的方式实现的这里提出来的方法还是比较有意思的就拿来实践一下。论文在这里感兴趣可以看下。可以看到还是很有意思的。这里使用的是jhu_crowd_v2.0数据集如下以train为例如下所示images目录如下所示gt目录如下所示实例标注数据如下166 228 22 27 1 0 414 218 11 15 1 0 541 232 14 14 1 0 353 213 11 15 1 0 629 222 14 14 1 0 497 243 39 43 1 0 468 222 11 15 1 0 448 227 11 15 1 0 737 220 39 43 1 0 188 228 33 30 1 0 72 198 22 27 1 0 371 214 11 15 1 0 362 242 24 32 1 0 606 260 39 43 1 0 74 228 22 27 1 0 597 226 14 14 1 0 576 213 14 14 1 0数据集详情如下 This file contains information about the JHU-CROWD (v2.0) dataset. —————————————————————————————————– INTRODUCTION —————————————————————————————————–JHU-CROWD is a comprehensive dataset with 4,372 images and 1.51 million annotations. In comparison to existing datasets, the proposed dataset is collected under a variety of diverse scenarios and environmental conditions. In addition, the dataset provides comparatively richer set of annotations like dots, approximate bounding boxes, blur levels, etc.—————————————————————————————————–
DIRECTORY INFO
- The dataset directory contains 3 sub-directories: train, val and test.2. Each of these contain 2 sub-directories (images, gt) and a file image_labels.txt.3. The images directory contains images and the gt directory contains ground-truth files corresponding to the images in the images directory.4. The number of samples in train, val and test split are 2272, 500, 1600 respectively.—————————————————————————————————– GROUND-TRUTH ANNOTATIONS: HEAD-LEVEL —————————————————————————————————–
- Each ground-truth file in the gt directory contains space separated values with each row inidacting x,y,w,h,o,b 2. x,y indicate the head location.3. w,h indicate approximate width and height of the head.4. o indicates occlusion-level and it can take 3 possible values: 1,2,3. o1 indicates visibleo2 indicates partial-occlusiono3 indicates full-occlusion5. b indicates blur-level and it can take 2 possible values: 0,1. b0 indicates no-blur b1 indicates blur—————————————————————————————————– GROUND-TRUTH ANNOTATIONS: IMAGE-LEVEL —————————————————————————————————–
- Each split in the dataset contains a file image_labels.txt. This file contains image-level labels.2. The values in the file are comma separated and each row indicates: filename, total-count, scene-type, weather-condition, distractor3. total-count indicates the total number of people in the image4. scene-type is an image-level label describing the scene5. weather-condition indicates the weather-degradation in the image and can take 4 values: 0,1,2,3weather-condition0 indicates no weather degradationweather-condition1 indicates fog/hazeweather-condition2 indicates rainweather-condition3 indicates snow6. distractor indicates if the image is a distractor. It can take 2 values: 0,1distractor0 indicates not a distractordistractor1 indicates distractor—————————————————————————————————– CITATION —————————————————————————————————– If you find this dataset useful, please consider citing the following work:inproceedings{sindagi2019pushing, title{Pushing the frontiers of unconstrained crowd counting: New dataset and benchmark method}, author{Sindagi, Vishwanath A and Yasarla, Rajeev and Patel, Vishal M}, booktitle{Proceedings of the IEEE International Conference on Computer Vision}, pages{1221–1231}, year{2019} }article{sindagi2020jhu-crowd, title{JHU-CROWD: Large-Scale Crowd Counting Dataset and A Benchmark Method}, author{Sindagi, Vishwanath A and Yasarla, Rajeev and Patel, Vishal M}, journal{Tech Report}, year{2020} }—————————————————————————————————– LICENSE —————————————————————————————————– This dataset is for academic and non-commercial uses (such as academic research, teaching, scientific publications, or personal experimentation). All images of the JHU-CROWD are obtained from the Internet which are not property of VIU-Lab, The Johns Hopkins University (JHU). please contact us if you find yourself or your personal belongings in the data, and we (VIU-Lab) will immediately remove the concernedimages from our servers. By downloading and/or using the dataset, you acknowledge that you have read, understand, and agree to be bound by the following terms and conditions.1. All images are obtained from the Internet. We are not responsible for the content/meaning of these images.
- Specific care has been taken to reduce labeling errors. Nevertheless, we do not accept any responsibility for errors or omissions.
- You agree not to reproduce, duplicate, copy, sell, trade, resell or exploit for any commercial purposes, any portion of the images and any portion of derived data.
- You agree not to use the dataset or any derivative work for commercial purposes as, for example, licensing or selling the data, or using the data with a purpose to procure a commercial gain.
- All rights not expressly granted to you are reserved by us (VIU-Lab, JHU).
- You acknowledge that the dataset is a valuable scientific resource and agree to appropriately reference the following papers in any publication making use of the Data Software:Sindagi et al., Pushing the frontiers of unconstrained crowd counting: New dataset and benchmark method, ICCV 2019.Sindagi et al., JHU-CROWD: Large-Scale Crowd Counting Dataset and A Benchmark Method, Arxiv 2020.首先处理原始数据集如下处理完成结果如下之后就可以启动模型训练了因为没有开源出来可用的预训练权重所以这里是只能自己训练如下from utils.regression_trainer_cosine import RegTrainer import argparse import os import torch args Nonedef parse_args():parser argparse.ArgumentParser(descriptionTrain )parser.add_argument(–model-name, defaultvgg19_trans, helpthe name of the model)parser.add_argument(–data-dir, default./JHU-Train-Val-Test,helptraining data directory)parser.add_argument(–save-dir, default./model,helpdirectory to save models.)parser.add_argument(–save-all, typebool, defaultFalse,helpwhether to save all best model)parser.add_argument(–lr, typefloat, default5*1e-6,helpthe initial learning rate)parser.add_argument(–weight-decay, typefloat, default1e-5,helpthe weight decay)parser.add_argument(–resume, default,helpthe path of resume training model)parser.add_argument(–max-model-num, typeint, default1,helpmax models num to save )parser.add_argument(–max-epoch, typeint, default120,helpmax training epoch)parser.add_argument(–val-epoch, typeint, default5,helpthe num of steps to log training information)parser.add_argument(–val-start, typeint, default60,helpthe epoch start to val)parser.add_argument(–batch-size, typeint, default8,helptrain batch size)parser.add_argument(–device, default0, helpassign device)parser.add_argument(–num-workers, typeint, default0,helpthe num of training process)parser.add_argument(–is-gray, typebool, defaultFalse,helpwhether the input image is gray)parser.add_argument(–crop-size, typeint, default512,helpthe crop size of the train image)parser.add_argument(–downsample-ratio, typeint, default16,helpdownsample ratio)parser.add_argument(–use-background, typebool, defaultTrue,helpwhether to use background modelling)parser.add_argument(–sigma, typefloat, default8.0, helpsigma for likelihood)parser.add_argument(–background-ratio, typefloat, default0.15,helpbackground ratio)args parser.parse_args()return argsif name main:args parse_args()torch.backends.cudnn.benchmark Trueos.environ[CUDA_VISIBLE_DEVICES] args.device.strip() # set vis gputrainer RegTrainer(args)trainer.setup()trainer.train() 训练时间还是很长的这里等待训练结束后结果文件如下所示日志输出如下所示02-14 12:25:04 using 1 gpus 02-14 12:25:10 —–Epoch 0/119—– 02-14 12:27:03 Epoch 0 Train, Loss: 2914.89, MSE: 202.49 MAE: 81.49, Cost 112.6 sec 02-14 12:27:03 —–Epoch 1⁄119—– 02-14 12:28:45 Epoch 1 Train, Loss: 2691.07, MSE: 128.28 MAE: 44.69, Cost 102.0 sec 02-14 12:28:46 —–Epoch 2⁄119—– 02-14 12:30:28 Epoch 2 Train, Loss: 2687.40, MSE: 140.69 MAE: 43.30, Cost 102.5 sec 02-14 12:30:29 —–Epoch 3⁄119—– 02-14 12:32:11 Epoch 3 Train, Loss: 2688.95, MSE: 208.25 MAE: 45.59, Cost 102.1 sec 02-14 12:32:12 —–Epoch 4⁄119—– 02-14 12:33:55 Epoch 4 Train, Loss: 2682.65, MSE: 163.37 MAE: 39.28, Cost 103.2 sec 02-14 12:33:55 —–Epoch 5⁄119—– 02-14 12:35:37 Epoch 5 Train, Loss: 2677.02, MSE: 103.38 MAE: 33.43, Cost 102.0 sec 02-14 12:35:38 —–Epoch 6⁄119—– 02-14 12:37:15 Epoch 6 Train, Loss: 2677.04, MSE: 108.78 MAE: 34.17, Cost 96.5 sec 02-14 12:37:15 —–Epoch 7⁄119—– 02-14 12:38:58 Epoch 7 Train, Loss: 2676.39, MSE: 97.53 MAE: 33.18, Cost 103.1 sec 02-14 12:38:59 —–Epoch 8⁄119—– 02-14 12:40:41 Epoch 8 Train, Loss: 2675.40, MSE: 100.08 MAE: 31.75, Cost 102.4 sec 02-14 12:40:42 —–Epoch 9⁄119—– 02-14 12:42:24 Epoch 9 Train, Loss: 2676.26, MSE: 115.38 MAE: 33.94, Cost 101.8 sec 02-14 12:42:24 —–Epoch 10⁄119—– 02-14 12:44:07 Epoch 10 Train, Loss: 2674.91, MSE: 107.85 MAE: 31.79, Cost 102.7 sec 02-14 12:44:08 —–Epoch 11⁄119—– 02-14 12:45:49 Epoch 11 Train, Loss: 2675.62, MSE: 128.87 MAE: 31.46, Cost 101.5 sec 02-14 12:45:50 —–Epoch 12⁄119—– 02-14 12:47:32 Epoch 12 Train, Loss: 2672.00, MSE: 90.30 MAE: 27.87, Cost 102.0 sec 02-14 12:47:32 —–Epoch 13⁄119—– 02-14 12:49:14 Epoch 13 Train, Loss: 2671.85, MSE: 93.11 MAE: 28.77, Cost 101.6 sec 02-14 12:49:14 —–Epoch 14⁄119—– 02-14 12:50:57 Epoch 14 Train, Loss: 2674.60, MSE: 111.70 MAE: 31.27, Cost 102.4 sec为了直观可视化分析这里我对其结果日志进行可视化展示如下所示直观来看整体训练还不错。接下来绘制密度热力图如下
- 上一篇: 股权众筹网站建设如何建设个人网站凡科怎么样
- 下一篇: 固安网站建设后台系统免费模板网站
相关文章
-
股权众筹网站建设如何建设个人网站凡科怎么样
股权众筹网站建设如何建设个人网站凡科怎么样
- 技术栈
- 2026年04月20日
-
谷歌怎么建网站凡客app官网
谷歌怎么建网站凡客app官网
- 技术栈
- 2026年04月20日
-
谷歌云可以做网站吗中国营销协会官网
谷歌云可以做网站吗中国营销协会官网
- 技术栈
- 2026年04月20日
-
固安网站建设后台系统免费模板网站
固安网站建设后台系统免费模板网站
- 技术栈
- 2026年04月20日
-
固镇网站建设哪家好?网站二级域名是什么
固镇网站建设哪家好?网站二级域名是什么
- 技术栈
- 2026年04月20日
-
故宫博物院官网网站咋做的哈尔滨建设部网站
故宫博物院官网网站咋做的哈尔滨建设部网站
- 技术栈
- 2026年04月20日
