手机拍照的时候,EXIF里会带上Orientation的标记,一般的看图工具能很好地处理拍照方向,但是照片直接用于图像识别就麻烦了,不是所有工具都会认这个EXIF信息。使用手机拍照构建图像学习数据集的时候,务必要让图片正确旋转,否则标注的信息或者识别到的位置都可能会是错的。
使用 jhead http://www.sentex.net/~mwandel/jhead/usage.html
jhead -autorot xxx.jpgsskaje's blog, study & research on technology
手机拍照的时候,EXIF里会带上Orientation的标记,一般的看图工具能很好地处理拍照方向,但是照片直接用于图像识别就麻烦了,不是所有工具都会认这个EXIF信息。使用手机拍照构建图像学习数据集的时候,务必要让图片正确旋转,否则标注的信息或者识别到的位置都可能会是错的。
使用 jhead http://www.sentex.net/~mwandel/jhead/usage.html
jhead -autorot xxx.jpgNot really a switch, but similar. If you want to exchange data from two network using a host on Internet, this post helps.
In this case, Router 1 want to use Router 2 as gateway for some destinations. All 3 Nodes here have Internet public IP address.
I set-up a network, 192.168.20.0/24, using WireGuard. Our work are all on the Server in the middle.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[Interface] Address = 192.168.20.100/24 PrivateKey = KEY ListenPort = 51820 [Peer] PublicKey = RT1PUBKEY AllowedIPs = 192.168.20.200/32,192.168.10.0/24 Endpoint = RT1:51820 [Peer] PublicKey = RT2PUBKEY AllowedIPs = 0.0.0.0/0 Endpoint = RT2:51820 |
If I put such config to /etc/wireguard/wg0.conf and run wg-quick up wg0, then I may lost connection to the server, because of the default route.
Now, add a route table to your system and change wg0.conf, let’s name it wgswitch and table id 201.
1 2 |
# if you're not on Ubuntu, echo "201 wgswitch" >> /etc/iproute2/rt_tables echo "201 wgswitch" >> /etc/iproute2/rt_tables.d/wg_switch.conf |
Then modify wg0.conf.
1 2 3 4 5 |
[Interface] Address = 192.168.20.100/24 PrivateKey = KEY ListenPort = 51820 Table = 201 |
Now when you establish connections, you’ll be able to ping from router1 to router2 using 192.168.20.0/24 network.
But if you want to try a custom network, that’s not enough, you need extra route and ip rule for your network
1 2 3 4 5 6 7 8 9 10 11 12 |
# PostUp /sbin/ip route add ROUTE_TO_ROUTER1/16 via LOCAL_GW dev eth0 table 201 /sbin/ip route add ROUTE_TO_ROUTER2/16 via LOCAL_GW dev eth0 table 201 /sbin/ip route add LOCAL_INTERFACE_IP/24 dev eth0 table 201 /sbin/ip route add 192.168.10.0/24 dev wg0 /sbin/ip rule add iif wg0 lookup 201 /bin/ping -c 1 192.168.201.1 /bin/ping -c 1 192.168.201.20 |
AppStore only, you need a macOS < 10.15 to download this installer
https://itunes.apple.com/cn/app/macos-catalina/id1466841314?ls=1&mt=12
AppStore only, you need a macOS < 10.14 to download this installer
https://apps.apple.com/cn/app/macos-mojave/id1398502828?mt=12
AppStore only, you need a macOS < 10.13 to download this installer
https://apps.apple.com/cn/app/macos-high-sierra/id1246284741?ls=1&mt=12
10.9 Mavericks or earlier
Idk