Giter Site home page Giter Site logo

debug_record's Introduction

Debug_Record

A record for code debugging.

1. Extract audio (.wav) from video (.mp4) with ffmpeg.

ffmpeg -y -i " + file_path + " -ac 1 -ar 16000 "  + new_path
-y overwrite
-ac 1 get one channel
-ar 16000 set the sample_rate as 16kHz

refer:1, 2

2. read audio with three different tools

refer: 1, 2, 3

3. Change 2-d list to 1-d

list1 = [[1, 1], [2, 2]]
ans = [item for list in list1 for item in list]

refer: 1

4. Pytorch-Lightening

使用模板参考1, 参考2

torchmetrics文档

torchmetrics in Pytorch-Lightening

Pandas 数据读取

参考: 1

WeightedRandomSampler 处理不平衡集

Sampler, WeightedRandomSampler理解, 方法

Linux commands

# 删除目录下文件夹
find . -type d | sed -n '2,$p' | xargs rm -rf

# 统计当前目录下文件的个数
ls -l | grep "^-" | wc -l

# 统计当前目录下文件的个数(包括子目录)
ls -lR| grep "^-" | wc -l

# 查看某目录下文件夹(目录)的个数(包括子目录)
ls -lR | grep "^d" | wc -l

# 查看存储空间使用情况
du -h -d 1

参考:linux批量删除目录下的文件夹而不删除文件 统计文件夹下的文件数目

ffmpeg install problems

conda install x264=='1!152.20180717' ffmpeg=4.0.2 -c conda-forge

conda install -c conda-forge x264=='1!161.3030' ffmpeg=4.3.2

conda commands

# 创建新环境
conda create -n name python==version

# 清理不必要的库包表文件
conda clean -a


https://codeantenna.com/a/P7NmFC4N8N

CAM and heatmap

Pytorch可视化神经网络热力图(CAM) 请问注意力机制中生成的类似热力图或者柱状图是如何生成的? Python画attention map与原图叠加的热力图 深度学习之如何使用Grad-CAM绘制自己的特征提取图 Visualization Method Corresponding to Regression Problems and Its Application to Deep Learning-Based Gaze Estimation Model

debug_record's People

Contributors

vincent-zhq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.